DIRECTORY Rope USING [ ROPE ], ViewerClasses USING [ Viewer ], ThreeDBasics USING [ Box, Context, ContextProc, ImagerProcRec ]; ThreeDViewer: CEDAR DEFINITIONS ~ BEGIN 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]; ButtonDesc: TYPE ~ RECORD[ proc: PROC[context: REF 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: REF Context, bttn, ctlShft: ATOM, x, y: REAL]; MakeViewer: PROCEDURE [ context: REF Context, displayType: ATOM _ $PseudoColor, bannerName: ROPE, menu: LIST OF ButtonDesc, mouseAction: MouseProc, verticalMenu: BOOLEAN _ FALSE ]; SwitchDisplayTo: PROCEDURE [context: REF Context, displayType: ATOM] RETURNS[succeeded: BOOLEAN]; ViewerUpdate: ContextProc; DrawInViewer: PROCEDURE [ context: REF Context, procRec: REF ImagerProcRec ]; END. όThreeDViewer.mesa Last Edited by: Crow, July 6, 1987 4:37:49 pm PDT Types key displayed as choice on expanded button and is sent back to called proc, doc is displayed when button is held over choice Procedures for setting up viewers Procedures for updating viewers Tries to change color display over to indicated type, fails if no color display, etc. Checks that viewPort and screen transformations are consistent with current viewer Mechanism to execute a procedure with the viewer's blessing Κ˜headšœ™Jšœ1™1defaultšΟk ˜ Jšœ œ˜Jšœœ ˜ Jšœœ.˜A——head2šœœ ˜Jšœ˜—head3šΠbi™Iunitšœœœ˜Lšœ œ˜%Lšœ œ˜-Lšœœ˜1Lšœœ˜Lšœœ˜%š œœœœœ˜2LšœL™LLšœ0™0—šœ œœ˜Lšœœ œœ˜,Lšœ œœœ˜'Lšœœœ Οc˜8Lšœ œœŸ=˜RL˜—Lš œ œœ œœœ˜N—šΟb"™"LšΟn œ œ œœ&œœœ=œœ˜Θ—š  ™ š ‘œ œ œœ œ œ˜hL™V—š‘ œ˜L™S—š‘ œ œ œœ˜MJ™;—L™—Jšœ˜—…—΄·