<> <> <> DIRECTORY Rosary USING [ROSARY], Tioga; TiogaPrivate: CEDAR DEFINITIONS ~ BEGIN OPEN Tioga; ROSARY: TYPE ~ Rosary.ROSARY; <> CheckFailed: ERROR; Check: PROC [node: Node]; <> CheckRope: PROC [rope: ROPE]; CheckRuns: PROC [runs: Runs]; Verify: PROC [node: Node]; <<... called to verify that a Tioga tree structure is valid. If a problem is discovered, an exit to the debugger with an error message and locale is taken.>> <<>> <> <> RefBool: PROC [BOOL] RETURNS [REF BOOL]; <> PutProp: PROC [n: Node, name: ATOM, value: REF]; <> RemProp: PROC [n: Node, name: ATOM]; <> <> <<>> DeclarePropertyAttribute: PROC [name: ATOM, attribute: ATOM]; <> Is: PROC [name: ATOM, attribute: ATOM] RETURNS [BOOL]; <> GetPropertyAttributes: PROC [name: ATOM] RETURNS [LIST OF ATOM]; <> <<>> SetPropertyAttributes: PROC [name: ATOM, attributes: LIST OF ATOM]; <> <<>> <> AddrsProp: PROC RETURNS [ATOM]; PutTextAddr: PROC [n: Node, addr: REF, location: INT, pin: BOOL _ FALSE]; <> <> <> RemTextAddr: PROC [n: Node, addr: REF]; <> <> PinTextAddr: PROC [n: Node, addr: REF]; <> UnpinTextAddr: PROC [n: Node, addr: REF]; UnpinAllAddrs: PROC [n: Node]; MoveTextAddr: PROC [from, to: Node, addr: REF, location: INT]; <> <> GetTextAddr: PROC [n: Node, addr: REF] RETURNS [node: Node, location: INT]; <> <> TryGetTextAddr: PROC [n: Node, addr: REF] RETURNS [found: BOOL, node: Node, location: INT]; TextAddrNotFound: ERROR; MapTextAddrs: PROC [n: Node, action: TextAddrsAction] RETURNS [BOOL]; <> <> <> TextAddrsAction: TYPE = PROC [addr: REF, location: INT] RETURNS [BOOL]; <> AddAddrNotifyProc: PROC [proc: AddrNotifyProc]; RemoveAddrNotifyProc: PROC [proc: AddrNotifyProc]; AddrNotifyProc: TYPE = PROC [node: Node, new: PROC [old: INT] RETURNS [INT]]; <> AddrReplace: PROC [node: Node, start, len, newlen: INT]; <> <> <> <> AfterReplace: PROC [initLoc, start, len, newlen: INT] RETURNS [newLoc: INT]; <> <> ChangeType: TYPE = { ChangingView, ChangingText, ChangingTextForPaste, ChangingSpanForPaste, ChangingFormat, ChangingProp, MovingNodes, NodeNesting, InsertingNode }; Change: TYPE = RECORD [SELECT kind: ChangeType FROM ChangingView => [ viewer: REF, old: Location ], ChangingText => [ root: Node, text: Node, start, newlen, oldlen: INT, oldRope: ROPE, oldRuns: Runs, oldCharSets: ROSARY, oldCharProps: ROSARY ], ChangingTextForPaste => [ rope: ROPE, runs: Runs, charSets: ROSARY, charProps: ROSARY, start, len: INT ], ChangingSpanForPaste => [ span: Span ], ChangingFormat => [ -- change format for node root: Node, node: Node, newFormatName, oldFormatName: ATOM ], ChangingProp => [ -- change property for node root, node: Node, propName: ROPE, propAtom: ATOM, newval, oldval: REF ], MovingNodes => [ destRoot, sourceRoot: Node, dest, first, last, pred: Node, nesting: INTEGER, afterDest: BOOL ], <> <> NodeNesting => [ -- change nesting of nodes [first..last] root, first, last: Node, change: INTEGER ], InsertingNode => [ -- insert new node after dest root, new, dest: Node ], ENDCASE ]; <> ChangeSet: TYPE = PACKED ARRAY ChangeType OF Flag; Flag: TYPE = BOOL _ FALSE; defaultChangeSet: ChangeSet = ALL[TRUE]; EditNotifyProc: TYPE = PROC [change: REF READONLY Change]; When: TYPE = { before, after }; <> Priority: TYPE = { high, normal, low }; <> <> <> <> AddEditNotifyProc: PROC [world: World, proc: EditNotifyProc, time: When _ after, priority: Priority _ normal, changeSet: ChangeSet _ defaultChangeSet]; <> <> <> <> RemoveEditNotifyProc: PROC [world: World, proc: EditNotifyProc, time: When _ after]; <> EditNotify: PROC [world: World, change: REF READONLY Change, time: When]; <> <> Event: TYPE = REF EventBody; EventBody: TYPE = RECORD [subevents: SubEvent]; SubEvent: TYPE = REF SubEventBody; SubEventBody: TYPE = RECORD [ next: SubEvent, undoProc: UndoProc, undoRef: REF Change ]; UndoProc: TYPE ~ PROC [world: World, undoRef: REF Change]; <> CreateEvent: PROC RETURNS [Event]; NoteEvent: PROC [world: World, undoProc: UndoProc, undoRef: REF Change]; < to list of subevents>> UndoEvent: PROC [world: World, undoEvent: Event]; <> <> <> ResetEvent: PROC [event: Event]; <> <> EmptyEvent: PROC [event: Event] RETURNS [BOOL]; <> <> Flatten: PROC [node: Node] RETURNS [BOOL]; <> <> <> EditNotifyData: TYPE ~ REF EditNotifyDataRep; EditNotifyDataRep: TYPE; -- see EditNotifyImpl World: TYPE ~ REF WorldRep; WorldRep: TYPE ~ RECORD [ editNotify: EditNotifyData, currentEvent: Event, paste: REF Change.ChangingSpanForPaste, afterMoved1, afterMoved2: Location ]; END.