GGInterfaceTypes.mesa
Last edited by: Eric Bier on January 14, 1987 5:33:52 pm PST
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Contents: Types used by the Gargoyle interface level.
Pier, November 21, 1986 10:47:09 am PST
DIRECTORY
BiScrollers, Buttons, GGBasicTypes, GGButtons, GGCircleCache, GGModelTypes, GGSegmentTypes, Imager, ImagerBackdoor, ImagerPixelMap, 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;
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: BOOLFALSE,
point: Point ← [0.0,0.0],
chair: REF ANYNIL, -- an OutlineDescriptor or SliceDescriptor
attractor: REF ANYNIL, -- an OutlineDescriptor or SliceDescriptor
onOverlay: BOOLFALSE
];
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 ← NIL,
sliceToExtend: SliceDescriptor ← NIL
];
RefreshData: TYPE = RECORD [
suppressRefresh: BOOLFALSE,
paintAction: ATOM,
showColors: GGButtons.TwoState,
screenStyle: GGButtons.EnumTypeRef,
alignments: GGButtons.TwoState,
following bitmaps/pixelmaps are resized whenever window changes size
foregroundBitmap: ImagerBackdoor.Bitmap ← NIL,
foregroundPixelMap: ImagerPixelMap.PixelMap,
foregroundContext: Imager.Context ← NIL, -- derived from foregroundBitmap
foregndBitmapOK: BOOLFALSE,
backgroundBitmap: ImagerBackdoor.Bitmap ← NIL,
backgroundPixelMap: ImagerPixelMap.PixelMap,
backgroundContext: Imager.Context ← NIL, -- derived from background map
backgndBitmapOK: BOOLFALSE,
chunkingBitmap: ImagerBackdoor.Bitmap ← NIL,
chunkingPixelMap: ImagerPixelMap.PixelMap,
chunkingContext: Imager.Context ← NIL, -- derived from chunking map
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 ANYNIL, -- used to implement GGRefresh.FinishedAdding
recentFeature: FeatureData ← NIL, -- maintained by DuringSelect routines. Most recently hit feature. Could be used for refresh optimization of ExtendSelection.
startBoundBox: BoundBox ← NIL,
e.g. when a new selection is made, the old selected objects must be updated. This box bounds the old selected objects.
textInProgress: Slice ← NIL -- 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
];
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
currentTriggerBag: TriggerBag,
currentObjectBag: ObjectBag,
sceneTriggerBag: TriggerBag,
hitCount: NAT ← 0,
gravityType: GravityType,
gravityTypeMenu: GGButtons.EnumTypeRef, -- initialized in GGWindowImpl
gravityExtentButton: GraphicsState,
gravButton: GGButtons.TwoState,
midpointButton: GGButtons.TwoState,
heuristicsButton: GGButtons.TwoState,
slopeHeader: GGButtons.ScalarButtonHandle,
slopeCount: NAT ← 0,
slopeText: Viewer,
angleHeader: GGButtons.ScalarButtonHandle,
angleCount: NAT ← 0,
angleText: Viewer,
radiusHeader: GGButtons.ScalarButtonHandle,
radiusCount: NAT ← 0,
radiusText: Viewer,
radiusCircleCache: GGCircleCache.Cache,
distanceHeader: GGButtons.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)
];
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,
typescriptIn: IO.STREAM,
typescriptOut: IO.STREAM,
lastMessage: Rope.ROPENIL,
logFileName: Rope.ROPE,
logStream: IO.STREAM
];
SelectionClass: TYPE = GGSegmentTypes.SelectionClass;
AbortFlags: TYPE = {refresh, playback, gravitytest, bags, spare2, spare3};
GargoyleData: 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 ← NIL,
biScroller: BiScrollers.BiScroller,
actionArea: Viewer ← NIL, -- the inner viewer of a BiScroller
feedback: Viewer ← NIL, -- the textual feedback region (a label)
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,
slackHandle: SlackProcess.SlackHandle,
touching: LIST OF TouchGroup,
aborted: PACKED ARRAY AbortFlags OF BOOLALL[FALSE], -- has the Abort button been pushed recently?
gravityPool: REF ANY, -- temporary storage pool for GGGravity
multiGravityPool: REF ANY -- temporary storage pool for GGMultiGravity
];
Graphics Button
GraphicsState: TYPE = REF GraphicsStateObj;
GraphicsStateObj: TYPE = RECORD [
button: ViewerClasses.Viewer ← NIL,
value: REAL,
clientData: REF ANY,
atom: ATOM
];
Hit Testing
TriggerBag: TYPE = REF TriggerBagObj;
TriggerBagObj: TYPE = RECORD [
outlines: LIST OF FeatureData,
slices: LIST OF FeatureData,
intersectionPoints: LIST OF FeatureData,
anchor: FeatureData
];
ObjectBag: TYPE = REF ObjectBagObj;
ObjectBagObj: 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
];
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,
curve1: FeatureData,
curve2: FeatureData
];
SequencePart: TYPE = REF SequencePartObj;
SequencePartObj: TYPE = RECORD [
segNum, jointNum, controlPointNum: INT
];
END.