--CDPanel.mesa (part of Chipndale)
--by Christian Jacobi August 8, 1983 5:20 pm
--last edited by Christian Jacobi November 23, 1983 9:20 am
DIRECTORY
CD USING [Design, Technology, DesignNumber, Level],
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
DefineNewLine: PROC [tech: CD.Technology];
DefineLevelEntry:
PROC [tech:
CD.Technology, lev:
CD.Level, text: Rope.
ROPE, min, default:
CD.DesignNumber𡤁];
--only levels of technology tech may be used
StoreDefaultLevel: PROC [design: CD.Design, lev: CD.Level];
FetchDefaultLevel: PROC [design: CD.Design] RETURNS [CD.Level];
StoreWidth: PROC [design: CD.Design, lev: CD.Level, width: CD.DesignNumber];
FetchWidth: PROC [design: CD.Design, level: CD.Level] RETURNS [CD.DesignNumber];
DefineIntEntry:
PROC [cdValueKey:
REF, tech:
CD.Technology,
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
--Don't use define procedures from forked process! (order gets fooled)
END.