2 * Copyright 2006-2012, Stephan Aßmus <superstippi@gmx.de>
3 * Distributed under the terms of the MIT License.
9 #include "UndoableEdit.h"
20 virtual void EditManagerChanged(
21 const EditManager
* manager
) = 0;
26 virtual ~EditManager();
28 status_t
Perform(UndoableEdit
* edit
,
29 EditContext
& context
);
30 status_t
Perform(const UndoableEditRef
& edit
,
31 EditContext
& context
);
33 status_t
Undo(EditContext
& context
);
34 status_t
Redo(EditContext
& context
);
36 bool GetUndoName(BString
& name
);
37 bool GetRedoName(BString
& name
);
43 bool AddListener(Listener
* listener
);
44 void RemoveListener(Listener
* listener
);
47 status_t
_AddEdit(const UndoableEditRef
& edit
);
49 void _NotifyListeners();
52 EditStack fUndoHistory
;
53 EditStack fRedoHistory
;
54 UndoableEditRef fEditAtSave
;
56 typedef List
<Listener
*, true, 4> ListenerList
;
57 ListenerList fListeners
;
60 #endif // EDIT_MANAGER_H