Containers.mesa; Written by S. McGregor
Edited by McGregor on July 21, 1983 10:58 am
Last Edited by: Maxwell, December 17, 1982 10:07 am
Last Edited by: Wyatt, October 21, 1983 4:06 pm
DIRECTORY
ViewerClasses USING [Viewer, ViewerRec];
Containers: CEDAR DEFINITIONS
= BEGIN OPEN ViewerClasses;
Container: TYPE = Viewer;
Containers are just viewers that are convenient to hold other viewers.
Create:
PROC[info: ViewerRec ← [], paint:
BOOL ←
TRUE]
RETURNS[container: Container];
Creates a new, empty container. You probably want to pass a name in the info record.
ChildYBound:
PROC[container: Container, child: Viewer];
Constrain (child.wy + child.wh = container.ch) after next time container is painted.
ChildXBound:
PROC[container: Container, child: Viewer];
Constrain (child.wx + child.ww = container.cw) after next time container is painted.
ScrollOffset:
PROC[container: Container]
RETURNS[offTop:
INTEGER];
Returns the amount of the container scrolled off the top.
A fast child move proc might go here someday.
END.