-- GEditViewer.mesa; Edited by McGregor on December 9, 1982 12:48 pm
DIRECTORY
GEditClasses USING [Class, ClassID, ClassRec, ControlPoint, Object, SelectionGrain],
Graphics USING [Context],
TextNode USING [Ref],
ViewerClasses USING [Viewer];
GEditViewer: DEFINITIONS = BEGIN OPEN GEditClasses;
GEditViewerData: TYPE = REF GEditViewerDataRec;
GEditViewerDataRec: TYPE = RECORD [ -- 4 words
root: TextNode.Ref,  -- the underlying graphics object nodes
vScroll: INTEGER ← 0, -- amount scrolled off the top
hScroll: INTEGER ← 0 -- amount scrolled off the left
];
Selection: TYPE = REF SelectionRec;
SelectionRec: TYPE = RECORD [
viewer: ViewerClasses.Viewer ← NIL, -- GEdit viewer containing the selection
data: GEditViewerData ← NIL,   -- Narrowed GEdit viewer data
objects: SelectedObject ← NIL,   -- linked list of top level objects selected
grain: SelectionGrain ← point,   -- control points or objects may be selected
displayed: BOOLFALSE,    -- selection points are highlighted on screen
caretX, caretY: INTEGER ← 0   -- control point
];
SelectedObject: TYPE = REF SelectedObjectRec;
SelectedObjectRec: TYPE = RECORD [
controlPoint: ControlPoint ← 0,
object: Object,
nextObject: SelectedObject
];
RegisterClass: PROC [flavor: ClassID, classInfo: ClassRec] RETURNS [class: Class] ;
FetchClass: PROC [flavor: ClassID] RETURNS [class: Class] ;
DrawControlPoint: PUBLIC PROC [context: Graphics.Context, x, y: INTEGER, marking: SelectionGrain] ;
END.