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; GargoyleContainer: TYPE = Viewer; 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 ]; GravityType: TYPE = {strictDistance, innerCircle, sectors, none}; 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 ]; 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; 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]; 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 ]; 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}; ScalarButton: TYPE = RECORD [ name: Rope.ROPE, value: REAL, action: LIST OF REF ANY, init: StateType]; 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}; 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]; 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]; GraphicsState: TYPE = REF GraphicsStateObj; GraphicsStateObj: TYPE = RECORD [ button: ViewerClasses.Viewer _ NIL, value: REAL, clientData: REF ANY, atom: ATOM ]; ScalarButtonClient: TYPE = REF ScalarButtonClientObj; ScalarButtonClientObj: TYPE = RECORD [ button: TiogaButtons.TiogaButton, value: REAL, action: LIST OF REF ANY, on: BOOL, next: ScalarButtonClient, gargoyleData: GargoyleData ]; END. &GGInterfaceTypes.mesa Last edited by: Eric Bier on October 1, 1985 5:12:37 pm PDT Copyright c 1985 by Xerox Corporation. All rights reserved. Contents: Types used by the Gargoyle interface level. Gargoyle Viewer See GGSelect.SelectJoint and GGSelect.SelectJointToJoint. For GGGravity For GargoyleData e.g. when a new selection is made, the old selected objects must be updated. This box bounds the old selected objects. 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. The Slack Process PaintQueue's are managed by GGDrawProcess. (Action Queue would be a better name). Buttons and Menus Two State Scalar Enumerated Type Menu List Button List Graphics Button Tioga Buttons Κ θ˜Ihead1™J™;Jšœ Οmœ1™NšœŸ˜,NšœžœŸ`˜vNšœ˜Nšœ œ˜ Nšœ œ˜Nšœ œ˜Nšœ   œ˜Nšœ   œ˜Nšœ œ˜Nšœ  œ˜Nšœ   œ˜Nšœ žœžœ ˜Nšœ žœžœŸ-˜CJšœ˜J˜—šΟn œžœžœ˜-N™—™N™R—Nšœžœ˜Nšœ žœžœ˜%šœžœžœ˜Nšœžœ˜Nšœžœ˜Nšœžœ˜Nšœ˜Nšœ žœžœžœ˜5Nšœžœžœ˜)N˜N˜—K™Icode™ O™Ošœ žœžœ ˜!šœ žœžœ˜Ošœžœ˜Ošœ˜Ošœžœ˜Ošœ žœž˜Ošœ˜—Ošœ žœ˜O™O™šœžœžœ˜Ošœ žœ˜Ošœžœ˜ Oš œžœžœžœžœ˜Ošœ˜O˜—O™O™Ošœ žœžœ ˜$šœ žœžœ˜Ošœžœ˜ OšœžœŸ3˜UOšœžœŸk˜|OšœžœŸ˜$Ošœ˜OšœžœŸ6˜VOšœžœŸ$˜=Ošœ žœžœžœŸ`˜zOšœ˜—N˜Oš œ žœžœžœžœ˜%Ošœ žœ˜.Ošœžœ4˜FO˜O™ N˜šœ žœžœ˜Nšœ žœ˜Nšœ˜Nšœ žœžœžœ˜—šœžœžœ˜ Nšœ žœ˜Nš œžœžœžœžœ˜Nšœ žœžœžœ˜—O™O™ O™Nšœ žœ˜)šœžœžœ˜ Nšœ žœ˜N˜Nš œžœžœžœžœ˜Nšœžœ˜Nšœžœ˜ Nšœžœž˜N˜—šœžœžœ˜Nšœ žœ˜N˜Nšœžœ˜Nšœ˜Nšœžœ˜ Nšœžœž˜N˜—N˜Nšœžœžœ˜)šœžœžœ˜ NšœžœžœŸ!˜9Nšœžœžœžœž˜N˜—Nš ‘ œžœžœ žœžœžœ˜ON˜N™N™Jšœžœžœ˜+šœžœžœ˜!Ošœžœ˜#Ošœžœ˜ Ošœ žœžœ˜Ošœž˜ šœ˜O˜——N™N™ N˜Nšœžœžœ˜5šœžœžœ˜&N˜!Nšœžœ˜ Nš œžœžœžœžœ˜Nšœžœ˜ Nšœ˜N˜N˜—J˜Jšžœ˜—…—8'F