VCF::UndoRedoStack Class Reference
stack class managing any undo redo operation. More...
#include <vcf/ApplicationKit/UndoRedoStack.h>
Inheritance diagram for VCF::UndoRedoStack:

Public Member Functions | |
| UndoRedoStack () | |
| virtual | ~UndoRedoStack () |
| virtual void | undo () |
| undoes the last command. | |
| virtual void | redo () |
| redoes the last command ( undoes the previous undo ). | |
| virtual bool | hasUndoableItems () |
| tells if there is any undo item in the stack. | |
| virtual bool | hasRedoableItems () |
| tells if there is any redo item in the stack. | |
| virtual void | addCommand (Command *command, const bool &autoExecute=true) |
| adds a command to the undo stack and clears the redo stack. | |
| virtual Command * | getCurrentUndoCommand () |
| gets the first command to undo. | |
| virtual Command * | getCurrentRedoCommand () |
| gets the first command to redo. | |
| void | clearCommands () |
| clears both the undo/redo stacks. | |
Public Attributes | |
| VCF::Delegate | UndoCommand |
| Used if the user desires to bypass the default behaviour of this UndoRedoStack instance. | |
| VCF::Delegate | RedoCommand |
| Used if the user desires to bypass the default action of this UndoRedoStack instance. | |
| VCF::Delegate | StackCleared |
| to be notified that the stack is going to be be cleared. | |
| VCF::Delegate | StackChanged |
| to be notified that the stack has been changed. | |
| VCF::Delegate | ExecuteCommand |
| to be notified that a command has been executed. | |
Protected Member Functions | |
| void | movetToRedoStack (Command *command) |
| Unused. | |
Protected Attributes | |
| std::deque< Command * > | undoStack_ |
| the undo and redo internal stacks. | |
| std::deque< Command * > | redoStack_ |
Detailed Description
stack class managing any undo redo operation.It is possible to bypass the default undo redo behaviour of this class, without deriving form this class, through the use of its UndoCommand and RedoCommand delegates.
Constructor & Destructor Documentation
|
|
|
|
|
|
Member Function Documentation
|
||||||||||||
|
adds a command to the undo stack and clears the redo stack. By default this also executes the command.
|
|
|
clears both the undo/redo stacks.
|
|
|
gets the first command to redo.
|
|
|
gets the first command to undo.
|
|
|
tells if there is any redo item in the stack.
|
|
|
tells if there is any undo item in the stack.
|
|
|
Unused. MP ? |
|
|
redoes the last command ( undoes the previous undo ).
this default behaviour can be bypassed. |
|
|
undoes the last command.
this default behaviour can be bypassed. |
Member Data Documentation
|
|
to be notified that a command has been executed. This is called after the command has been added to the undo stack, and after the command has been executed |
|
|
Used if the user desires to bypass the default action of this UndoRedoStack instance. In this case the user needs to add an event handler to this delegate, and setAllowsRedo(false) inside this handler. |
|
|
|
|
|
to be notified that the stack has been changed. This is called afterward. |
|
|
to be notified that the stack is going to be be cleared. This is called foreward. |
|
|
Used if the user desires to bypass the default behaviour of this UndoRedoStack instance. In this case the user needs to add an event handler to this delegate, and setAllowsUndo(false) inside this handler. |
|
|
the undo and redo internal stacks.
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/UndoRedoStack.h
