ThreeDViewer.mesa
Last Edited by: Crow, July 6, 1987 4:37:49 pm PDT
DIRECTORY
Rope     USING [ ROPE ],
ViewerClasses  USING [ Viewer ],
ThreeDBasics  USING [ Box, Context, ContextProc, ImagerProcRec ];
ThreeDViewer: CEDAR DEFINITIONS
~ BEGIN
Types
ROPE: TYPE ~ Rope.ROPE;
Context: TYPE ~ ThreeDBasics.Context;
ContextProc: TYPE ~ ThreeDBasics.ContextProc;
ImagerProcRec: TYPE ~ ThreeDBasics.ImagerProcRec;
Box: TYPE ~ ThreeDBasics.Box;
Viewer: TYPE ~ ViewerClasses.Viewer;
ButtonChoice: TYPE ~ RECORD[key: ATOM, doc: ROPE];
key displayed as choice on expanded button and is sent back to called proc,
doc is displayed when button is held over choice
ButtonDesc: TYPE ~ RECORD[
proc: PROC[context: REF Context, key: ATOM],
choices: LIST OF ButtonChoice ← LIST[],
label: ROPENIL,          -- label to appear on button
purpose: ROPENIL  -- brief explanation of button displayed when button expanded
];
MouseProc: TYPE ~ PROC[context: REF Context, bttn, ctlShft: ATOM, x, y: REAL];
Procedures for setting up viewers
MakeViewer: PROCEDURE [ context: REF Context, displayType: ATOM ← $PseudoColor,
         bannerName: ROPE, menu: LIST OF ButtonDesc,
         mouseAction: MouseProc, verticalMenu: BOOLEANFALSE ];
Procedures for updating viewers
SwitchDisplayTo: PROCEDURE [context: REF Context, displayType: ATOM]
      RETURNS[succeeded: BOOLEAN];
Tries to change color display over to indicated type, fails if no color display, etc.
ViewerUpdate: ContextProc;
Checks that viewPort and screen transformations are consistent with current viewer
DrawInViewer: PROCEDURE [ context: REF Context, procRec: REF ImagerProcRec ];
Mechanism to execute a procedure with the viewer's blessing
END.