Manages a list of actions that can be done and undone. More...
Classes | |
class | Action |
An action that can be done or undone with an ActionQueue. More... | |
class | ActionArgs |
Event agrs for an action. More... | |
class | ActionStack |
Represents a list of available actions to do or undo. More... | |
Public Member Functions | |
ActionQueue () | |
Creates a new ActionQueue. | |
void | DontCombineNextAction () |
Call this method to prevent the next action to be performed from being combined with previous actions. | |
virtual TAction | Undo () |
Undoes one action and returns the action that was undone. | |
virtual TAction | Redo () |
Redoes one action and returns the action that was done. | |
virtual void | Do (TAction a) |
Adds the specified action to the queue and performs the action. | |
void | Clear () |
Clears all undos and redos. | |
Protected Member Functions | |
void | CropUndos () |
Removes the oldest undo actions if the queue has more actions that are allowed by MaxQueueSize. | |
void | CropRedos () |
Removes the least recently undone actions if the queue has more actions than allowed by MaxQueueSize. This seems superfluous since there should never be too many actions when this method would be called. | |
Properties | |
ActionStack | Undos [get] |
Gets a list of available undos. | |
ActionStack | Redos [get] |
Gets a list of available redos. | |
int | MaxQueueSize [get, set] |
Gets/sets the maximum number of actions the queue will hold. | |
bool | CombineActions [get, set] |
If true, actions that can be combined will be. (This behavior is defined by the Action objects.). | |
bool | CanUndo [get] |
Returns true if there are actions to undo. | |
string | UndoText [get] |
Returns the text of the first undo action. | |
int | UndoCount [get] |
Gets the number of undo actions available. | |
bool | CanRedo [get] |
Returns true if there are actions to redo. | |
string | RedoText [get] |
Returns the text of the first redo action. | |
int | RedoCount [get] |
Returns the number of redo actions available. | |
int | TotalCount [get] |
Gets the total number of undo and redo actions. | |
Events | |
EventHandler< ActionArgs > | ActionDone |
Rasied when an action is done or redone. | |
EventHandler< ActionArgs > | ActionUndone |
Raised when an action is undone. | |
EventHandler< ActionArgs > | ActionsCombined |
Raised when two actions are combined into a single action. |
Manages a list of actions that can be done and undone.
TQ | The queue type. This type parameter should be set to the declaring type (self-referencing). | |
TAction | The action type. This type must inherit from the declaring type's nested Action class. |
TQ | : | ActionQueue | |
TQ | : | TQ | |
TQ | : | TAction | |
TAction | : | ActionQueue | |
TAction | : | TQ | |
TAction | : | TAction | |
TAction | : | Action |
Romulus.ActionQueue-g< TQ, TAction >.ActionQueue | ( | ) |
Creates a new ActionQueue.
void Romulus.ActionQueue-g< TQ, TAction >.Clear | ( | ) |
Clears all undos and redos.
void Romulus.ActionQueue-g< TQ, TAction >.CropRedos | ( | ) | [protected] |
Removes the least recently undone actions if the queue has more actions than allowed by MaxQueueSize. This seems superfluous since there should never be too many actions when this method would be called.
void Romulus.ActionQueue-g< TQ, TAction >.CropUndos | ( | ) | [protected] |
Removes the oldest undo actions if the queue has more actions that are allowed by MaxQueueSize.
virtual void Romulus.ActionQueue-g< TQ, TAction >.Do | ( | TAction | a | ) | [virtual] |
Adds the specified action to the queue and performs the action.
a | The action to perform. |
void Romulus.ActionQueue-g< TQ, TAction >.DontCombineNextAction | ( | ) |
Call this method to prevent the next action to be performed from being combined with previous actions.
virtual TAction Romulus.ActionQueue-g< TQ, TAction >.Redo | ( | ) | [virtual] |
Redoes one action and returns the action that was done.
virtual TAction Romulus.ActionQueue-g< TQ, TAction >.Undo | ( | ) | [virtual] |
Undoes one action and returns the action that was undone.
bool Romulus.ActionQueue-g< TQ, TAction >.CanRedo [get] |
Returns true if there are actions to redo.
bool Romulus.ActionQueue-g< TQ, TAction >.CanUndo [get] |
Returns true if there are actions to undo.
bool Romulus.ActionQueue-g< TQ, TAction >.CombineActions [get, set] |
If true, actions that can be combined will be. (This behavior is defined by the Action objects.).
int Romulus.ActionQueue-g< TQ, TAction >.MaxQueueSize [get, set] |
Gets/sets the maximum number of actions the queue will hold.
int Romulus.ActionQueue-g< TQ, TAction >.RedoCount [get] |
Returns the number of redo actions available.
ActionStack Romulus.ActionQueue-g< TQ, TAction >.Redos [get] |
Gets a list of available redos.
string Romulus.ActionQueue-g< TQ, TAction >.RedoText [get] |
Returns the text of the first redo action.
int Romulus.ActionQueue-g< TQ, TAction >.TotalCount [get] |
Gets the total number of undo and redo actions.
int Romulus.ActionQueue-g< TQ, TAction >.UndoCount [get] |
Gets the number of undo actions available.
ActionStack Romulus.ActionQueue-g< TQ, TAction >.Undos [get] |
Gets a list of available undos.
string Romulus.ActionQueue-g< TQ, TAction >.UndoText [get] |
Returns the text of the first undo action.
EventHandler<ActionArgs> Romulus.ActionQueue-g< TQ, TAction >.ActionDone |
Rasied when an action is done or redone.
EventHandler<ActionArgs> Romulus.ActionQueue-g< TQ, TAction >.ActionsCombined |
Raised when two actions are combined into a single action.
EventHandler<ActionArgs> Romulus.ActionQueue-g< TQ, TAction >.ActionUndone |
Raised when an action is undone.