AbuttersDoc.tioga
Spreitzer, April 15, 1986 4:04:36 pm PST
Abutters
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
Abutters
Mike Spreizer
© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: Abutters are like Containers, except that they provide a richer set of alignment constraints.
Keywords: Viewer, Container, Align, Constrain, Child
XEROX Xerox Corporation
Palo Alto Research Center
3333 Coyote Hill Road
Palo Alto, California 94304
For Internal Xerox Use Only
1. Abutters
An Abutter is a class of Viewer that keeps its children aligned according to some client-specified constraints. There are four flavors of constraints: left, right, top, and bottom, indicating which edge of the Abutter we are working from. Consider the left constraints. Each one must be of the form: given where child1 is, make the left edge of child2 a specified distance from the right edge of child1, by moving either all of child2, or only its left edge. The left constraints form a tree according to which child controlls which. The stretching option (moving only a child's left edge) can be exercised only at the leaves of this tree. Leaves that do not stretch can be used to set the width of the Abutter: if there are any such leaves, the Abutter will be wide enough to contain all of them (including a bit of space after). In the interface Abutters, the TYPE Series represents such a tree. An Abutter has such a tree for each of the four flavors of constraint. Clients can set the constraints all at once with a call to SetLayout. Constraints can be added one at a time by calls on Abut and SetSizeBy.