GGWindow.mesa
Last edited by Bier on November 30, 1986 2:00:35 pm PST
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Contents: Code to create a gargoyle tool. Also provides access to the state of a particular gargoyle viewer.
Pier, May 9, 1986 10:12:11 am PDT
DIRECTORY
Imager, Rope, GGBasicTypes, GGInterfaceTypes, GGModelTypes, ViewerClasses;
GGWindow: CEDAR DEFINITIONS = BEGIN
Point: TYPE = GGBasicTypes.Point;
Scene: TYPE = GGModelTypes.Scene;
Viewer: TYPE = ViewerClasses.Viewer;
GGData: TYPE = GGInterfaceTypes.GGData;
CreateWindow: PROC [scene: Scene, iconic: BOOL, paint: BOOL, workingDirectory: Rope.ROPE] RETURNS [ggData: GGData];
ForegroundParts: TYPE = {triggerBag, objectBag, bitMap, none, sceneBag};
RestoreScreenAndInvariants: PROC [paintAction: ATOM, ggData: GGData, remake: ForegroundParts ← triggerBag, backgndOK: BOOLFALSE, edited: BOOLTRUE, okToClearFeedback: BOOL];
This procedure is called from about 100 places in GGEventImpl*, and GGMouseEventImpl*. Some change has been made to the scene or to the alignment lines. Inform GGRefresh, GGGravity, GGAlign and other interested parties.
paintAction is an ATOM which will be passed to GGRefreshImpl.ActionAreaPaint.
remake tells how much of the triggerBag => objectBag => foreground bitMap chain must be remade. A value of triggerBag means the whole chain will be remade. A value of none, means it is all OK. sceneBag is a special value which means that only the sceneTriggerBag needs to be remade.
bkgndOK should be TRUE only of the caller has made sure the background is up to date. It is always safe (but not always efficient) to set bkgndOK to FALSE.
ViewerToWorld: PROC [viewerPoint: Point, ggData: GGData] RETURNS [worldPoint: Point];
WorldToViewer: PROC [worldPoint: Point, ggData: GGData] RETURNS [viewerPoint: Point];
SaveCaretPos: PROC [ggData: GGData];
NewCaretPos: PROC [ggData: GGData];
SetCursorLooks: PROC [type: GGInterfaceTypes.GravityType, ggData: GGData];
Change the appearance of the cursor on the screen. The cursor shape indicates the gravity state: off, pointsPreferred, strictDistance
Gargoyle Viewer State
SetHeuristics: PROC [ggData: GGData, on: BOOL];
GetHeuristics: PROC [ggData: GGData] RETURNS [on: BOOL];
SetGravityExtent: PROC [ggData: GGData, inches: REAL];
GetGravityExtent: PROC [ggData: GGData] RETURNS [inches: REAL];
END.
Pier, December 5, 1985 10:29:19 am PST
changes to: remove all references to camera. Add Viewer <=> World procs.