Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UInteractiveToolsContext
- UEditorInteractiveToolsContext
- UEdModeInteractiveToolsContext
- UModeManagerInteractiveToolsContext
- UWidgetToolsContext
References
| Module | InteractiveToolsFramework |
| Header | /Engine/Source/Runtime/InteractiveToolsFramework/Public/InteractiveToolsContext.h |
| Include | #include "InteractiveToolsContext.h" |
Syntax
class UInteractiveToolsContext : public UObject
Remarks
InteractiveToolsContext owns the core parts of an Interactive Tools Framework implementation - the InputRouter, ToolManager, GizmoManager, TargetManager, and ContextStore. In the simplest use case, UInteractiveToolsContext is just a top-level container that will keep the various UObjects alive, and provide an easy way to access them. However in a more complex situation it may be desirable to subclass and extend the ToolsContext. For example, UEdModeInteractiveToolsContext allows a ToolsContext to live within a UEdMode.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UContextObjectStore > | ContextObjectStore | Current Context Object Store for this Context. | |
| TUniqueFunction< UContextObjectStore *(const FContextInitInfo &)> | CreateContextStoreFunc | ||
| TUniqueFunction< UInteractiveGizmoManager *(const FContextInitInfo &)> | CreateGizmoManagerFunc | ||
| TUniqueFunction< UInputRouter *(const FContextInitInfo &)> | CreateInputRouterFunc | Initialize() calls these functions to create the main child objects needed to operate the Tools Framework - InputRouter, ToolManager, GizmoManager, TargetManager, ContextStore. | |
| TUniqueFunction< UInteractiveToolManager *(const FContextInitInfo &)> | CreateToolManagerFunc | ||
| TUniqueFunction< UToolTargetManager *(const FContextInitInfo &)> | CreateToolTargetManagerFunc | ||
| TObjectPtr< UInteractiveGizmoManager > | GizmoManager | Current UInteractiveGizmoManager for this Context | |
| TObjectPtr< UInputRouter > | InputRouter | Current UInputRouter for this Context | |
| FToolsContextToolNotification | OnToolNotificationMessage | ||
| FToolsContextToolNotification | OnToolWarningMessage | ||
| TUniqueFunction< void(UContextObjectStore *)> | ShutdownContextStoreFunc | ||
| TUniqueFunction< void(UInteractiveGizmoManager *)> | ShutdownGizmoManagerFunc | ||
| TUniqueFunction< void(UInputRouter *)> | ShutdownInputRouterFunc | Analogous to the CreateX() functions above, these function are called by Shutdown() to terminate and clean up after the various elements. | |
| TUniqueFunction< void(UInteractiveToolManager *)> | ShutdownToolManagerFunc | ||
| TUniqueFunction< void(UToolTargetManager *)> | ShutdownToolTargetManagerFunc | ||
| TObjectPtr< UToolTargetManager > | TargetManager | Current UToolTargetManager for this Context | |
| TObjectPtr< UInteractiveToolManager > | ToolManager | Current UInteractiveToolManager for this Context | |
| TSoftClassPtr< UInteractiveToolManager > | ToolManagerClass | Todo: deprecate and remove this, can now be accomplished via CreateToolManagerFunc() |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | ActiveToolHasAccept
(
EToolSide WhichSide |
||
| bool | CanAcceptActiveTool
(
EToolSide WhichSide |
||
| bool | CanCancelActiveTool
(
EToolSide WhichSide |
||
| bool | CanCompleteActiveTool
(
EToolSide WhichSide |
||
| bool | CanStartTool
(
EToolSide WhichSide, |
||
| void | DeactivateActiveTool
(
EToolSide WhichSide, |
||
| void | DeactivateAllActiveTools
(
EToolShutdownType ShutdownType |
||
| void | EndTool
(
EToolSide WhichSide, |
||
| FString | GetActiveToolName
(
EToolSide WhichSide |
||
| bool | HasActiveTool
(
EToolSide WhichSide |
||
| void | Initialize
(
IToolsContextQueriesAPI* QueriesAPI, |
Initialize the Context. | |
| bool | IsToolActive
(
EToolSide WhichSide, |
||
| void | PostToolNotificationMessage
(
const FText& Message |
Forwards message to OnToolNotificationMessage delegate | |
| void | PostToolWarningMessage
(
const FText& Message |
||
| void | SetCreateContextStoreFunc
(
TUniqueFunction< UContextObjectStore*(const FContextInitInfo&)> Func |
||
| void | SetCreateGizmoManagerFunc
(
TUniqueFunction< UInteractiveGizmoManager*(const FContextInitInfo&)> Func |
||
| void | SetCreateInputRouterFunc
(
TUniqueFunction< UInputRouter*(const FContextInitInfo&)> Func |
Replace the internal functions that are called to create/destroy the sub-objects owned by the ITC. | |
| void | SetCreateToolManagerFunc
(
TUniqueFunction< UInteractiveToolManager*(const FContextInitInfo&)> Func |
||
| void | SetCreateToolTargetManagerFunc
(
TUniqueFunction< UToolTargetManager*(const FContextInitInfo&)> Func |
||
| void | SetShutdownContextStoreFunc
(
TUniqueFunction< void(UContextObjectStore*)> Func |
||
| void | SetShutdownGizmoManagerFunc
(
TUniqueFunction< void(UInteractiveGizmoManager*)> Func |
||
| void | SetShutdownInputRouterFunc
(
TUniqueFunction< void(UInputRouter*)> Func |
||
| void | SetShutdownToolManagerFunc
(
TUniqueFunction< void(UInteractiveToolManager*)> Func |
||
| void | SetShutdownToolTargetManagerFunc
(
TUniqueFunction< void(UToolTargetManager*)> Func |
||
| void | Shutdown () |
Shutdown Context by destroying InputRouter and ToolManager | |
| bool |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FContextInitInfo | FContextInitInfo is used by Initialize() to pass information to the various creator functions below. |
Typedefs
| Name | Description |
|---|---|
| FToolsContextToolNotification |