index 7b6b693b64848b4f58a0a692efc78fc81e3cece2..cd00d421115f8274b2861699d2957e281dfc3b8f 100644 (file)
/**
* Structure for tracking UndoStackObservers.
*/
- struct UndoStackObserverRecord : public GC::Managed<> {
+ struct UndoStackObserverRecord {
public:
/**
* Constructor.
this->_observer.notifyUndoCommitEvent(log);
}
+ /**
+ * Issue a clear undo event to the UndoStackObserver
+ * that is associated with this
+ * UndoStackObserverRecord.
+ */
+ void issueClearUndo()
+ {
+ this->_observer.notifyClearUndoEvent();
+ }
+
+ /**
+ * Issue a clear redo event to the UndoStackObserver
+ * that is associated with this
+ * UndoStackObserverRecord.
+ */
+ void issueClearRedo()
+ {
+ this->_observer.notifyClearRedoEvent();
+ }
+
private:
UndoStackObserver& _observer;
};
*/
CompositeUndoStackObserver();
- ~CompositeUndoStackObserver();
+ virtual ~CompositeUndoStackObserver();
/**
* Add an UndoStackObserver.
*/
void notifyUndoCommitEvent(Event* log);
+ virtual void notifyClearUndoEvent();
+ virtual void notifyClearRedoEvent();
+
private:
// Remove an observer from a given list
bool _remove_one(UndoObserverRecordList& list, UndoStackObserver& rec);