XTkScrollableContainers.mesa
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Philip James, March 19, 1992 7:38 am PST
XTkScrollableContainers:
CEDAR
DEFINITIONS ~ {
ScrollableContainerWidget: TYPE = XTkContainers.ContainerWidget;
ContainerWidget: TYPE = XTkContainers.ContainerWidget;
WidgetSpec: TYPE = XTk.WidgetSpec;
RedrawProc: TYPE ~ PROCEDURE [data: REF];
RegisterRedrawProc: PROC [widget: ContainerWidget, redrawProc: RedrawProc, redrawData: REF];
ScrollPosition:
PROC [widget: ContainerWidget]
RETURNS [position:
INT];
Returns current scroll position
ScrollTo:
PROC [widget: ContainerWidget, position:
INT ¬ 0];
Scrolls to specified position
Scroll:
PROC [widget: ContainerWidget, offset:
INT ¬ 0];
Scrolls distance specified by offset
SetHeight:
PROC [widget: ContainerWidget, height:
INT];
Sets height of scrollable data
SetGranularity:
PROC [widget: ContainerWidget, granularity:
INT];
All scrolling will be done in multiples of granularity specified
ContainerFromScrollable:
PROC [scrollable: ScrollableContainerWidget]
RETURNS [container: ContainerWidget];
Returns the container which will be scrolled
Create:
PROC [widgetSpec: WidgetSpec ¬ [], height:
INT ¬ Xl.dontUse, granularity:
INT ¬ Xl.dontUse, redrawProc: RedrawProc ¬
NIL, redrawData:
REF ¬
NIL]
RETURNS [scrollable: ScrollableContainerWidget];
Do not add children to the return value from this procedure.
Use ContainerFromScrollable instead.
}.