Containers.mesa
Copyright Ó 1985, 1986, 1991 by Xerox Corporation. All rights reserved.
Edited by McGregor on October 21, 1982 4:10 pm
Last Edited by: Maxwell, December 17, 1982 10:07 am
Doug Wyatt, December 16, 1986 2:26:30 pm PST
=
BEGIN
OPEN ViewerClasses;
Container: TYPE = Viewer;
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.wh) after next time container is painted.
ChildXBound:
PROC [container: Container, child: Viewer];
Constrain (child.wx + child.ww = container.ww) after next time container is painted.
ScrollOffset:
PROC [container: Container]
RETURNS [offTop:
INTEGER];
Returns the amount of the container scrolled off the top.
HScrollOffset:
PROC [container: Container]
RETURNS [offLeft:
INTEGER];
Returns the amount of the container scrolled off the left.