GGInterfaceTypes.mesa
Last edited by: Eric Bier on March 24, 1987 10:44:35 pm PST
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Contents: Types used by the Gargoyle interface level.
Pier, May 8, 1987 2:43:11 pm PDT
DIRECTORY
AtomButtonsTypes, BiScrollers, BufferedRefresh, Buttons, Feedback, FunctionCache, GGBasicTypes, GGCircleCache, GGFont, GGModelTypes, GGSegmentTypes, Imager, ImagerBackdoor, ImagerTransformation, IO, Menus, Rope, SlackProcess, TiogaButtons, ViewerClasses;
GGInterfaceTypes: CEDAR DEFINITIONS = BEGIN
BoundBox: TYPE = GGModelTypes.BoundBox;
Circle: TYPE = GGBasicTypes.Circle;
EntityGenerator: TYPE = GGModelTypes.EntityGenerator;
ExtendMode: TYPE = GGModelTypes.ExtendMode;
FeedbackData: TYPE = AtomButtonsTypes.FeedbackData;
FeatureData: TYPE = GGModelTypes.FeatureData;
GargoyleContainer: TYPE = Viewer;
ImagerProc: TYPE = PROC [dc: Imager.Context];
Line: TYPE = GGBasicTypes.Line;
Outline: TYPE = GGModelTypes.Outline;
OutlineDescriptor: TYPE = GGModelTypes.OutlineDescriptor;
Point: TYPE = GGBasicTypes.Point;
Scene: TYPE = GGModelTypes.Scene;
Segment: TYPE = GGSegmentTypes.Segment;
SelectMode: TYPE = GGModelTypes.SelectMode;
Sequence: TYPE = GGModelTypes.Sequence;
Slice: TYPE = GGModelTypes.Slice;
SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor;
TouchGroup: TYPE = GGSegmentTypes.TouchGroup;
Traj: TYPE = GGModelTypes.Traj;
Vector: TYPE = GGBasicTypes.Vector;
Viewer: TYPE = ViewerClasses.Viewer;
CaretOn: TYPE = {nothing, joint, cp, seg, slice, spare1, spare2};
Caret: TYPE = REF CaretObj;
CaretObj:
TYPE =
RECORD [
exists: BOOL ← FALSE,
point: Point ← [0.0, 0.0],
chair: SliceDescriptor,
attractor: SliceDescriptor,
onOverlay: BOOL ← FALSE
];
DisplayStyle: TYPE = GGModelTypes.DisplayStyle;
QualityMode: TYPE = GGModelTypes.QualityMode;
CameraData:
TYPE = GGModelTypes.CameraData;
DragData:
TYPE =
RECORD [
startPoint: Point ← [0.0, 0.0],
currentPoint: Point ← [0.0, 0.0], -- maintained by MouseEvent Procs
savedCaret: Caret, -- needed to recover from Abort operations
seqInProgress: Sequence,
boxInProgress: SliceDescriptor, -- needed by Start/During/End Box procs to pass along new box
transform: ImagerTransformation.Transformation,
selectState: SelectMode ← joint, -- what are we in the process of selecting?
extendMode: ExtendMode ← joint, -- what are we extending to?
outlineToExtend: OutlineDescriptor ,
sliceToExtend: SliceDescriptor
];
RefreshData:
TYPE =
RECORD [
suppressRefresh: BOOL ← FALSE,
paintAction: ATOM,
showColors: AtomButtonsTypes.TwoState,
screenStyle: AtomButtonsTypes.EnumTypeRef,
alignments: AtomButtonsTypes.TwoState,
sandwich: BufferedRefresh.Sandwich,
clientToViewer: ImagerTransformation.Transformation, -- remembers BiScroller to allow reuse of sandwich when window opens anew
lineCache: FunctionCache.Cache, -- remembers which lines have been drawn in Foreground
dragInProgress: BOOL ← FALSE,
caretIsMoving: BOOL ← FALSE,
spotPoint: Point ← [0.0, 0.0], -- For Gravity Testing
hitPoint: Point ← [0.0, 0.0], -- For Gravity Testing
overlayList: LIST OF REF ANY,
orderedOverlayList: LIST OF REF ANY, -- maintained by routines in GGRefreshImpl. NIL => must rebuild ordered list
addedObject: REF ANY, -- used to implement GGRefresh.FinishedAdding
recentFeature: FeatureData, -- maintained by DuringSelect routines. Most recently hit feature. Could be used for refresh optimization of ExtendSelection.
startBoundBox: BoundBox,
e.g. when a new selection is made, the old selected objects must be updated. This box bounds the old selected objects.
textInProgress: Slice, -- text slice to be updated by AddChar if nonNil. Any mouse click makes this NIL, completing typein. A character typed when isNIL starts a new textInProgress
areaFollowColorTool: BOOL ← FALSE,
lineFollowColorTool: BOOL ← FALSE
];
GravityType: TYPE = {strictDistance, innerCircle, off};
Filters: TYPE = REF FiltersObj;
FiltersObj:
TYPE =
RECORD [
tolerance: REAL ← 25.0, -- the tolerance for hit testing
criticalR: REAL ← 25.0, -- see GGGravity.Map
innerR: REAL ← 12.0, -- see GGGravity.InnerCircle
triggerBag: TriggerBag,
oldTriggerBag: TriggerBag,
alignBag: AlignBag,
oldAlignBag: AlignBag,
sceneBag: TriggerBag,
oldSceneBag: TriggerBag,
hitCount: NAT ← 0,
gravityType: GravityType,
gravityTypeMenu: AtomButtonsTypes.EnumTypeRef, -- initialized in GGWindowImpl
gravityExtentButton: AtomButtonsTypes.GraphicsState,
gravButton: AtomButtonsTypes.TwoState,
midpointButton: AtomButtonsTypes.TwoState,
heuristicsButton: AtomButtonsTypes.TwoState,
slopeHeader: AtomButtonsTypes.ScalarButtonHandle,
slopeCount: NAT ← 0,
slopeText: Viewer,
angleHeader: AtomButtonsTypes.ScalarButtonHandle,
angleCount: NAT ← 0,
angleText: Viewer,
radiusHeader: AtomButtonsTypes.ScalarButtonHandle,
radiusCount: NAT ← 0,
radiusText: Viewer,
radiusCircleCache: GGCircleCache.Cache,
distanceHeader: AtomButtonsTypes.ScalarButtonHandle,
distanceCount: NAT ← 0,
distanceText: Viewer,
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)
];
GravityExtentData: TYPE = REF GravityExtentDataObj;
GravityExtentDataObj:
TYPE =
RECORD [
extent: REAL
];
MeasureData:
TYPE =
RECORD [
caret0: Point,
caret1: Point,
caret2Value: Point,
caret2: Viewer,
slopeViewValue: REAL,
slopeView: Viewer,
angleViewValue: REAL,
angleView: Viewer,
radiusViewValue: REAL,
radiusView: Viewer,
lineDistViewValue: REAL,
lineDistView: Viewer
];
DebugData:
TYPE =
RECORD [
typescript: Viewer,
lastMessage: Rope.ROPE,
logFileName: Rope.ROPE,
logStream: IO.STREAM
];
DefaultData: TYPE = GGModelTypes.DefaultData;
DefaultDataObj:
TYPE = GGModelTypes.DefaultDataObj;
SelectionClass: TYPE = GGSegmentTypes.SelectionClass;
AbortFlags: TYPE = {refresh, playback, gravitytest, bags, spare2, spare3};
GGData:
TYPE =
REF GargoyleDataObj;
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.
GargoyleDataObj:
TYPE =
RECORD [
outer: GargoyleContainer,
biScroller: BiScrollers.BiScroller,
actionArea: Viewer, -- the inner viewer of a BiScroller
feedback: FeedbackData, -- the textual feedback region (see Feedback.mesa)
height: CARDINAL ← 0,
yBounded: LIST OF Viewer ← NIL, -- used in GGContainerImpl for viewer resizing.
xBounded: LIST OF Viewer ← NIL,
originalWDir: Rope.ROPE,
currentWDir: Rope.ROPE,
mouseMode: ATOM, -- mouseMode and state together form a hierarchical name space of states.
state: ATOM, -- as in mouseMode/state
scene: Scene, -- the collection of objects we are looking at.
caret: Caret,
anchor: Caret,
camera: CameraData,
drag: DragData,
refresh: RefreshData,
hitTest: Filters,
measure: MeasureData,
debug: DebugData,
defaults: DefaultData,
slackHandle: SlackProcess.SlackHandle,
touching: LIST OF TouchGroup,
aborted: PACKED ARRAY AbortFlags OF BOOL ← ALL[FALSE], -- has the Abort button been pushed recently?
gravityPool: REF ANY, -- temporary storage pool for GGGravity
multiGravityPool: REF ANY -- temporary storage pool for GGMultiGravity
];
Hit Testing
TriggerBag: TYPE = REF TriggerBagObj;
TriggerBagObj:
TYPE =
RECORD [
outlines: LIST OF FeatureData,
slices: LIST OF FeatureData,
intersectionPoints: LIST OF FeatureData,
anchor: FeatureData
];
AlignBag: TYPE = REF AlignBagObj;
AlignBagObj:
TYPE =
RECORD [
slopeLines: LIST OF FeatureData,
angleLines: LIST OF FeatureData,
radiiCircles: LIST OF FeatureData,
distanceLines: LIST OF FeatureData,
midpoints: LIST OF FeatureData,
intersectionPoints: 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
];
END.