UndoGroup Class Reference

Starts and ends an undo group on a view. More...

#include <Undo.h>

List of all members.

Public Member Functions

 UndoGroup (View *pView, const std::string &text)
 ~UndoGroup ()


Detailed Description

Starts and ends an undo group on a view.

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.

See also:
View::inUndoGroup()

Definition at line 28 of file Undo.h.


Constructor & Destructor Documentation

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.

Parameters:
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.

See also:
View::inUndoGroup()


Software Development Kit - Opticks 4.9.0 Build 16218