Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::UndoRedoEvent Class Reference

the event for the UndoRedoStack operations. More...

#include <vcf/ApplicationKit/UndoRedoEvent.h>

Inheritance diagram for VCF::UndoRedoEvent:

VCF::Event VCF::Object List of all members.

Public Member Functions

 UndoRedoEvent (Object *source, const uint32 &eventType, Command *command=NULL)
 constructors
 UndoRedoEvent (const UndoRedoEvent &rhs)
virtual ~UndoRedoEvent ()
UndoRedoEventoperator= (const UndoRedoEvent &rhs)
 copy operator
CommandgetCommand ()
 the command associated to the event.
void setCommand (Command *command)
 sets the command to be associated to the event.
bool getAllowsUndo ()
void setAllowsUndo (const bool &allowsUndo)
 if the user wants to bypass the undo action of the UndoRedoStack instance, he needs to assign this value as false.
bool getAllowsRedo ()
void setAllowsRedo (const bool &allowsRedo)
 if the user wants to bypass the redo action of the UndoRedoStack instance, he needs to assign this value as false.
virtual Objectclone (bool deep=false)
 creates a new copy of this instance.

Protected Attributes

Commandcommand_
 the command, potentially undoable, associated to this event.
bool allowUndo_
 flag to know if the user lets the default undo action of the UndoRedoStack instance to be performed.
bool allowRedo_
 flag to know if the user lets the default redo action of the UndoRedoStack instance to be performed.
bool allowExecute_
 allow for execution currently unused

Detailed Description

the event for the UndoRedoStack operations.

this event is mainly used to bypass the default behaviour performed by the UndoUndoStack instance involved. In this case the user needs to add an handler for this event to the UndoCommand or RedoCommand delegate of the UndoUndoStack instance, and setAllowsUndo(false) or setAllowsRedo(false) inside this handler.


Constructor & Destructor Documentation

VCF::UndoRedoEvent::UndoRedoEvent Object source,
const uint32 eventType,
Command command = NULL
[inline]
 

constructors

VCF::UndoRedoEvent::UndoRedoEvent const UndoRedoEvent rhs  )  [inline]
 

virtual VCF::UndoRedoEvent::~UndoRedoEvent  )  [inline, virtual]
 


Member Function Documentation

virtual Object* VCF::UndoRedoEvent::clone bool  deep = false  )  [inline, virtual]
 

creates a new copy of this instance.

bool VCF::UndoRedoEvent::getAllowsRedo  )  [inline]
 

Returns:
bool, false if the user managing this event doens't want the UndoRedoStack instance to perform hte default redo action.

bool VCF::UndoRedoEvent::getAllowsUndo  )  [inline]
 

Returns:
bool, false if the user managing this event doens't want the UndoRedoStack instance to perform hte default undo action.

Command* VCF::UndoRedoEvent::getCommand  )  [inline]
 

the command associated to the event.

UndoRedoEvent& VCF::UndoRedoEvent::operator= const UndoRedoEvent rhs  )  [inline]
 

copy operator

void VCF::UndoRedoEvent::setAllowsRedo const bool &  allowsRedo  )  [inline]
 

if the user wants to bypass the redo action of the UndoRedoStack instance, he needs to assign this value as false.

Parameters:
const bool& allowsRedo, true to let the default redo action from the UndoRedoStack to be performed.

void VCF::UndoRedoEvent::setAllowsUndo const bool &  allowsUndo  )  [inline]
 

if the user wants to bypass the undo action of the UndoRedoStack instance, he needs to assign this value as false.

Parameters:
const bool& allowsUndo, true to let the default undo action from the UndoRedoStack to be performed.

void VCF::UndoRedoEvent::setCommand Command command  )  [inline]
 

sets the command to be associated to the event.


Member Data Documentation

bool VCF::UndoRedoEvent::allowExecute_ [protected]
 

allow for execution currently unused

bool VCF::UndoRedoEvent::allowRedo_ [protected]
 

flag to know if the user lets the default redo action of the UndoRedoStack instance to be performed.

bool VCF::UndoRedoEvent::allowUndo_ [protected]
 

flag to know if the user lets the default undo action of the UndoRedoStack instance to be performed.

Command* VCF::UndoRedoEvent::command_ [protected]
 

the command, potentially undoable, associated to this event.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information