CDPanel.mesa (part of ChipNDale)
Copyright © 1983, 1986 by Xerox Corporation. All rights reserved.
by Christian Jacobi, August 8, 1983 5:20 pm
last edited by Christian Jacobi, March 11, 1986 3:22:39 pm PST
DIRECTORY
CD USING [Design, Technology, Number, Layer],
CDSequencer USING [CommandProc, QueueMethod],
Rope USING [ROPE],
ViewerClasses USING [Viewer];
CDPanel: CEDAR DEFINITIONS =
BEGIN
Control panels for the display and modification of values by the interactive user.
Implementor: Don't use define procedures from forked process! (order gets fooled)
CreatePanel:
PROC [design:
CD.Design]
RETURNS [ViewerClasses.Viewer];
--only one panel-viewer per design is created
--panel may or may not be updated if definitions occur after first creation
RedisplayLabels: PROC [design: CD.Design];
DefineNewLine:
PROC [tech:
CD.Technology←
NIL];
DefineLayerEntry:
PROC [tech:
CD.Technology←
NIL, lev:
CD.Layer, text: Rope.
ROPE, min, default:
CD.Number ← 1];
--only layers of technology tech may be used
DefineIntEntry:
PROC [tech:
CD.Technology ←
NIL, cdValueKey:
REF, text: Rope.
ROPE ←
NIL, min:
INT ←
FIRST[
INT], max:
INT ←
LAST[
INT], default:
INT ← 1, lambda:
INT ← 0];
--cdValueKey must have been correctly registered with CDValue! CDPanel does NOT itself.
--(needed to allow hooking entries onto already used keys)
--Restriction: displayed value does not follow changes of CDValue.StoreInt
--lambda=0: use lambda of technology
DefineButton:
PROC [tech:
CD.Technology ←
NIL, name: Rope.
ROPE ← NIL, proc: CDSequencer.CommandProc ←
NIL, command:
ATOM ←
NIL, queue: CDSequencer.QueueMethod ← useDefault, topLine:
BOOL ←
FALSE,border:
BOOL ←
FALSE,data:
REF ←
NIL, cdValueKey:
REF ←
NIL];
--button is always forked
--data is hanged on comm.data
--cdValueKey # NIL: overwrites name field by using CDValue
DefineLabel:
PROC [tech:
CD.Technology ←
NIL, name: Rope.
ROPE, border:
BOOL ←
FALSE, cdValueKey:
REF ←
NIL];
--if cdValueKey # NIL: overwrites name field by using CDValue
END.