Users of the Tools Framework need to implement IToolsContextTransactionsAPI so that the Tools have the ability to create Transactions and emit Changes.
更多...
#include <ToolContextInterfaces.h>
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.
◆ 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.
This cannot be called between Begin/EndUndoTransaction, the FChange should be automatically inserted into a Transaction.
- 参数
-
| TargetObject | The UObject this Change is applied to |
| Change | The Change implementation |
| Description | text 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.
- 参数
-
| Description | text 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.
- 参数
-
| Message | text of message |
| Level | severity 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()
Request a modification to the current selected objects
- 参数
-
| SelectionChange | desired modification to current selection |
- 返回
- true if the selection change could be applied
该类的文档由以下文件生成: