DIRECTORY BitMap3d, CastRays, Containers, Graphics, Menus, Rope, SV2d, SV3d, SVInterfaceTypes, SVModelTypes, SVRayTypes, SVSceneTypes, SVSlices, ViewerClasses; SVViewerUser: CEDAR DEFINITIONS = BEGIN Assembly: TYPE = SVSceneTypes.Assembly; Camera: TYPE = SVModelTypes.Camera; CoordSystem: TYPE = SVModelTypes.CoordSystem; CSGTree: TYPE = SVRayTypes.CSGTree; DCProc: TYPE = SVInterfaceTypes.DCProc; MouseButton: TYPE = Menus.MouseButton; Point2d: TYPE = SV2d.Point2d; Point3d: TYPE = SV3d.Point3d; Primitive: TYPE = SVRayTypes.Primitive; Scene: TYPE = SVSceneTypes.Scene; Selection: TYPE = SVInterfaceTypes.Selection; SelectionType: TYPE = SVInterfaceTypes.SelectionType; Slice: TYPE = SVSlices.Slice; Vector: TYPE = SV3d.Vector; Viewer: TYPE = ViewerClasses.Viewer; ViewerToolData: TYPE = SVInterfaceTypes.ViewerToolData; ReadTwoReals: PROC [textViewer: Viewer] RETURNS [x, y: REAL]; Painter: PROC [proc: DCProc, viewerToolData: ViewerToolData _ NIL]; UpdateHeader: PROC [pictureFile: Rope.ROPE, viewerToolData: ViewerToolData]; NewVersion: PROC [viewer: Viewer]; -- called by SVEditUserImplA SceneOldVersion: PROC [viewerToolData: ViewerToolData]; -- called internally OldVersion: PUBLIC PROC [viewer: Viewer]; -- called by SVEditUserImplA EraseAndDrawScene: PROC [viewerToolData: ViewerToolData]; -- like DrawSceneButton but erases the screen before drawing. DrawOneCSInViewer: PROC [viewerToolData: ViewerToolData, cs: CoordSystem]; ComplementAssembly: PROC [viewerToolData: ViewerToolData, assem: Assembly]; DrawAssemblyXOR: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData, assembly: Assembly]; DrawAssembly: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData, assembly: Assembly]; DrawSceneEtc: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData, hardcopy: BOOL _ FALSE]; EraseAndDrawSceneEtc: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData]; DrawAllCS: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData]; DrawOneCS: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData, cs: CoordSystem]; PlaceOrigin: PROC [viewer: Viewer]; ResizeBitMaps: PROC [viewer: Viewer]; DrawSceneButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Reset: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmReset: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Save: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmSave: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Get: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmGet: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Store: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmStore: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Split: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Erase: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Empty: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmEmpty: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; RayCast: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmRayCast: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Stop: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ARay: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawBoundBoxes: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawBoundSpheres: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawCoordSystems: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Press: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; PressAIS: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; PressBWAIS: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; StorePoly: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawPt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawColor: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawBlackAndWhite: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; CrossHairs: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawDither: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Dither: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; SetFocalLength: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AISPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; StylePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; XYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; FocalLengthPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; TextPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DoubleBuffer: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ShowCoordsMode: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Selected: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Deselected: PROC [viewerToolData: ViewerToolData]; KillSelectionsButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DeleteJacksButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; SingleRay: PROC [viewerToolData: ViewerToolData, cameraPoint: Point2d]; PointAt: PROC [viewerToolData: ViewerToolData, cameraPoint: Point2d]; DrawSlice: PROC [viewerToolData: ViewerToolData, slice: Slice]; RayCastProgress: CastRays.NotifyOfProgressProc; END. PFile: SVViewerUser.mesa Last edited by Bier on January 15, 1985 0:01:17 am PST Copyright c 1984 by Xerox Corporation. All rights reserved. Author: Eric Bier in October, 1982 (?) Contents: Code to respond to button presses made in an SVViewer IMPORTED TYPES in SVViewerUserImplA TEXT VIEWER PARSING CODE (deserves its own module) MISCELLANEOUS Header should now display pictureFile as the file name. DRAW SOMETHING IN A SOLID VIEWER (Fetches a display context first) DRAW A SET OF ITEMS INTO A GIVEN DISPLAY CONTEXT Draw the given assembly into the given context in an XOR fashion. Uses a bitmap to avoid XOR some points more than once. Someday, it should use a pixel map instead. May also draw coordinate systems, drawing planes, etc depending on the current selected modes. Exactly like DrawSceneEtc, except, it clears the screen white before drawing. With double buffering, there is no difference. MENU PROCS in SVViewerUserImplA in SVViewerUserImplA DrawSceneInternal: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; -- like DrawScene but erases the screen before drawing. in SVViewerUserImplA In SVViewerUserImplA.mesa In SVViewerUserImplB.mesa In SVViewerUserImplB in SVViewerUserImplB PROMPTS ON/OFF SWITCHES UTILITIES In SVViewerUserImplB.mesa INPUT NOTIFY PROCS in SVViewerUserImplB Κ N– "cedar" style˜Iheadšœ™Iprocšœ6™6Jšœ Οmœ1™