CDPanel.mesa (part of ChipNDale)
Copyright © 1983, 1985 by Xerox Corporation. All rights reserved.
by Christian Jacobi, August 8, 1983 5:20 pm
last edited by Christian Jacobi, May 2, 1985 3:56:42 pm PDT
DIRECTORY
CD USING [Design, Technology, Number, Layer],
CDSequencer USING [CommandProc, QueueMethod],
Rope USING [ROPE],
ViewerClasses USING [Viewer];
CDPanel: CEDAR DEFINITIONS =
BEGIN
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
StoreDefaultLayer: PROC [design: CD.Design, l: CD.Layer];
FetchDefaultLayer: PROC [design: CD.Design] RETURNS [CD.Layer];
StoreWidth: PROC [design: CD.Design, l: CD.Layer, width: CD.Number];
FetchWidth: PROC [design: CD.Design, layer: CD.Layer] RETURNS [CD.Number];
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𡤁];
--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];
--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
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
--Don't use define procedures from forked process! (order gets fooled)
END.