Class SBCUndoEvent#
This class describes an event of the undo manager.
#include <SBCUndoEvent.hpp>
Public Types#
| Type | Name |
|---|---|
| enum | Type Available undo event types. |
Public Functions#
| Type | Name |
|---|---|
| SBCUndoEvent (Type type, SBCUndoCommand * undoCommand, SBCUndoStack * undoStack) Constructs the undo event. |
|
| Type | getType () const Returns the undo event type. |
| SBCUndoCommand * | getUndoCommand () const Returns a pointer to the undo command. |
| SBCUndoStack * | getUndoStack () const Returns a pointer to the undo stack. |
| virtual void | print (unsigned int offset=0) const Print debugging information. |
| virtual | ~SBCUndoEvent () Destructs the undo event. |
Public Static Functions#
| Type | Name |
|---|---|
| std::string | getTypeString (Type type) Returns the undo event type as a string. |
Protected Attributes#
| Type | Name |
|---|---|
| SBCUndoEventData * | dataPointer A pointer to the private data. |
Public Types Documentation#
enum Type#
Available undo event types.
enum SBCUndoEvent::Type {
Undefined = 0,
CommandAdded = 1,
CommandRemoved = 2,
CommandDisabled = 3,
NextCommandIndexChanged = 4
};
Public Functions Documentation#
function SBCUndoEvent#
Constructs the undo event.
Constructs an undo event.
Initializes a new undo event with the specified type, command, and stack.
Parameters:
typeThe type of the undo event.commandPointer to the associated undo command.stackPointer to the undo stack.
function getType#
Returns the undo event type.
Returns the type of the undo event.
Returns:
The undo event type, or Undefined if unavailable.
function getUndoCommand#
Returns a pointer to the undo command.
Returns the associated undo command.
Returns:
Pointer to the undo command, or nullptr if none.
function getUndoStack#
Returns a pointer to the undo stack.
Returns the associated undo stack.
Returns:
Pointer to the undo stack, or nullptr if none.
function print#
Print debugging information.
Prints debugging information for the undo event.
Parameters:
offsetNumber of tab characters to prepend to each line of output.
function ~SBCUndoEvent#
Destructs the undo event.
Destroys the undo event.
Public Static Functions Documentation#
function getTypeString#
Returns the undo event type as a string.
Returns the string representation of an undo event type.
Parameters:
typeThe undo event type to convert.
Returns:
The name of the event type as a string.
Protected Attributes Documentation#
variable dataPointer#
A pointer to the private data.