EditToolBuilder.mesa
Copyright Ó 1989, 1991, 1992 by Xerox Corporation. All rights reserved.
Pier, January 7, 1989 2:09:10 pm PST
Doug Wyatt, March 14, 1992 3:50 pm PST
DIRECTORY
ViewerClasses USING [Viewer, ClickProc],
Rope USING [ROPE],
Tioga USING [Node, Looks];
EditToolBuilder: CEDAR DEFINITIONS = BEGIN
Viewer: TYPE = ViewerClasses.Viewer;
ClickProc: TYPE = ViewerClasses.ClickProc;
Layout: TYPE = REF LayoutRec;
LayoutRec: TYPE = RECORD [
entryLeft: INTEGER,
initLeft: INTEGER,
heightSoFar: INTEGER,
initHeight: INTEGER,
entryHeight: INTEGER ¬ 15,
entryVSpace: INTEGER ¬ 5,
gapSize: INTEGER ¬ 5,
container: Viewer
];
BadNumber: SIGNAL;
ToMiddle: PROC [info: Layout];
change entryLeft to middle of container
ToNext: PROC [info: Layout, bigGap: BOOL ¬ FALSE];
HGap: PROC [info: Layout];
VGap: PROC [info: Layout];
BuildPair: PROC [info: Layout, proc: ClickProc, flag: BOOL, l1, l2: Rope.ROPE,
clientData: REF ANY ¬ NIL, fork: BOOL ¬ FALSE]
RETURNS [label: Viewer, button: Viewer];
places at current entryLeft & heightSoFar and then updates those parameters
BuildTriple: PROC [info: Layout, proc: ClickProc, state: [0..2], l0, l1, l2: Rope.ROPE,
clientData: REF ANY ¬ NIL, fork: BOOL ¬ FALSE]
RETURNS [label: Viewer, button: Viewer];
DataFieldButton: PROC [arg: Viewer, clear: BOOL];
BuildDataFieldPair: PROC [info: Layout, buttonRope: Rope.ROPE, buttonProc: ClickProc,
clientData: REF ANY ¬ NIL, lines: CARDINAL ¬ 2]
RETURNS [button: Viewer, arg: Viewer];
GetDataNode: PROC [arg: Viewer] RETURNS [Tioga.Node];
GetDataLooks: PROC [arg: Viewer, name: Rope.ROPE] RETURNS [looks: Tioga.Looks];
GetInt: PROC [arg: Viewer] RETURNS [num: INT];
SetInt: PROC [arg: Viewer, num: INT];
ConvertList: PROC [list: LIST OF REF ANY] RETURNS [Rope.ROPE];
BuildButton: PROC [info: Layout, name: Rope.ROPE, proc: ClickProc,
clientData: REF ANY ¬ NIL, fork: BOOL ¬ FALSE, gapAfter: BOOL ¬ TRUE, border: BOOL ¬ FALSE]
RETURNS [button: Viewer];
BuildLabel: PROC [info: Layout, name: Rope.ROPE, width: INTEGER ¬ 0]
RETURNS [label: Viewer];
HRule: PROC [info: Layout, thickness: CARDINAL ¬ 1, gapAbove, gapBelow: BOOL ¬ TRUE];
put a horizontal rule the full width of the container
if gapAbove is true, then move down by entryVSpace before placing the rule
if gapBelow if true, then move down by entryVSpace after placing the rule
END.