GGInterfaceTypes.mesa
Contents: Types used by the Gargoyle interface level.
Copyright Ó 1985, 1986, 1987, 1988 by Xerox Corporation. All rights reserved.
Pier, July 21, 1989 4:15:58 pm PDT
Maureen Stone, October 2, 1987 11:56:31 am PDT
Bier, March 4, 1992 7:27 pm PST
Doug Wyatt, June 17, 1988 4:18:42 pm PDT
DIRECTORY
CardTab, CedarProcess, Feedback, FeedbackTypes, FunctionCache, GGBasicTypes, GGCircleCache, GGCoreTypes, GGHistoryTypes, GGModelTypes, GGSegmentTypes, Imager, ImagerTransformation, IO, RefTab, Rope, SlackProcessTypes, TIPPrivate;
GGInterfaceTypes: CEDAR DEFINITIONS = BEGIN
BezierDragRecord: TYPE = GGModelTypes.BezierDragRecord;
BoundBox: TYPE = GGModelTypes.BoundBox;
Camera: TYPE = GGModelTypes.Camera;
Circle: TYPE = GGBasicTypes.Circle;
DefaultData: TYPE = GGModelTypes.DefaultData;
DefaultDataObj: TYPE = GGModelTypes.DefaultDataObj;
DisplayStyle: TYPE = GGModelTypes.DisplayStyle;
ExtendMode: TYPE = GGModelTypes.ExtendMode;
FeatureData: TYPE = GGModelTypes.FeatureData;
MsgRouter: TYPE = FeedbackTypes.MsgRouter;
HistoryEvent: TYPE = GGModelTypes.HistoryEvent;
ImagerProc: TYPE = PROC [dc: Imager.Context];
Line: TYPE = GGCoreTypes.Line;
Point: TYPE = GGBasicTypes.Point;
QualityMode: TYPE = GGModelTypes.QualityMode;
RopeListt: TYPE = GGCoreTypes.RopeListt;
Scene: TYPE = GGModelTypes.Scene;
Segment: TYPE = GGSegmentTypes.Segment;
SelectMode: TYPE = GGModelTypes.SelectMode;
Sequence: TYPE = GGModelTypes.Sequence;
Slice: TYPE = GGModelTypes.Slice;
SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor;
SliceGenerator: TYPE = GGModelTypes.SliceGenerator;
TouchGroup: TYPE = GGSegmentTypes.TouchGroup;
TrajEnd: TYPE = GGModelTypes.TrajEnd;
Vector: TYPE = GGBasicTypes.Vector;
GGData:
TYPE =
REF GGDataObj;
This is the data which is passed to Gargoyle whenever a user event occurs. This REF is stored in the "data" field of both the GargoyleContainer and the ActionArea.
GGDataObj:
TYPE =
RECORD [
controls: Controls, -- the control panel
controlState: StateData, -- a place to store values when there is no control panel
embed: EmbedData, -- data about how Gargoyle is embedded in a window or parent editor
router: MsgRouter, -- the textual feedback region (see Feedback.mesa)
height: CARDINAL ← 0,
originalWDir: Rope.ROPE,
currentWDir: Rope.ROPE,
lastEvents: GGCoreTypes.EventListt,
justSawSelect: BOOL ← TRUE,
mouseMode: ATOM, -- mouseMode and state together form a hierarchical name space of states. (should be moved to DragData)
state: ATOM, -- as in mouseMode/state (should be moved to DragData)
scene: Scene, -- the collection of objects we are looking at.
rootSlice: Slice, -- for storing inheritable properties
caret: Caret,
anchor: Caret,
camera: Camera,
drag: DragData,
refresh: RefreshData,
hitTest: Filters,
measure: MeasureData,
debug: DebugData,
defaults: DefaultData,
fitData: FitData,
behavior: BehaviorData,
history: HistoryData,
slackHandle: SlackProcessTypes.SlackHandle,
parseInfo: TIPPrivate.TIPParseInfo,
touching: LIST OF TouchGroup,
aborted: PACKED ARRAY AbortFlags OF BOOL ← ALL[FALSE], -- has the Abort button been pushed recently?
multiGravityPool: REF ANY -- temporary storage pool for GGMultiGravity
];
AbortFlags:
TYPE = {refresh, playback, gravitytest, bags, filein, spare2, spare3};
MeasureData:
TYPE =
RECORD [
caret0: Point,
caret1: Point,
caret2Value: Point,
slopeViewValue: REAL,
angleViewValue: REAL,
radiusViewValue: REAL,
lineDistViewValue: REAL
];
DebugData: TYPE = REF DebugDataObj;
DebugDataObj:
TYPE =
RECORD [
lastMessage: Rope.ROPE,
writeScriptName: Rope.ROPE,
writeScriptStream: IO.STREAM,
autoScriptName: Rope.ROPE,
autoScriptStream: IO.STREAM,
autoScriptActionCount: CARD ← 0,
lastAutoScriptActionCount: CARD ← 0,
autoScriptNames: RopeListt, -- in order, the scripts that built this file
playScriptName: Rope.ROPE,
playScriptStream: IO.STREAM
];
FitData:
TYPE =
RECORD [
threshold: REAL ← 0.5,
minDistance: REAL ← 0.75,
polyPenalty: REAL ← 0.75,
angle: REAL ← 45.0,
tolerance: REAL ← 2.0,
maxIterations: NAT ← 5
];
BehaviorData:
TYPE =
RECORD [
activeDoc: REF,
rawInputMode: ATOM, -- e.g. $None, $Gargoyle, or $Button
rawInputState: ATOM, -- in case we need sub-states of rawInputMode
savedSelections: LIST OF SliceDescriptor
];
HistoryTool: TYPE = REF HistoryToolObj;
HistoryToolObj:
TYPE = GGHistoryTypes.HistoryToolObj;
HistoryData:
TYPE =
RECORD [
list: LIST OF HistoryEvent,
maxSize: INT ← 20, -- desired size of history list
currentIndex: INT ← 0, -- number for the event in progress
currentEvent: HistoryEvent, -- the event in progress
tool: HistoryTool, -- history tool
advanceProcess: CedarProcess.Process, -- background process for advance capture
advanceEvent: HistoryEvent -- event for advance capture
];
DragData: TYPE = REF DragDataObj;
DragDataObj: TYPE; -- concrete type in GGDragTypes.DragDataObj;
Controls: TYPE = REF ControlsObj;
ControlsObj: TYPE; -- concrete type in GGControlPanelTypes.ControlsObj
StateData: TYPE = REF StateDataObj;
StateDataObj: TYPE; -- concrete type in GGStateTypes.StateDataObj
EmbedData: TYPE = REF EmbedDataObj;
EmbedDataObj: TYPE; -- concrete type in GGEmbedTypes.EmbedDataObj
Caret: TYPE = REF CaretObj;
CaretObj:
TYPE =
RECORD [
exists: BOOL ← FALSE,
point: Point ← [0.0, 0.0],
normal: Vector ← [0.0, -1.0],
chair: SliceDescriptor,
attractor: REF -- may be SliceDescriptor, or an AlignmentObject
];
GravityExtentData: TYPE = REF GravityExtentDataObj;
GravityExtentDataObj:
TYPE =
RECORD [
extent: REAL
];
GravityType: TYPE = {linesPreferred, pointsPreferred, facesPreferred};
Filters: TYPE = REF FiltersObj;
FiltersObj:
TYPE =
RECORD [
t: REAL ← 25.0,
triggerBag: TriggerBag,
oldTriggerBag: TriggerBag,
oldTriggerBagOK: BOOL ← FALSE,
alignBag: AlignBag,
alignBagIsOldAlignBag: BOOL ← FALSE,
oldAlignBag: AlignBag,
oldAlignBagOK: BOOL ← FALSE,
sceneBag: TriggerBag,
oldSceneBag: TriggerBag,
oldSceneBagOK: BOOL ← FALSE,
gravityType: GravityType ← pointsPreferred,
hitCount: NAT ← 0,
scaleUnit: REAL ← 72.0, -- value of one scale unit, in screen dots. Initially set to 72.0 (1 inch)
horizontalDegrees: REAL -- slope considered horizontal. Initialized to 0 degrees (screen horizontal)
];
Refresh (data structures to help update the screen)
RefreshData: TYPE = REF RefreshDataObj;
RefreshDataObj: TYPE;
TriggerBag: TYPE = REF TriggerBagObj;
TriggerBagObj:
TYPE =
RECORD [
slices: RefTab.Ref,
anchor: FeatureData
];
AlignBag: TYPE = REF AlignBagObj;
AlignBagObj:
TYPE =
RECORD [
slopeLineTable: CardTab.Ref,
angleLines: LIST OF FeatureData,
radiiCircles: LIST OF FeatureData,
distanceLines: LIST OF FeatureData,
anchor: FeatureData
];
AlignmentLine: TYPE = REF AlignmentLineObj;
AlignmentLineObj:
TYPE =
RECORD [
line: Line,
degrees: REAL,
triggerPoints: LIST OF Point ← NIL
];
AlignmentCircle: TYPE = REF AlignmentCircleObj;
AlignmentCircleObj:
TYPE =
RECORD [
circle: Circle,
triggerPoints: LIST OF Point ← NIL
];
AlignmentPoint: TYPE = REF AlignmentPointObj;
AlignmentPointObj:
TYPE =
RECORD [
point: Point,
tangent: BOOL, -- is this a point of tangency? (for Describe purposes)
curve1: FeatureData,
curve2: FeatureData
];
SequencePart: TYPE = REF SequencePartObj;
SequencePartObj:
TYPE =
RECORD [
segNum, jointNum, controlPointNum: INT
];
GoodPoint: TYPE = REF GoodPointObj;
GoodPointObj:
TYPE =
RECORD [
dist: REAL,
point: Point,
normal: Vector,
featureData: FeatureData, -- this point
hitData: REF ANY, -- a description of this point
dimension: [0..2], -- is this from a vertex, edge, or face?
priority: INT ← 0 -- scene order priority. 0 => in back
];
NearVertexEdgeAndFaces: TYPE = REF NearVertexEdgeAndFacesObj;
NearVertexEdgeAndFacesObj:
TYPE =
RECORD [
things: SEQUENCE len: NAT OF GoodPoint];
FeatureCycler: TYPE = REF FeatureCyclerObj;
FeatureCyclerObj:
TYPE =
RECORD [
nearVEF: NearVertexEdgeAndFaces,
count: NAT,
index: INTEGER,
testPoint: Point
];
END.