Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_UndoPolicy_Multi Class Reference

Undo policy class for objects that supports undo / redo.

Inheritance diagram for CP_UndoPolicy_Multi:

CP_NoCopy List of all members.

Public Member Functions

Constructor / Destructor
 CP_UndoPolicy_Multi ()
 Constructor.
virtual ~CP_UndoPolicy_Multi () throw ()
 Destructor.
Commands
void HandlePostCommand (CP_UndoAction *inCommand)
void HandleUndoCommand (OSStatus &inOutStatus)
void HandleRedoCommand (OSStatus &inOutStatus)
Getters
CP_String GetUndoCommandText ()
CP_String GetRedoCommandText ()
CP_String GetUndoText ()
CP_String GetRedoText ()
CP_String GetCantUndoCommandText ()
CP_String GetCantRedoCommandText ()
List Handling
void ClearHistory ()
void ClearRedoHistory ()
void ClearUndoHistory ()
void ClearCommand (CP_UndoAction *inCommand, bool inUndoHistory=true, bool inRedoHistory=true)
Menu Status
void UpdateUndoMenuStatus (CP_CommandStatus &inOutCommandStatus, bool &inOutResult, CP_CommandNo &inCommand)
void UpdateRedoMenuStatus (CP_CommandStatus &inOutCommandStatus, bool &inOutResult, CP_CommandNo &inCommand)
Setters
void SetMaxNumberCommands (SInt16 inMaxNumber)
virtual void SetUndoCommandText (CP_String &inUndoText)
virtual void SetRedoCommandText (CP_String &inRedoText)
virtual void SetCantUndoCommandText (CP_String &inCantUndoText)
virtual void SetCantRedoCommandText (CP_String &inCantRedoText)
Testers
bool HasUndoCommand (CP_UndoAction *inCommand)
bool HasRedoCommand (CP_UndoAction *inCommand)
Undo / Redo
virtual bool CanUndo ()
virtual bool CanRedo ()
virtual void DoUndo ()
virtual void DoRedo ()

Protected Member Functions

Lists
CP_UndoAction_ListGetUndoCommandsList ()
CP_UndoAction_ListGetRedoCommandsList ()

Protected Attributes

SInt16 fMaxNumberCommands
CP_UndoAction_ListfUndoCommands
CP_UndoAction_ListfRedoCommands
CP_String fUndoText
CP_String fRedoText
CP_String fCantUndoText
CP_String fCantRedoText

Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_UndoPolicy_Multi::CP_UndoPolicy_Multi  ) 
 

Constructor.

CP_UndoPolicy_Multi::~CP_UndoPolicy_Multi  )  throw () [virtual]
 

Destructor.


Member Function Documentation

void CP_UndoPolicy_Multi::HandlePostCommand CP_UndoAction inCommand  ) 
 

Handle posting our command to the appropriate command list. This will also execute the command, and if the command allows it, set it up to be undone.

Parameters:
inCommand - the command to be performed.

void CP_UndoPolicy_Multi::HandleUndoCommand OSStatus inOutStatus  ) 
 

void CP_UndoPolicy_Multi::HandleRedoCommand OSStatus inOutStatus  ) 
 

CP_String CP_UndoPolicy_Multi::GetUndoCommandText  ) 
 

Return the undo command menu item text for the last (next one to be done) command.

CP_String CP_UndoPolicy_Multi::GetRedoCommandText  ) 
 

Return the redo command menu item text for the last (next one to be done) command.

CP_String CP_UndoPolicy_Multi::GetUndoText  ) 
 

Return the undo menu item text.

Exceptions:
none 
Returns:
CP_String The text to be used.

CP_String CP_UndoPolicy_Multi::GetRedoText  ) 
 

Return the redo menu item text.

Exceptions:
none 
Returns:
CP_String The text to be used.

CP_String CP_UndoPolicy_Multi::GetCantUndoCommandText  ) 
 

Return the can't undo menu item text.

Exceptions:
none 
Returns:
CP_String The text to be used.

CP_String CP_UndoPolicy_Multi::GetCantRedoCommandText  ) 
 

Return the can't redo menu item text.

Exceptions:
none 
Returns:
CP_String The text to be used.

void CP_UndoPolicy_Multi::ClearHistory  ) 
 

Clear both undo and redo list of commands.

void CP_UndoPolicy_Multi::ClearRedoHistory  ) 
 

Clear the redo list of commands.

void CP_UndoPolicy_Multi::ClearUndoHistory  ) 
 

Clear the undo list of commands.

void CP_UndoPolicy_Multi::ClearCommand CP_UndoAction inCommand,
bool  inUndoHistory = true,
bool  inRedoHistory = true
 

Clear a command from one of our lists of either undo commands or redo commands.

Parameters:
inCommand - the command to remove.
inUndoHistory - remove from the undo list of commands.
inRedoHistory - remove from the redo list of commands.

void CP_UndoPolicy_Multi::UpdateUndoMenuStatus CP_CommandStatus inOutCommandStatus,
bool &  inOutResult,
CP_CommandNo inCommand
 

void CP_UndoPolicy_Multi::UpdateRedoMenuStatus CP_CommandStatus inOutCommandStatus,
bool &  inOutResult,
CP_CommandNo inCommand
 

void CP_UndoPolicy_Multi::SetMaxNumberCommands SInt16  inMaxNumber  ) 
 

Sets the maximum number of commands to keep in the list of undo / redo commands.

Parameters:
inMaxNumber The maximum number of commands.
Exceptions:
none 
Returns:
void

virtual void CP_UndoPolicy_Multi::SetUndoCommandText CP_String inUndoText  )  [virtual]
 

Sets the text to be used for the undo menu item.

Parameters:
inUndoText The text to be used for undo commands.
Exceptions:
none 
Returns:
void

virtual void CP_UndoPolicy_Multi::SetRedoCommandText CP_String inRedoText  )  [virtual]
 

Sets the text to be used for the redo menu item.

Parameters:
inUndoText The text to be used for redo commands.
Exceptions:
none 
Returns:
void

virtual void CP_UndoPolicy_Multi::SetCantUndoCommandText CP_String inCantUndoText  )  [virtual]
 

Sets the text to be used for the can't undo menu item.

Parameters:
inCantUndoText The text to be used for cant undo commands.
Exceptions:
none 
Returns:
void

virtual void CP_UndoPolicy_Multi::SetCantRedoCommandText CP_String inCantRedoText  )  [virtual]
 

Sets the text to be used for the can't redo menu item.

Parameters:
inCantRedoText The text to be used for cant redo commands.
Exceptions:
none 
Returns:
void

bool CP_UndoPolicy_Multi::HasUndoCommand CP_UndoAction inCommand  ) 
 

Return true if the passed in inCommand is currently in the undo commands list.

Parameters:
inCommand - the command to check.

bool CP_UndoPolicy_Multi::HasRedoCommand CP_UndoAction inCommand  ) 
 

Return true if the passed in inCommand is currently in the redo commands list.

Parameters:
inCommand - the command to check.

bool CP_UndoPolicy_Multi::CanUndo  )  [virtual]
 

Return true if we are able to undo our commands.

bool CP_UndoPolicy_Multi::CanRedo  )  [virtual]
 

Return true if we are able to redo our commands.

void CP_UndoPolicy_Multi::DoUndo  )  [virtual]
 

Tell the current command to undo itself.

void CP_UndoPolicy_Multi::DoRedo  )  [virtual]
 

Tell the current command to redo itself.

CP_UndoAction_List* CP_UndoPolicy_Multi::GetUndoCommandsList  )  [protected]
 

Returns the undo actions list, which contains a list of the actions that can currently be undone.

Exceptions:
none 
Returns:
CP_UndoAction_List List of actions that can be undone.

CP_UndoAction_List* CP_UndoPolicy_Multi::GetRedoCommandsList  )  [protected]
 

Returns the redo actions list, which contains a list of the actions that can currently be redone.

Exceptions:
none 
Returns:
CP_UndoAction_List List of actions that can be redone.


Member Data Documentation

SInt16 CP_UndoPolicy_Multi::fMaxNumberCommands [protected]
 

CP_UndoAction_List* CP_UndoPolicy_Multi::fUndoCommands [protected]
 

Maximum number of commands we maintain.

CP_UndoAction_List* CP_UndoPolicy_Multi::fRedoCommands [protected]
 

List of undoable commands.

CP_String CP_UndoPolicy_Multi::fUndoText [protected]
 

List of redoable commands.

CP_String CP_UndoPolicy_Multi::fRedoText [protected]
 

Undo menu item text.

CP_String CP_UndoPolicy_Multi::fCantUndoText [protected]
 

Redo menu item text.

CP_String CP_UndoPolicy_Multi::fCantRedoText [protected]
 

Can't undo menu item text.


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:22:16 2005 for CPLAT_MacOS by  doxygen 1.4.0