ThreeDViewer.mesa
Last Edited by: Crow, April 21, 1989 2:46:12 pm PDT
DIRECTORY
Rope, ViewerClasses, G3dRender;
Types
ROPE: TYPE ~ Rope.ROPE;
Context: TYPE ~ G3dRender.Context;
ContextProc: TYPE ~ G3dRender.ContextProc;
ImagerProcRec: TYPE ~ G3dRender.ImagerProcRec;
Box: TYPE ~ G3dRender.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: Context, key: ATOM],
choices: LIST OF ButtonChoice ← LIST[],
label: ROPE ← NIL, -- label to appear on button
purpose: ROPE ← NIL -- brief explanation of button displayed when button expanded
];
MouseProc: TYPE ~ PROC[context: Context, bttn, ctlShft: ATOM, x, y: REAL];
Procedures for setting up viewers
MakeViewer: PROCEDURE [ context: Context, displayType: ATOM ← $PseudoColor,
bannerName: ROPE, menu: LIST OF ButtonDesc,
mouseAction: MouseProc, verticalMenu: BOOLEAN ← FALSE ];
Procedures for updating viewers
SwitchDisplayTo:
PROCEDURE [context: 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: Context, procRec:
REF ImagerProcRec ];
Mechanism to execute a procedure with the viewer's blessing