-- HistoryEvent.mesa
-- written by Bill Paxton, June 1981
-- last edit by Bill Paxton, 24-Jun-81 16:45:57

-- an event is a series of actions that are to be undone as a unit
-- the event record contains sufficient information to undo the actions

HistoryEvent: DEFINITIONS =
BEGIN

Ref: TYPE = REF EventBody;
EventBody: TYPE;

Create: PROC RETURNS [Ref];

Note: PROC [event: Ref, undoProc: PROC, undoRef: REF];

Undo: PROC [event: Ref] RETURNS [ok: BOOLEAN];
	-- returns false if event was previously undone
	-- otherwise, calls undoProc[undoRef] for each subevent 
	-- in reverse order that subevents originally happened

Start: PROC; -- initialization

END.