X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcomposite-undo-stack-observer.h;h=e24561ace61ca5467887c77fea9b2f2227ea4258;hb=7cdcd76996e5e33b0ce8bea84fa8dc68024ebdfb;hp=7b6b693b64848b4f58a0a692efc78fc81e3cece2;hpb=47231b67f16c39a979eadb64ac76cf44369a2b4d;p=inkscape.git diff --git a/src/composite-undo-stack-observer.h b/src/composite-undo-stack-observer.h index 7b6b693b6..e24561ace 100644 --- a/src/composite-undo-stack-observer.h +++ b/src/composite-undo-stack-observer.h @@ -34,7 +34,7 @@ public: /** * Structure for tracking UndoStackObservers. */ - struct UndoStackObserverRecord : public GC::Managed<> { + struct UndoStackObserverRecord { public: /** * Constructor. @@ -85,6 +85,26 @@ public: 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; }; @@ -134,6 +154,9 @@ public: */ 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);