
Users have the possibility of undoing and redoing actions performed using the GUI, and interacting with the undo and redo stacks with custom actions.All undo/redo related functions should only be called inside UI event callback. Users should call TransactionBegin()/TransactionEnd() in pairs, Transaction stack must be closed before UI event callback return.This class cannot be used as a base class.
See sample: IndividualUndoCalls.py.
Public Member Functions |
|
| FBUndoManager () | |
| Constructor. |
|
| bool | ActiveOperation () |
| Determine if an undo operation is in action.
|
|
| bool | Clear () |
| Clear the undo and redo stacks. |
|
| Redo () | |
| Redo last undone action. |
|
| bool | TransactionAddModelTRS (FBModel pModel) |
| Add Transaction if transaction stack is
open. |
|
| bool | TransactionAddObjectDestroy (FBObject pObject) |
| Add Transaction if transaction stack is
open. |
|
| bool | TransactionAddProperty (FBProperty pProperty) |
| Add Transaction if transaction stack is
open. |
|
| bool | TransactionBegin (str pTransactionName) |
| Open transaction stack for adding
transactions. |
|
| bool | TransactionEnd () |
| Close transaction stack. |
|
| bool | TransactionIsOpen () |
| Query if transaction stack is already open.
|
|
| Undo (bool pNoRedo=False) | |
| Undo last action. |
|
| FBUndoManager | ( | ) |
Constructor.
| bool ActiveOperation | ( | ) |
Determine if an undo operation is in action.
| bool Clear | ( | ) |
Clear the undo and redo stacks.
| Redo | ( | ) |
Redo last undone action.
Add Transaction if transaction stack is open.
Quick Function to add Model TRS in Undo Stack
| pModel | Model to backup TRS |
| bool TransactionAddObjectDestroy | ( | FBObject | pObject | ) |
Add Transaction if transaction stack is open.
Function to add object to destroy in Undo Stack
| pObject | Object to backup |
| bool TransactionAddProperty | ( | FBProperty | pProperty | ) |
Add Transaction if transaction stack is open.
Quick Function to add property value in Undo Stack
| pProperty | Property to backup |
Open transaction stack for adding transactions.
Users should call TransactionBegin()/TransactionEnd() in pairs, Transaction stack must be closed before UI event callback return.
| pTransactionName | Name of Transaction. |
| bool TransactionEnd | ( | ) |
Close transaction stack.
Users should call TransactionBegin()/TransactionEnd() in pairs, Transaction stack must be closed before UI event callback return.
| bool TransactionIsOpen | ( | ) |
Query if transaction stack is already open.
| Undo | ( | bool | pNoRedo = False |
) |
Undo last action.
| pNoRedo | If true, once the action is undone, it cannot be redone. |
1.5.3