CommandQueueManager Methods |
The CommandQueueManager type exposes the following members.
Name | Description | |
---|---|---|
ActivateCommandQueueStack |
Activates the command queue stack related to the stackId specified, or if there's no stack yet, it creates a new one.
| |
BeginNonUndoablePeriod |
Starts a period of command execution which aren't undoable.
| |
BeginUndoablePeriod |
Sets the command manager in a special mode where all subsequential commands are tracked inside an UndoablePeriodCommand which, when undone/redone
will not destroy its command queue during undo and won't accept new commands when redone, which is useful when you want to mark a method as an
undoable piece of code and the method creates objects, which can be a problem with a normal command calling the method because the objects created
inside the method are re-created (so you'll get new instances) when the command is redone. If follow up commands work on the instances, redoing these
commands as well causes a problem as they'll work on objects which aren't there.
| |
CanDo |
Determines whether the commandqueuestack with the id passed in can perform a Do operation (or redo)
| |
CanUndo |
Determines whether the commandqueuestack with the id passed in can perform an Undo operation
| |
EndNonUndoablePeriod |
Ends the non-undoable period started with BeginNonUndoablePeriod. Commands enqueued and ran after this method will be undoable again.
| |
EndUndoablePeriod |
Ends the undoable period started with BeginUndoablePeriod.
| |
EnqueueAndRunCommand |
Enqueues and runs the command in the top queue on the active stack. It expects there is an active command queue: if it's not one activated by
the callee, it's the one belonging to this manager, which owns its own main queue.
| |
EnqueueCommand |
Enqueues the command in the top queue on the active stack. It expects there is an active command queue: if it's not one activated by the callee, it's the
one belonging to this manager, which owns its own main queue.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetActiveCommandQueueStack |
Gets the command queue stack currently active in the manager for the active thread
| |
GetCommandQueueStackForId |
Gets the command queue stack related to the stackid passed in
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
PerformUndoablePeriod |
Performs the code func inside an undoable period guarded by the command specified. Use this method if the code to run inside the
undoable period is well known and can be wrapped inside a single func. The func codeToExecuteInPeriodFunc is executed once, all
undo/redo logic is done by undo/redo-ing commands which were ran due to state changes caused by codeToExecuteInPeriodFunc.
If you want to run a command again during redo, you should enqueue and run a normal command instead of using this method.
To create an undoable period, you can also call BeginUndoablePeriod and EndUndoablePeriod.
| |
RedoLastCommand |
Redo'es the last command in the top queue.
| |
ResetActiveCommandQueue |
Resets the active command queue stack. This means that the stack will get all its commands be removed and an empty queue is the result.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
UndoLastCommand |
Undo'es the last command in the top queue
|