GGHistoryTypes.mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Pier, August 8, 1988 5:03:32 pm PDT
Bier, October 31, 1988 3:57:57 pm PST
A history event is a series of actions that are to be undone as a unit.
The event record contains sufficient information to undo the actions.
GGHistoryTypes: CEDAR DEFINITIONS = BEGIN
HistoryEvent: TYPE = REF HistoryEventObj;
HistoryEventObj: TYPE = RECORD [name: Rope.ROPE, index: INT, subevents: LIST OF SubEvent];
SubEvent: TYPE = REF SubEventObj;
SubEventObj:
TYPE =
RECORD [
historyProc: HistoryProc, -- proc which implements undo of this subevent
historyData: REF Change -- data for undo of this subevent
];
Change:
TYPE;
-- really GGHistory.Change. Avoids compilation dependencies.
this is opaque so GGModelTypes can rely on GGHistoryTypes
HistoryProc:
TYPE =
PROC [historyData:
REF Change, currentEvent: HistoryEvent];
procedure supplied by client to undo the effects of a particular subevent
HistoryToolObj:
TYPE;
-- really GGHistory.HistoryToolObj. Avoids compilation dependencies.
this is opaque so GGInterfaceTypes can rely on GGHistoryTypes
END.