<> <> <> <> <<>> 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]; <<>> <