<> <> <> <> <> DIRECTORY Pipal, PipalOps, RefTab; PipalEdit: CEDAR DEFINITIONS = BEGIN <> <> <> editorClass: Pipal.Class; <<>> Editor: TYPE = REF EditorRec; EditorRec: TYPE = RECORD [ object: Pipal.Object, state: Pipal.Object _ NIL, undoEvents: Events _ NIL, -- first undoable event head of list redoEvents: Events _ NIL]; -- first redoable event head of list Events: TYPE = LIST OF Event; Event: TYPE = REF EventRec; EventRec: TYPE = RECORD [ message: Pipal.ROPE, object: Pipal.Object, state: Pipal.Object _ NIL]; <> editMethod: Pipal.Method; EditProc: TYPE = PROC [object: Pipal.Object] RETURNS [editor: Editor _ NIL]; HasEdit: PROC [object: Pipal.Object] RETURNS [BOOL]; Edit: EditProc; < crash and burn.>> <<>> Path: TYPE = INT; <> <> <<>> EachEditableChildProc: TYPE = PROC [path: Path, child: Pipal.Object] RETURNS [quit: BOOL _ FALSE]; EnumerateEditableChildren: PROC [root: Pipal.Object, each: EachEditableChildProc] RETURNS [quit: BOOL _ FALSE]; <> <> <> <> <> <> <> <> <<>> popEvent: READONLY ATOM; <> <<>> BroadcastPop: PROC [editor: Editor]; <> <> CreateEditor: PROC [object: Pipal.Object, state: Pipal.Object _ NIL] RETURNS [editor: Editor]; <> DestroyEditor: PROC [editor: Editor]; <> <<>> Do: PROC [editor: Editor, message: Pipal.ROPE, newObject, newState: Pipal.Object]; <> <<>> ReplaceInEditor: PROC [editor: Editor, oldChild, newChild, newState: Pipal.Object]; <> <<>> ReplaceInPath: PROC [root: Pipal.Object, path: Path, oldChild, newChild: Pipal.Object] RETURNS [table: PipalOps.ReplaceTable]; <> <> <<>> NotifyReplace: PROC [editor: Editor]; <<-- BS ???? -->> <> <> <<>> <> <> <> <<>> CommandProc: TYPE = PROC [editor: Editor, arguments: LIST OF REF _ NIL, issuer: REF _ NIL, registrationData: REF _ NIL] RETURNS [resultType: ResultType _ none, result: Pipal.Object _ NIL]; <> <> <> <> <> <<>> ResultType: TYPE = {none, object, selectionArea, changedArea}; < result is NIL; display should display all >> < result is a Pipal.Object; e.g. the selection for copy between different editors>> < result is a PipalObject with an area message outlining the current selection>> < result is a PipalObject with an area message; display should display these areas>> <> RegisterCommand: PROC [class: Pipal.Class _ editorClass, name: ATOM, command: CommandProc, registrationData: REF _ NIL]; <> <<>> FetchCommand: PROC [editor: Editor, name: ATOM] RETURNS [command: CommandProc _ NIL, registrationData: REF _ NIL]; <, that command is returned.>> <, that command is returned.>> <> <<>> ApplyCommand: PROC [editor: Editor, name: ATOM, arguments: LIST OF REF _ NIL, issuer: REF _ NIL] RETURNS [resultType: ResultType _ none, result: Pipal.Object _ NIL]; <> <<>> <> Reset: PROC [editor: Editor]; <> <> Undo: PROC [editor: Editor]; <> <> <> Redo: PROC [editor: Editor]; <> <> <> Flush: PROC [editor: Editor]; <> <> <<>> END.