UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IToolsContextTransactionsAPI Class Referenceabstract

#include <ToolContextInterfaces.h>

Public Member Functions

virtual ~IToolsContextTransactionsAPI ()
 
virtual void DisplayMessage (const FText &Message, EToolMessageLevel Level)=0
 
virtual void PostInvalidation ()=0
 
virtual void BeginUndoTransaction (const FText &Description)=0
 
virtual void EndUndoTransaction ()=0
 
virtual void AppendChange (UObject *TargetObject, TUniquePtr< FToolCommandChange > Change, const FText &Description)=0
 
virtual bool RequestSelectionChange (const FSelectedObjectsChangeList &SelectionChange)=0
 

Detailed Description

Users of the Tools Framework need to implement IToolsContextTransactionsAPI so that the Tools have the ability to create Transactions and emit Changes. Note that this is technically optional, but that undo/redo won't be supported without it.

Constructor & Destructor Documentation

◆ ~IToolsContextTransactionsAPI()

virtual IToolsContextTransactionsAPI::~IToolsContextTransactionsAPI ( )
inlinevirtual

Member Function Documentation

◆ AppendChange()

virtual void IToolsContextTransactionsAPI::AppendChange ( UObject TargetObject,
TUniquePtr< FToolCommandChange Change,
const FText Description 
)
pure virtual

Insert an FChange into the transaction history in the current Context. It is safe but not necessary to call this between Begin/EndUndoTransaction; the FChange will be automatically inserted into a Transaction.

Parameters
TargetObjectThe UObject this Change is applied to
ChangeThe Change implementation
Descriptiontext description of the transaction that could be shown to user

◆ BeginUndoTransaction()

virtual void IToolsContextTransactionsAPI::BeginUndoTransaction ( const FText Description)
pure virtual

Begin a Transaction, whatever this means in the current Context. For example in the Editor it means open a GEditor Transaction. You must call EndUndoTransaction() after calling this.

Parameters
Descriptiontext description of the transaction that could be shown to user

◆ DisplayMessage()

virtual void IToolsContextTransactionsAPI::DisplayMessage ( const FText Message,
EToolMessageLevel  Level 
)
pure virtual

Request that context display message information.

Parameters
Messagetext of message
Levelseverity level of message

◆ EndUndoTransaction()

virtual void IToolsContextTransactionsAPI::EndUndoTransaction ( )
pure virtual

Complete the Transaction. Assumption is that Begin/End are called in pairs.

◆ PostInvalidation()

virtual void IToolsContextTransactionsAPI::PostInvalidation ( )
pure virtual

Forward an invalidation request from Tools framework, to cause repaint/etc. This is not always necessary but in some situations (eg in Non-Realtime mode in Editor) a redraw will not happen every frame. See UInputRouter for options to enable auto-invalidation.

◆ RequestSelectionChange()

virtual bool IToolsContextTransactionsAPI::RequestSelectionChange ( const FSelectedObjectsChangeList SelectionChange)
pure virtual

Request a modification to the current selected objects

Parameters
SelectionChangedesired modification to current selection
Returns
true if the selection change could be applied

The documentation for this class was generated from the following file: