CDPanelExtras.mesa (part of ChipNDale)
Copyright © 1986 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, July 21, 1986 5:32:41 pm PDT
Last Edited by: Jacobi July 22, 1986 1:38:55 pm PDT
DIRECTORY
CD USING [Design, Technology],
Rope USING [ROPE];
CDPanelExtras: CEDAR DEFINITIONS =
BEGIN
DefineTextEntry: PROC [tech: CD.Technology ← NIL, cdValueKey: REF, button: Rope.ROPENIL, width: INT ← -1, editable: BOOL TRUE];
--cdValueKey must have been correctly registered with CDValue
-- value on design typical a ROPE; technology may have LIST OF ROPE
--width: of field for text; in viewer units; -1 means: use total width of panel
--RedisplayLabels does not work on text entries, to prevent flushing edits
ReDisplay: PROC [design: CD.Design, cdValueKey: REF];
--Takes value using CDValue.Fetch and updates corresponding displays of the panel
ReDisplayRope: PROC [design: CD.Design, cdValueKey: REF, rope: Rope.ROPE];
--Takes the given rope, stores it using CDValue.Store and updates the display on the panel
FromDisplayRope: PROC [design: CD.Design, cdValueKey: REF] RETURNS [rope: Rope.ROPE];
--Takes the displayed rope, stores it using CDValue.Store, and also returns it
END.