<> <> <> <> DIRECTORY Pipal, RefTab; PipalModify: CEDAR DEFINITIONS = BEGIN <> <> <> World: TYPE = REF WorldRec; WorldRec: TYPE = RECORD [ object: Pipal.Object, state: REF _ NIL, undoEvents: Events _ NIL, -- first undoable event head of list redoEvents: Events _ NIL, -- first redoable event head of list selected: LIST OF Pipal.Object _ NIL -- must be children of the object ]; Event: TYPE = REF EventRec; EventRec: TYPE = RECORD [ message: Pipal.ROPE, object: Pipal.Object _ NIL, state: REF _ NIL ]; Events: TYPE = LIST OF Event; <> Undo: PROC [world: World]; Redo: PROC [world: World]; Reset: PROC [world: World]; <> Commit: PROC [world: World]; <> <<>> Do: PROC [world: World, message: Pipal.ROPE, newObject: Pipal.Object _ NIL, newState: REF _ NIL]; <> <> <> <<>> Reachable: PROC [root, candidate: Pipal.Object] RETURNS [BOOL]; <> <<>> ReachableFromRoots: PROC [roots: Pipal.Objects, candidate: Pipal.Object] RETURNS [BOOL]; <> <> replaceMethod: Pipal.Method; ReplaceProc: TYPE = PROC [parent: Pipal.Object, table: RefTab.Ref] RETURNS [newParent: Pipal.Object]; <> < [new child].>> < crash and burn.>> <> <<>> Replace: ReplaceProc; <> < crash and burn.>> <<>> TransitiveReplace: PROC [oldRoots: Pipal.Objects, table: RefTab.Ref] RETURNS [newRoots: Pipal.Objects]; <> <> ReplaceInWorld: PROC [world: World, oldChild, newChild: Pipal.Object _ NIL]; <> <<>> END.