.. index:: pair: class; EE::UI::UndoStack .. _doxid-class_e_e_1_1_u_i_1_1_undo_stack: class EE::UI::UndoStack ======================= .. toctree:: :hidden: enum_EE_UI_UndoStack_EventType.rst class_EE_UI_UndoStack_Event.rst class_EE_UI_UndoStack_EventCanRedoChanged.rst class_EE_UI_UndoStack_EventCanUndoChanged.rst class_EE_UI_UndoStack_EventCleanChanged.rst class_EE_UI_UndoStack_EventIndexChanged.rst class_EE_UI_UndoStack_EventRedoTextChanged.rst class_EE_UI_UndoStack_EventUndoTextChanged.rst .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class UndoStack: public :ref:`EE::NonCopyable` { public: // typedefs typedef :ref:`Uint32` :target:`EventId`; typedef std::function`*event)> :target:`EventCb`; // enums enum :ref:`EventType`; // classes class :ref:`Event`; class :ref:`EventCanRedoChanged`; class :ref:`EventCanUndoChanged`; class :ref:`EventCleanChanged`; class :ref:`EventIndexChanged`; class :ref:`EventRedoTextChanged`; class :ref:`EventUndoTextChanged`; // construction :target:`~UndoStack`(); // methods void :target:`clear`(); void :target:`push`(:ref:`UndoCommand`* cmd); bool :target:`canUndo`() const; bool :target:`canRedo`() const; std::string :target:`undoText`() const; std::string :target:`redoText`() const; int :target:`count`() const; int :target:`index`() const; std::string :target:`text`(int idx) const; bool :target:`isClean`() const; int :target:`cleanIndex`() const; void :target:`beginMacro`(const std::string& text); void :target:`endMacro`(); void :target:`setUndoLimit`(int limit); int :target:`undoLimit`() const; const :ref:`UndoCommand`* :target:`command`(int index) const; void :target:`setClean`(); void :target:`resetClean`(); void :target:`setIndex`(int idx); void :target:`undo`(); void :target:`redo`(); :ref:`EventId` :target:`addEventListener`(:ref:`EventType` type, :ref:`EventCb` cb); :ref:`EventId` :target:`on`(:ref:`EventType` type, :ref:`EventCb` cb); void :target:`removeEventListener`(:ref:`EventId` id); };