13 #ifndef mitkLimitedLinearUndo_h
14 #define mitkLimitedLinearUndo_h
23 #pragma GCC visibility push(default)
24 #include <itkEventObject.h>
25 #pragma GCC visibility pop
43 itkFactorylessNewMacro(
Self);
60 virtual bool Undo(
int oeid);
74 virtual bool Redo(
int oeid);
149 std::size_t m_UndoLimit;
153 #pragma GCC visibility push(default)
166 #pragma GCC visibility pop
A linear undo model with one undo and one redo stack.
void SetUndoLimit(std::size_t limit) override
Sets a limit on the size of the undo history. If the limit is reached, the oldest undo items will be ...
~LimitedLinearUndo() override
bool UndoListEmpty() override
True, if UndoList is empty.
std::deque< UndoStackItem * > UndoContainer
unsigned int RemoveInvalidOperations() override
Removes invalid operations from the undo/redo stack. Iterates through m_UndoList and m_RedoList and r...
bool RedoListEmpty() override
True, if RedoList is empty.
std::size_t GetUndoLimit() const override
Gets the limit on the size of the undo history. The undo limit determines how many items can be store...
OperationEvent * GetLastOfType(OperationActor *destination, OperationType opType) override
Returns the last specified OperationEvent in Undo-list corresponding to the given values; if nothing ...
void Clear() override
Clears UndoList and RedoList.
void ClearList(UndoContainer *list)
bool Redo() override
Undoes the last changes.
bool SetOperationEvent(UndoStackItem *stackItem) override
virtual bool Undo(int oeid)
Undoes all changes until ObjectEventID oeid.
int GetLastGroupEventIdInList() override
Returns the GroupEventId of the top element in the OperationHistory.
bool Undo() override
Undoes the last changes.
std::deque< UndoStackItem * >::reverse_iterator UndoContainerRevIter
int GetLastObjectEventIdInList() override
Returns the ObjectEventId of the top element in the OperationHistory.
virtual bool Redo(int oeid)
Redoes all changes until ObjectEventID oeid.
void ClearRedoList() override
Clears the RedoList.
abstract class, that can be used by Undo to undo an operation.
Represents a pair of operations: undo and the according redo.
superclass for all UndoModels
Represents an entry of the undo or redo stack.
#define mitkClassMacro(className, SuperClassName)
Find image slices visible on a given plane.
itkEventMacroDeclaration(BoundingShapeInteractionEvent, itk::AnyEvent)