VCF::Command Class Reference
A Command represents an interface describing a single action, that is potentially undoable. More...
#include <vcf/ApplicationKit/Command.h>
Inheritance diagram for VCF::Command:

Public Member Functions | |
| virtual | ~Command () |
| virtual void | undo ()=0 |
| Undo the command. | |
| virtual void | redo ()=0 |
| redo the command. | |
| virtual void | execute ()=0 |
| execute the command. | |
| virtual UndoRedoStack * | getOwningStack ()=0 |
| returns the UndoRedoStack that owns this command. | |
| virtual void | setOwningStack (UndoRedoStack *stack)=0 |
| sets the owning UndoRedoStack for this command | |
| virtual String | getName ()=0 |
| The name of this command. | |
| virtual void | setName (const String &name)=0 |
| sets the name of this command | |
| virtual bool | isUndoable ()=0 |
| Is this command undoable ? | |
Detailed Description
A Command represents an interface describing a single action, that is potentially undoable.Commands are placed on the application wide UndoRedoStack object during the course of the application. Each command should represent a single user action like, typing text, or removing an item from a tree. The actual implementation will vary widely and will need whatever state variables are neccessary to both execute/redo the command, and undo the command.
Constructor & Destructor Documentation
|
|
|
Member Function Documentation
|
|
execute the command. Usually called by the UndoRedoStack after the command has been added to it. Implemented in VCF::CommandGroup. |
|
|
The name of this command. Frequently the name is the basis for the display text that is shown in the "Edit | Undo" or "Edit | Redo" menu items.
Implemented in VCF::AbstractCommand. |
|
|
returns the UndoRedoStack that owns this command.
Implemented in VCF::AbstractCommand. |
|
|
Is this command undoable ?
Implemented in VCF::AbstractCommand. |
|
|
redo the command. Generally the same, or similar, code as performed in the execute() method Implemented in VCF::CommandGroup. |
|
|
sets the name of this command
Implemented in VCF::AbstractCommand. |
|
|
sets the owning UndoRedoStack for this command
Implemented in VCF::AbstractCommand. |
|
|
Undo the command.
Implemented in VCF::CommandGroup. |
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/Command.h
