CEDAR MONITOR = { ActionProc: TYPE = PROC[handle: GraphHandle, atom: Atom]; Toggle: PUBLIC ENTRY PROC[handle: GraphHandle _ NIL, atom: Atom _ NIL] = { CheckNil[handle, $NilHandle]; SELECT atom FROM $AutoDiv => $AutoBounds $Primary, $Secondary $TargetXOn, $TargetYOn $GridX, GridY Buttons.SetDisplayStyle }; -- Toggle Operate: PUBLIC ENTRY PROC = {}; Control: PUBLIC ENTRY PROC[handle: GraphHandle _ NIL, action: ControlAction, atom: Atom] = { msg: ROPE = "in Control"; CheckNil[handle, $NilHandle, msg]; CheckNil[handle.controller, $NilController, msg]; CheckNil[handle.graph, $NilGraph, msg]; SELECT action FROM reset => CntrlReset[handle, atom]; -- see GraphCntrlReset.mesa set => CntrlSet[handle, atom]; show => CntrlShow[handle, atom]; next => CntrlNext[handle, atom]; find => CntrlFind[handle, atom]; remove => CntrlRemove[handle, atom]; ENDCASE => RaiseError[$UnknowAction, "in Control"]; }; -- Control CntrlSet: ActionProc = { }; -- CntrlSet CntrlShow: ActionProc = { CntrlReset[handle, atom]; SELECT atom FROM $Divisions => ResetDivisionsFields[handle]; $Bounds => ResetBoundsFields[handle]; $Carets => ResetCaretsFields[handle]; $Targets => ResetTargetsFields[handle]; $Grids => ResetGridsFields[handle]; $Color => { msg: ROPE; index: INT; [msg, index] _ GetIntField[controller.colorIndex]; IF msg # NIL THEN BlinkMsg[msg.Concat[" in parsing the index field."]] ELSE IF index NOT IN ColorIndex THEN BlinkMsg[ Rope.Cat["Index must be in [0..", Convert.RopeFromInt[NumberOfColors], ")"]] ELSE ResetColorFields[handle]; }; $Font => { msg: ROPE; index: INT; [msg, index]_ GetIntField[controller.fontIndex]; IF msg # NIL THEN BlinkMsg[msg.Concat[" in parsing the index field."]] ELSE IF index NOT IN FontIndex THEN BlinkMsg[ Rope.Cat["Index must be in [0..", Convert.RopeFromInt[NumberOfFonts], ")"]] ELSE ResetFontFields[handle]; }; $Text => { msg: ROPE; id: INT; [msg, id] _ GetIntField[controller.textId]; IF msg # NIL THEN BlinkMsg[msg.Concat[" in parsing the id field."]] ELSE { text: Text _ TextFromId[handle.texts, id]; IF text = NIL THEN BlinkMsg[Rope.Concat["There is no text with id = ", Rope.RopeFromInt[id]]] ELSE ResetTextFields[handle, text]; }; }; $Entity => { msg: ROPE; id: INT; [msg, id] _ GetIntField[controller.entityId]; IF msg # NIL THEN BlinkMsg[msg.Concat[" in parsing the id field."]] ELSE { entity: Entity _ EntityFromId[controller.entityHash, id]; IF entity = NIL THEN BlinkMsg[Rope.Concat["There is no curve with id = ", Rope.RopeFromInt[id]]] ELSE ResetCurveFields[handle, curve]; }; }; $CurveGroup => { msg: ROPE; id: INT; [msg, id] _ GetIntField[controller.entityId]; IF msg # NIL THEN BlinkMsg[msg.Concat[" in parsing the id field."]] ELSE { eg: EntityGroup _ EntityGroupFromId[handle.entityGroupList, id]; IF eg = NIL THEN BlinkMsg[Rope.Concat["There is no curve group with id = ", Rope.RopeFromInt[id]]] ResetCurveGroupFields[handle, cg]; }; }; $Crosssection => { }; ENDCASE => RaiseError[$UnknownAtom, "in CntrlReset"]; }; -- CntrlShow CntrlNext: ActionProc = { SELECT atom FROM }; -- CntrlNext CntrlFind: ActionProc = { SELECT atom FROM }; -- CntrlFind CntrlRemove: ActionProc = { }; -- CntrlRemove }. τGraphControl.mesa Sweetsun Chen, September 6, 1985 8:26:10 pm PDT Buttons.SetDisplayStyle Set values. Affects panel only. Reset values, if not set yet; display on chart if not yet displayed; update display on chart if already displayed. ΚΥ˜šœ™Icode™/—J™JšΟkœ˜ J˜J˜JšΟn œœœ"˜9J˜š žœ œœœœ˜JJ˜šœ˜J˜ J˜ J˜J˜J˜ —J˜J˜JšœΟc ˜ —J˜šžœœœœ˜ J™—J˜šžœœ œœ(˜\Jšœœ˜J˜"J˜1J˜'šœ˜Jšœ#Ÿ˜>J˜J˜ J˜ J˜ J˜$Jšœ,˜3—JšœŸ ˜ —˜˜J™JšœŸ ˜—J˜˜J™rJ˜šœ˜Jšœ+˜+Jšœ%˜%Jšœ%˜%Jšœ'˜'Jšœ#˜#šœ ˜ Jšœœ˜ Jšœœ˜ Jšœ2˜2Jšœœœ5˜Fš œœœœ œ ˜.JšœL˜L—Jšœ˜J˜—˜ Jšœœ˜ Jšœœ˜ Jšœ0˜0Jšœœœ5˜Fš œœœœ œ ˜-JšœK˜K—Jšœ˜J˜—šœ ˜ Jšœœ˜ Jšœœ˜Jšœ+˜+Jšœœœ2˜Cšœ˜Jšœ*˜*JšœœœK˜]Jšœ˜#J˜—J˜—šœ ˜ Jšœœ˜ Jšœœ˜Jšœ-˜-Jšœœœ2˜Cšœ˜Jšœ9˜9Jšœ œœL˜`Jšœ!˜%J˜—J˜—˜Jšœœ˜ Jšœœ˜Jšœ-˜-Jšœœœ2˜Cšœ˜Jšœ@˜@JšœœœR˜bJšœ"˜"J˜—J˜—šœ˜J˜J˜—Jšœ.˜5J˜—JšœŸ ˜—J˜˜šœ˜J˜—JšœŸ ˜J˜—˜šœ˜J˜—JšœŸ ˜J˜—˜JšœŸ˜——J˜J˜J˜—…— X!