GGInterfaceTypes.mesa
Last edited by: Eric Bier on October 1, 1985 5:12:37 pm PDT
Copyright © 1985 by Xerox Corporation. All rights reserved.
Contents: Types used by the Gargoyle interface level.
DIRECTORY
Buttons, GGModelTypes, Imager, ImagerBackdoor, ImagerTransformation, Menus, Rope, TiogaButtons, ViewerClasses;
GGInterfaceTypes: CEDAR DEFINITIONS =
BEGIN
BoundBox: TYPE = GGModelTypes.BoundBox;
Camera: TYPE = GGModelTypes.Camera;
Line: TYPE = GGModelTypes.Line;
Outline: TYPE = GGModelTypes.Outline;
Point: TYPE = GGModelTypes.Point;
Scene: TYPE = GGModelTypes.Scene;
Sequence: TYPE = GGModelTypes.Sequence;
TouchGroup: TYPE = GGModelTypes.TouchGroup;
Traj: TYPE = GGModelTypes.Traj;
Vector: TYPE = GGModelTypes.Vector;
Viewer: TYPE = ViewerClasses.Viewer;
Gargoyle Viewer
GargoyleContainer:
TYPE = Viewer;
See GGSelect.SelectJoint and GGSelect.SelectJointToJoint.
Caret: TYPE = REF CaretObj;
CaretObj:
TYPE =
RECORD [
exists: BOOL ← FALSE,
point: Point ← [0.0,0.0],
chair: Traj ← NIL, -- the trajectory on which the caret is sitting
chairJointNum: NAT ← 122, -- an unlikely initial value, to aid debugging
chairSegNum: NAT ← 123, -- an unlikely initial value, to aid debugging
chairOnJoint: BOOL,
attractor: Traj ← NIL, -- the caret's current infatuation
attractorJointNum: NAT ← 122, -- an unlikely initial value, to aid debugging
attractorSegNum: NAT ← 123, -- an unlikely initial value, to aid debugging
attractorOnJoint: BOOL,
seq: Sequence ← NIL, -- the segment being add (see GGMouseEvent.EndAdd).
onOverlay: BOOL ← FALSE
];
For GGGravity
GravityType: TYPE = {strictDistance, innerCircle, sectors, none};
For GargoyleData
DragData:
TYPE =
RECORD [
startPoint: Point ← [0.0, 0.0],
transform: ImagerTransformation.Transformation
];
RefreshData:
TYPE =
RECORD [
suppressRefresh: BOOL ← FALSE,
paintAction: ATOM,
doubleBuffer: TwoState,
backgroundBitmap: ImagerBackdoor.Bitmap, -- resized whenever window changes size
backgroundContext: Imager.Context, -- derived from backgroundBitmap
chunkingBitmap: ImagerBackdoor.Bitmap, -- resized whenever window changes size
chunkingContext: Imager.Context, -- derived from chunkingBitmap
spotPoint: Point ← [0.0, 0.0], -- For Gravity Testing
hitPoint: Point ← [0.0, 0.0], -- For Gravity Testing
overlayList: LIST OF REF ANY,
startBoundBox: BoundBox
e.g. when a new selection is made, the old selected objects must be updated. This box bounds the old selected objects.
];
MaxSlopes: NAT = 12;
MaxRadii: NAT = 7;
HitTestData:
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
environ: REF ANY, -- to prevent compilation dependencies
hitCount: NAT ← 0,
gravityType: GravityType,
gravityTypeMenu: EnumTypeRef, -- initialized in GGWindowImpl
gravityExtentButton: GraphicsState,
slopeHeaderButton: Viewer,
slopeButtons: ScalarButtonClient,
slopeCount: NAT ← 0,
slopeText: Viewer,
radiusHeaderButton: Viewer,
radiusButtons: ScalarButtonClient,
radiusCount: NAT ← 0,
radiusText: Viewer,
distanceHeaderButton: Viewer,
distanceButtons: ScalarButtonClient,
distanceCount: NAT ← 0,
distanceText: Viewer,
colinearLinesState: TwoState,
linesAlwaysOn: TwoState,
responsibleFor: Sequence
];
DistanceLineData:
TYPE =
RECORD [
oldCaret: Viewer,
newCaret: Viewer,
distance: Viewer -- a text viewer
];
DebugData:
TYPE =
RECORD [
typescript: Viewer
];
SelectionClass: TYPE = {normal, copy, hot, active};
SelectedData:
TYPE =
RECORD [
normal: LIST OF REF ANY ← NIL,
copy: LIST OF REF ANY ← NIL,
hot: LIST OF REF ANY ← NIL,
active: LIST OF REF ANY ← NIL
];
ExtendMode: TYPE = {controlPoint, joint, segment, traj, outline, cluster};
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,
actionArea: Viewer ← NIL,
height: CARDINAL ← 0,
yBounded: LIST OF Viewer ← NIL, -- used in GGContainerImpl for viewer resizing.
xBounded: LIST OF Viewer ← NIL,
originalWorkingDirectory: Rope.ROPE,
scene: Scene, -- the collection of objects we are looking at.
camera: Camera, -- a translation and scaling
currentAction: ATOM, -- catches cases like the user clicking down SHIFT while moving the mouse (see GGMouseEventImpl)
extendMode: ExtendMode ← joint,
caret: Caret,
anchor: Caret,
drag: DragData,
refresh: RefreshData,
hitTest: HitTestData,
distanceLine: DistanceLineData,
debug: DebugData,
selected: SelectedData,
touching: LIST OF TouchGroup,
aborted: BOOL ← FALSE -- has the Abort button been pushed recently?
];
ImagerProc:
TYPE =
PROC [dc: Imager.Context];
The Slack Process
PaintQueue's are managed by GGDrawProcess. (Action Queue would be a better name).
PaintQueueMax: NAT = 100;
PaintQueue: TYPE = REF PaintQueueObj;
PaintQueueObj:
TYPE =
RECORD [
head: NAT ← 0,
tail: NAT ← 0,
size: NAT ← PaintQueueMax,
gargoyleData: GargoyleData,
actions: ARRAY [0..PaintQueueMax] OF LIST OF REF ANY,
points: ARRAY [0..PaintQueueMax] OF Point
];
Buttons and Menus
Two State
TwoState: TYPE = REF TwoStateObj;
TwoStateObj:
TYPE =
RECORD [
button: Buttons.Button ← NIL,
state: StateType ← off,
action: LIST OF REF ANY,
clientData: REF ANY
];
StateType: TYPE = {off, on};
Scalar
ScalarButton:
TYPE =
RECORD [
name: Rope.ROPE,
value: REAL,
action: LIST OF REF ANY,
init: StateType];
Enumerated Type
EnumTypeRef: TYPE = REF EnumTypeRec;
EnumTypeRec:
TYPE =
RECORD [
atom: ATOM,
namesOfButtons: ButtonList ← NIL, -- list of names of buttons in this Enumerated type
nextx: CARDINAL, -- next x position in container that client may begin displaying info so that it wont overwrite the buttons
nexty: CARDINAL, -- similar to nextx
type: DisplayStyle,
buttonOn: Buttons.Button ← NIL, -- the button currently on for a given enumerated type
flipLabel: Viewer ← NIL, -- points to the Viewer to re-label
clientdata: REF ANY ← NIL -- optional data provided by the client and used when the selection notifier procedure is called
];
ButtonList: TYPE = LIST OF Rope.ROPE;
StyleChoice: TYPE = {menuSelection, flipThru};
DisplayStyle: TYPE = {menuStyle, flipThruWithTitle, flipThruNoTitle};
Menu List
MenuEntry:
TYPE =
RECORD [
name: Rope.ROPE,
proc: Menus.ClickProc,
confirmProc: REF ANY ← NIL];
QueuedMenuEntry:
TYPE =
RECORD [
name: Rope.ROPE,
action: LIST OF REF ANY,
confirmProc: REF ANY ← NIL];
Button List
ButtonType: TYPE = {button, label, text};
ButtonLineEntry:
TYPE =
RECORD [
name: Rope.ROPE,
type: ButtonType,
action: LIST OF REF ANY,
updateProc: UpdateProc ← NIL,
ww: NAT ← 0,
border: BOOL ← FALSE
];
PopUpLineEntry:
TYPE =
RECORD [
name: Rope.ROPE,
type: ButtonType,
updateProc: UpdateProc ← NIL,
proc: Menus.ClickProc,
ww: NAT ← 0,
border: BOOL ← FALSE
];
GGButtonData: TYPE = REF GGButtonDataObj;
GGButtonDataObj:
TYPE =
RECORD [
gargoyleData: REF ANY, -- compilation dependencies again
action: LIST OF REF ANY
];
UpdateProc: TYPE = PROC [name: Rope.ROPE, clientData: REF ANY, button: Viewer];
Graphics Button
GraphicsState: TYPE = REF GraphicsStateObj;
GraphicsStateObj:
TYPE =
RECORD [
button: ViewerClasses.Viewer ← NIL,
value: REAL,
clientData: REF ANY,
atom: ATOM
Tioga Buttons
ScalarButtonClient: TYPE = REF ScalarButtonClientObj;
ScalarButtonClientObj:
TYPE =
RECORD [
button: TiogaButtons.TiogaButton,
value: REAL,
action: LIST OF REF ANY,
on: BOOL,
next: ScalarButtonClient,
gargoyleData: GargoyleData
];
END.