DIRECTORY Xl USING [Point], XTk USING [Class, Widget, WidgetSpec]; XTkXScroller: CEDAR DEFINITIONS ~ BEGIN XScroller: TYPE = XTk.Widget; xScrollerClass: READONLY XTk.Class; CreateXScroller: PROC [widgetSpec: XTk.WidgetSpec ¬ [], child: XTk.Widget ¬ NIL, bindx, bindy: BOOL ¬ FALSE] RETURNS [xScroller: XScroller]; IsXScroller: PROC [widget: XTk.Widget] RETURNS [BOOL]; Child: PROC [xScroller: XScroller] RETURNS [child: XTk.Widget]; ReplaceChild: PROC [xScroller: XScroller, child: XTk.Widget, delayed: BOOL ¬ FALSE, preventDestructionOfOldChild: BOOL ¬ FALSE]; GetOffset: PROC [xScroller: XScroller] RETURNS [p: Xl.Point]; SetOffset: PROC [xScroller: XScroller, p: Xl.Point]; SetBindXY: PROC [xScroller: XScroller, bindx, bindy: BOOL]; END. H XTkXScroller.mesa Copyright Σ 1992 by Xerox Corporation. All rights reserved. Created by Christian Jacobi, June 9, 1992 6:45 pm PDT Christian Jacobi, June 12, 1992 12:16 pm PDT An XScroller is a widget which can have one child and can scroll the child both vertically and horizontally by simply changing the position of the child. The X in its name is motivated by the fact that X window positions are directly used to implement the scrolling. To track the offset, register a notifier on postConfigureKey for the XScroller. (As long as a child exists and is realized, SetOffset will cause a configure.) A collection sub-class which may have only one child Creates a XScroller; the XScroller is the container widget. Predicate whether calling GetState, etc. makes sense. Returns the current child widget. Replaces widget to be used as child; aquires the necessary locks. Returns the position of the child. Sets the position of the child. Bind=true means that the dimension of the child is set from container. Bind=false means that the dimension of the child is set from child. Κͺ•NewlineDelimiter –(cedarcode) style™code™Kšœ Οeœ1™K™"K˜—šŸ œžœ&˜5K™K˜—šŸ œžœ&žœ˜