FBUndoManager Class Reference
 
 
 
FBUndoManager Class Reference

This reference page is linked to from the following overview topics: Getting Notified of Source File Changes.


#include <mobu-python-api.h>


Class Description

Access to global undo and redo functionality. 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.

Public Member Functions

def  __reduce__ ()
def  __init__ ()
def  Clear ()
def  Redo ()
def  Undo ()
def  TransactionBegin ()
def  TransactionIsOpen ()
def  TransactionAddModelTRS ()
def  TransactionAddProperty ()
def  TransactionAddObjectDestroy ()
def  TransactionEnd ()
def  ActiveOperation ()

Member Function Documentation

def __reduce__ ( )
def __init__ ( )

Python Docstring:

__init__( (object)arg1) -> None 

C++ Constructors:
The reference documentation for the following C++ symbols may contain additional relevant information.

 FBUndoManager(const FBUndoManager & )
 FBUndoManager()
def Clear ( )

Python Docstring:

Clear( (FBUndoManager)arg1) -> bool 

C++ Signature:

bool Clear() 

Clear the undo and redo stacks.

Returns:
A boolean value indicating success (true) or failure (false).
def Redo ( )

Python Docstring:

Redo( (FBUndoManager)arg1) -> None 

C++ Signature:

void Redo() 

Redo last undone action.

def Undo ( )

Python Docstring:

Undo( (FBUndoManager)arg1 [, (object)arg2]) -> None 

C++ Signature:

void Undo(bool pNoRedo = false) 

Undo last action.

Parameters:
pNoRedo If true, once the action is undone, it cannot be redone.
def TransactionBegin ( )

Python Docstring:

TransactionBegin( (FBUndoManager)arg1, (str)arg2) -> bool 

C++ Signature:

bool TransactionBegin(const char * pTransactionName) 

Open transaction stack for adding transactions. Users should call TransactionBegin()/TransactionEnd() in pairs, Transaction stack must be closed before UI event callback return.

Parameters:
pTransactionName Name of Transaction.
Returns:
true if open transaction stack successfully.
def TransactionIsOpen ( )

Python Docstring:

TransactionIsOpen( (FBUndoManager)arg1) -> bool 

C++ Signature:

bool TransactionIsOpen() 

Query if transaction stack is already open.

Returns:
true if transaction is already open.
def TransactionAddModelTRS ( )

Python Docstring:

TransactionAddModelTRS( (FBUndoManager)arg1, (FBModel)arg2) -> bool 

C++ Signature:

bool TransactionAddModelTRS(FBModel * pModel) 

Add Transaction if transaction stack is open. Quick Function to add Model TRS in Undo Stack

Parameters:
pModel Model to backup TRS
Returns:
true if add transaction successfully.
def TransactionAddProperty ( )

Python Docstring:

TransactionAddProperty( (FBUndoManager)arg1, (FBProperty)arg2) -> bool 

C++ Signature:

bool TransactionAddProperty(FBProperty * pProperty) 

Add Transaction if transaction stack is open. Quick Function to add property value in Undo Stack

Parameters:
pProperty Property to backup
Returns:
true if add transaction successfully.
def TransactionAddObjectDestroy ( )

Python Docstring:

TransactionAddObjectDestroy( (FBUndoManager)arg1, (FBComponent)arg2) -> bool 

C++ Signature:

bool TransactionAddObjectDestroy(FBComponent * pObject) 

Add Transaction if transaction stack is open. Function to add object to destroy in Undo Stack

Parameters:
pObject Object to backup
Returns:
true if add transaction successfully.
def TransactionEnd ( )

Python Docstring:

TransactionEnd( (FBUndoManager)arg1) -> bool 

C++ Signature:

bool TransactionEnd() 

Close transaction stack. Users should call TransactionBegin()/TransactionEnd() in pairs, Transaction stack must be closed before UI event callback return.

Returns:
true if transaction close successfully.
def ActiveOperation ( )

Python Docstring:

ActiveOperation( (FBUndoManager)arg1) -> bool 

C++ Signature:

bool ActiveOperation() 

Determine if an undo operation is in action.

Returns:
true the Undo Manager is performing an Undo or a Redo operation.