#include <Undo.h>
Public Member Functions | |
| UndoGroup (View *pView, const std::string &text) | |
| ~UndoGroup () | |
This class provides a means to group multiple undo actions into a single undoable operation. When the UndoGroup is created, undo actions are queued and are added to the view as a single action when the group is destroyed. Reference counting is performed so that nested groups can be created that will not add the actions to the view until the last group is destroyed.
Definition at line 28 of file Undo.h.
| UndoGroup::UndoGroup | ( | View * | pView, | |
| const std::string & | text | |||
| ) |
Starts the undo group.
The constructor creates the UndoGroup object and queues all undo actions to be added when the group is destroyed.
| pView | The view in which to create the undo group. | |
| text | The name for the undo action group that will appear to the user. This name will not appear to the user if this group is nested inside of another group. |
| UndoGroup::~UndoGroup | ( | ) |
Ends the undo group.
The destructor destroys the UndoGroup object and adds the queued undo actions to the view as a single action. The queued undo actions are not added to the view if another undo group already existed on the view when this group was created.