This class describes an undo stack.
Public Member Functions | |
SB_DECLARE_DATA (SBCUndoStack) | |
Public Attributes | |
SBCUndoStackData * | dataPointer |
SBCUndoStack () | |
Default constructor. More... | |
virtual | ~SBCUndoStack () |
Destructor. | |
bool | isHolding () const |
Storing commands. More... | |
void | beginHolding (const std::string &name) |
Begins holding. | |
void | disableHolding () |
Pauses holding. | |
void | enableHolding () |
Resumes holding. | |
void | endHolding () |
Ends holding. | |
void | beginUndoCommandGroup (const std::string &name) |
Begins a new command group to the current command group. | |
void | endUndoCommandGroup () |
Ends a new command group to the current command group. | |
void | hold (SBCUndoCommand *undoCommand) |
Adds a new command to the current command group. | |
void | hold (void *object) |
Holds an object allocated on the heap. | |
void | hold (SBPointerTarget *pointerTarget) |
Holds a pointer target allocated on the heap. | |
void | holdArray (void *array) |
Holds an array allocated on the heap. | |
void | undo () |
Undo and redo. More... | |
void | redo () |
Redo one command. | |
void | disableUndoRedo () |
Disables undo and redo. | |
void | enableUndoRedo () |
Enables undo and redo. | |
unsigned int | getDisablingUndoRedoCounter () |
Returns the counter for disabling undo and redo. | |
bool | isUndoing () const |
Returns true while undoing. | |
bool | isRedoing () const |
Returns true while redoing. | |
Messaging | |
void | connectUndoSignalToSlot (SBCReferenceTarget *observer, void(SBCReferenceTarget::*functionPointer)(SBCUndoEvent *)) |
bool | undoSignalIsConnectedToSlot (SBCReferenceTarget *observer, void(SBCReferenceTarget::*functionPointer)(SBCUndoEvent *)) const |
void | disconnectUndoSignalFromSlot (SBCReferenceTarget *observer, void(SBCReferenceTarget::*functionPointer)(SBCUndoEvent *)) |
Debugging | |
virtual void | print (unsigned int offset=0) const |
GUI | |
void | clear () |
SBCContainerVector< SBCUndoCommand * > * | getCommandVector () const |
unsigned int | getNextRedoIndex () const |
SBCUndoStack::SBCUndoStack | ( | ) |
Constructors and destructors. All these fonctions are private to enforce the singleton's uniqueness.
bool SBCUndoStack::isHolding | ( | ) | const |
Returns true while holding
void SBCUndoStack::undo | ( | ) |
Undo one command