File: SVEditUser.mesa
Created in October 1982
Copyright © 1984 by Xerox Corporation. All rights reserved.
Last edited by Bier on January 10, 1985 10:11:52 pm PST
Contents: All of the procedures called by SVEditTool when menus and buttons are pressed.
(continued in SVEditUserB.mesa)
DIRECTORY
BitMap3d,
Containers,
Graphics,
GraphicsColor,
IO,
Menus,
Rope,
SV2d,
SV3d,
SVModelTypes,
SVRayTypes,
SVSceneTypes,
SVInterfaceTypes,
ViewerClasses;
SVEditUser: CEDAR DEFINITIONS =
BEGIN
Assembly: TYPE = SVSceneTypes.Assembly;
Camera: TYPE = SVModelTypes.Camera;
Color: TYPE = GraphicsColor.Color;
CoordSystem: TYPE = SVModelTypes.CoordSystem;
DCProc: TYPE = SVInterfaceTypes.DCProc;
EditToolData: TYPE = SVInterfaceTypes.EditToolData;
Matrix4by4: TYPE = SV3d.Matrix4by4;
MouseButton: TYPE = Menus.MouseButton;
Point2d: TYPE = SV2d.Point2d;
Point3d: TYPE = SV3d.Point3d;
PointSetOp: TYPE = SVRayTypes.PointSetOp;
Primitive: TYPE = SVRayTypes.Primitive;
Scene: TYPE = SVSceneTypes.Scene;
Selection: TYPE = SVInterfaceTypes.Selection;
Viewer: TYPE = ViewerClasses.Viewer;
ViewerCell: TYPE = SVInterfaceTypes.ViewerCell;
ViewerToolData: TYPE = SVInterfaceTypes.ViewerToolData;
ViewerProc: TYPE = PROC [Graphics.Context, ViewerToolData];
ViewerAssemblyProc: TYPE = PROC [Graphics.Context, ViewerToolData, Assembly];
globalMatCount: NAT = 2;
globalMatArray: ARRAY[1..globalMatCount] OF Rope.ROPE; -- implemented in SVEditUserImplD
globalProjectionCount: NAT = 2;
globalProjectionArray: ARRAY[1..globalProjectionCount] OF Rope.ROPE; -- implemented in SVEditUserImplD
INTERWINDOW COMMUNICATION
In SVEditUserImplA
PaintSceneAllViewers: PROC [proc: ViewerProc, editToolData: EditToolData, scene: Scene];
PaintAssemblyAllViewers: PROC [proc: ViewerAssemblyProc, editToolData: EditToolData, scene: Scene, assembly: Assembly];
LoadScene: PROC [viewerToolData: ViewerToolData, picName: Rope.ROPE, wdir: Rope.ROPE] RETURNS [scene: Scene, success: BOOL];
SaveScene: PROC [viewerToolData: ViewerToolData, picName: Rope.ROPE] RETURNS [success: BOOL];
StoreScene: PROC [viewerToolData: ViewerToolData, scene: Scene, picName: Rope.ROPE] RETURNS [success: BOOL];
NotifyOfEmpty: PROC [viewerToolData: ViewerToolData, from: Scene, to: Scene];
NotifyDestroy: PROC [viewer: Viewer];
SceneNewVersion:
PROC [viewerToolData: ViewerToolData];
Loops through split viewers updating headers.
UpdateAllHeaders:
PROC [viewerToolData: ViewerToolData, scene: Scene];
Loops through split viewers updating headers.
SceneOldVersion:
PROC [viewerToolData: ViewerToolData, scene: Scene];
Loops through split viewers updating headers.
NewSelectedViewer:
PROC [viewerToolData: ViewerToolData];
If this viewer is not the current selected viewer, tell the edittool about the current contents of this viewer and select it.
ReSelectViewer:
PROC [viewerToolData: ViewerToolData];
Tell the edittool about the current contents of this viewer and select it.
SetSourceName:
PROC [source: Assembly, editToolData: EditToolData];
Stuff the name of "assembly" into the Assembly: slot if it is not already there. If assembly = NIL, do nothing.
SetTargetName: PROC [target: Assembly, editToolData: EditToolData];
SetPlaneName: PROC [plane: Assembly, editToolData: EditToolData];
SetCurrentAssemblyName:
PROC [current: Assembly, editToolData: EditToolData];
Stuff the name of "wrt" into the WRT: slot if it is not already there. If wrt = NIL, assume that WORLD is intended.
Split: PROC [viewerToolData: ViewerToolData, scene: Scene];
DestroyAllSolidviewsWindows:
PROC [parent:
REF
ANY, clientData:
REF
ANY, mouseButton: MouseButton, shift, control:
BOOL];
SVEDITUSERIMPL COMMUNICATION
In SVEditUserImplA
GetCoordSys: PROC [viewer: Viewer, scene: Scene] RETURNS [cs: CoordSystem, success: BOOL];
GetAssembly: PROC [viewer: Viewer, scene: Scene] RETURNS [as: Assembly, success: BOOL];
FindAssemblyFromName: PROC [name: Rope.ROPE, scene: Scene] RETURNS [assembly: Assembly, superAssembly: Assembly, found: BOOL];
GetParent: PROC [editToolData: EditToolData] RETURNS [super: Assembly, success: BOOL];
GetPoint3d: PROC [textViewer: Viewer] RETURNS [pt: Point3d];
FindSceneInAllViewers: PROC [scene: Scene, allViewers: LIST OF ViewerCell] RETURNS [viewerCell: ViewerCell, success: BOOL];
AddSceneToAllViewers: PROC [scene: Scene, allViewers: LIST OF ViewerCell] RETURNS [viewerCell: ViewerCell, newAllViewers: LIST OF ViewerCell];
FindViewerInAllViewers: PROC [viewer: Viewer, allViewers: LIST OF ViewerCell] RETURNS [viewerCell: ViewerCell, before, listCell, after: Viewer, success: BOOL];
FindViewerInViewerCell: PROC [viewer: Viewer, viewerCell: ViewerCell] RETURNS [before, listCell, after: Viewer, success: BOOL];
DeleteViewerFromAllViewers: PROC [viewerCell: ViewerCell, before, listCell, after: Viewer];
AddViewerToViewerCell: PROC [viewer: Viewer, viewerCell: ViewerCell];
PROMPTS FOR TEXT WINDOWS
In SVEditUserImplC
SkitterSourceButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SkitterTargetButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SkitterParentButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
Text1PromptButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
Text1SourceButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
Text1TargetButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
Text1ParentButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SelectedTextPlaneButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SelectedTextSourceButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SelectedTextTargetButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SelectedTextParentButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ScenePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
CurrentAssemblyPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SourcePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
TargetPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
NewPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ParentPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
RGBPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SphereRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton,
shift, control: BOOL];
BlockXYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
CylinderRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
CylinderHeightPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ConeRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ConeHeightPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
BigRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SectionRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton,
shift, control: BOOL];
LinDepthPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
StuffPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
DegreesPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
TranslateXYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ScaleXYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
EvenScaleXYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
CameraNamePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
FocusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ScanResolutionPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
CameraOriginPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SlantPrompt: 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];
FramePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ClippingPlanePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
VisibleAssemblyPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
CameraOrderPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ResolutionPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
TubeHeightPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton,
shift, control: BOOL];
TubeRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
BoxXYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ArtworkNamePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ArtworkDegreesPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
LightNamePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
LightPositionPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
LightColorPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton,
shift, control: BOOL];
PROMPTS FOR TEXT WINDOWS WHICH TAKE THE DATA WHEN YOU PRESS THEM
In SVEditUserImplD
SetShadows: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
PROMPTS WHICH CYCLE THROUGH POSSIBILITIES (SVEDITUSERIMPLC)
SelectOp: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
IsColor: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
In SVEditUserImplD
ProjectionCycle: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
MaterialCycle: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
BoxOCycle: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ShadowsPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
COMMAND BUTTONS
In SVEditUserImplA.mesa
NewViewer: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
NewOutput: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
In SVEditUserImplC.mesa
First: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
DrawCS: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
DeleteButton: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
DeleteSources: PROC [editToolData: EditToolData];
SetOp: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
Help: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
SetColorMap: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
BWMap: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
Restart: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
RotX: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
RotY: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
RotZ: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
Trans: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
ScalePrimitive: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
EvenScale: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
Edit: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddComposite: 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];
In SVEditUserImplB
AddHalfSpace: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddSteiner: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddArnonSphere: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddExtra1: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddExtra2: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddExtra3: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddExtra4: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddSphere: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddBlock: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddCyl: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddCone: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddTorus: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddRevo: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
AddLinear: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
Copy: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
Rename: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
NewParent:
PROC [parent:
REF
ANY, clientData:
REF
ANY, mouseButton: MouseButton, shift, control:
BOOL];
END.