GriffinData.mesa
Last Edited by: Ken Pier, November 13, 1985 4:26:01 pm PST
DIRECTORY
GriffinDisplay USING [BkgndColor],
GriffinInput USING [InputData, InputEventProc],
GriffinKernel USING [ClipBox, DataRec],
GriffinMenu USING [MenuHandle, MenuItemHandle],
GriffinObject USING [Object, ObjectHandle, View],
GriffinRefresh USING [Frame],
GriffinStyle USING [StyleHandle],
Imager USING [],
Menus USING [MouseButton],
Rope USING [ROPE],
ViewerClasses USING [Viewer];
GriffinData: CEDAR DEFINITIONS = BEGIN
This is the concrete representation of an opaque type defined in GriffinKernel. The DataRec contains state that Griffin modules need to operate.
A DataRec contains viewer-specific and objects-specific information needed by many of the procedures in Griffin. The theory is that since everything in Griffin is stimulated by a ButtonProc or a NotifyProc, it is always possible to hang the Data reference on the viewer instance as viewer.data, then to pass along the Data everywhere it is needed. The cost of copying the Data REF is negligible compared to the procedure overhead.
ROPE: TYPE = Rope.ROPE;
Data: TYPE = REF DataRec;
DataRec: TYPE = PUBLIC MONITORED RECORD [
viewer: ViewerClasses.Viewer ← NIL, -- the viewer for which this record is data. From Viewer
currentWD, currentName, storeName: ROPENIL,
handler: GriffinInput.InputEventProc ← NIL,
clipBox: GriffinKernel.ClipBox ← NIL,
headObject: GriffinObject.ObjectHandle ← NIL, -- bottom object
tailObject: GriffinObject.ObjectHandle ← NIL, -- top object
currentView: GriffinObject.View ← main,
eraseFrames: LIST OF GriffinRefresh.Frame ← NIL,
markFrames: LIST OF GriffinRefresh.Frame ← NIL,
menuButtons: MenuButtonRec ← [],
colorMenu: GriffinMenu.MenuHandle ← NIL, -- from ControllerMenu
lineColorMenu: GriffinMenu.MenuHandle ← NIL, -- from ControllerMenu
textMenu: GriffinMenu.MenuHandle ← NIL, -- from ControllerMenu
centerMenu: GriffinMenu.MenuHandle ← NIL, -- from ControllerMenu
typeMenu: GriffinMenu.MenuHandle ← NIL, -- from ControllerMenu
fontMenu: GriffinMenu.MenuHandle ← NIL, -- from ControllerMenu
thickMenu: GriffinMenu.MenuHandle ← NIL, -- from ControllerMenu
colorControlMenu: GriffinMenu.MenuHandle ← NIL, -- from ControllerMenu
fontItem: GriffinMenu.MenuItemHandle ← NIL, -- from ControllerMenu
editMenu: GriffinMenu.MenuHandle ← NIL, -- from Draw
styleMenu: GriffinMenu.MenuHandle ← NIL,-- from Draw
shapeMenu: GriffinMenu.MenuHandle ← NIL,-- from Draw
splineMenu: GriffinMenu.MenuHandle ← NIL,-- from Draw
showstyle: GriffinMenu.MenuItemHandle ← NIL,-- from Draw
viewMenu: GriffinMenu.MenuHandle ←NIL, -- from Figure
objectMenu: GriffinMenu.MenuHandle ← NIL, -- from ObjectOps
overlapMenu: GriffinMenu.MenuHandle ← NIL, -- from ObjectOps
xformMenu: GriffinMenu.MenuHandle ← NIL, -- from ObjectOps
copy: GriffinMenu.MenuItemHandle ← NIL, -- from ObjectOps
messageMenu: GriffinMenu.MenuHandle ← NIL, -- from UserMessage
messageItem: GriffinMenu.MenuItemHandle ← NIL, -- from UserMessage
currentStyle: GriffinStyle.StyleHandle ← NIL,
styleNumber: INT ← 0,
newObj: REF GriffinObject.Object[shape] ← NIL,
gridsOn: BOOLEANFALSE,
oldVersion: BOOLEANFALSE,
bkgndColor: GriffinDisplay.BkgndColor ← NIL,
inputData: REF GriffinInput.InputData ← NIL
condition: CONDITION,
firstEvent: GriffinInput.InputEventRef, -- from Input. first event in event chain
lastEvent: GriffinInput.InputEventRef, -- from Input. last event in event chain
downStroke: GriffinInput.InputEvent , -- from Input
menuItem: GriffinMenu.MenuItemHandle,
aborted, mouseDown, overSameItem: BOOL
];
MenuButtonRec: TYPE = RECORD [
mouseButton: Menus.MouseButton ← red,
shift, control: BOOLFALSE
];
END.