UInteractiveToolsContext

InteractiveToolsContext owns the core parts of an Interactive Tools Framework implementation - the InputRouter, ToolManager, GizmoManager, TargetManager, and ContextStore.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

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

Name Description

Public variable

TObjectPtr< UCo...

 

ContextObjectStore

Current Context Object Store for this Context.

Protected variable

TUniqueFunction...

 

CreateContextStoreFunc

Protected variable

TUniqueFunction...

 

CreateGizmoManagerFunc

Protected variable

TUniqueFunction...

 

CreateInputRouterFunc

Initialize() calls these functions to create the main child objects needed to operate the Tools Framework - InputRouter, ToolManager, GizmoManager, TargetManager, ContextStore.

Protected variable

TUniqueFunction...

 

CreateToolManagerFunc

Protected variable

TUniqueFunction...

 

CreateToolTargetManagerFunc

Public variable

TObjectPtr< UIn...

 

GizmoManager

Current UInteractiveGizmoManager for this Context

Public variable

TObjectPtr< UIn...

 

InputRouter

Current UInputRouter for this Context

Public variable

FToolsContextTo...

 

OnToolNotificationMessage

Public variable

FToolsContextTo...

 

OnToolWarningMessage

Protected variable

TUniqueFunction...

 

ShutdownContextStoreFunc

Protected variable

TUniqueFunction...

 

ShutdownGizmoManagerFunc

Protected variable

TUniqueFunction...

 

ShutdownInputRouterFunc

Analogous to the CreateX() functions above, these function are called by Shutdown() to terminate and clean up after the various elements.

Protected variable

TUniqueFunction...

 

ShutdownToolManagerFunc

Protected variable

TUniqueFunction...

 

ShutdownToolTargetManagerFunc

Public variable

TObjectPtr< UTo...

 

TargetManager

Current UToolTargetManager for this Context

Public variable

TObjectPtr< UIn...

 

ToolManager

Current UInteractiveToolManager for this Context

Protected variable

TSoftClassPtr< ...

 

ToolManagerClass

Todo: deprecate and remove this, can now be accomplished via CreateToolManagerFunc()

Constructors

Name Description

Public function

UInteractiveToolsContext()

Functions

Name Description

Public function Const

bool

 

ActiveToolHasAccept

(
    EToolSide WhichSide
)

Public function Const

bool

 

CanAcceptActiveTool

(
    EToolSide WhichSide
)

Public function Const

bool

 

CanCancelActiveTool

(
    EToolSide WhichSide
)

Public function Const

bool

 

CanCompleteActiveTool

(
    EToolSide WhichSide
)

Public function Const

bool

 

CanStartTool

(
    EToolSide WhichSide,
    const FString& ToolTypeIdentifier
)

Public function Virtual

void

 

DeactivateActiveTool

(
    EToolSide WhichSide,
    EToolShutdownType ShutdownType
)

Public function Virtual

void

 

DeactivateAllActiveTools

(
    EToolShutdownType ShutdownType
)

Public function

void

 

EndTool

(
    EToolSide WhichSide,
    EToolShutdownType ShutdownType
)

Public function Const

FString

 

GetActiveToolName

(
    EToolSide WhichSide
)

Public function Const

bool

 

HasActiveTool

(
    EToolSide WhichSide
)

Public function Virtual

void

 

Initialize

(
    IToolsContextQueriesAPI* Queri...,
    IToolsContextTransactionsAPI* ...
)

Initialize the Context.

Public function Const

bool

 

IsToolActive

(
    EToolSide WhichSide,
    const FString ToolIdentifier
)

Public function Virtual

void

 

PostToolNotificationMessage

(
    const FText& Message
)

Forwards message to OnToolNotificationMessage delegate

Public function Virtual

void

 

PostToolWarningMessage

(
    const FText& Message
)

Public function Virtual

void

 

SetCreateContextStoreFunc

Public function Virtual

void

 

SetCreateGizmoManagerFunc

Public function Virtual

void

 

SetCreateInputRouterFunc

(
    TUniqueFunction< UInputRouter*...
)

Replace the internal functions that are called to create/destroy the sub-objects owned by the ITC.

Public function Virtual

void

 

SetCreateToolManagerFunc

Public function Virtual

void

 

SetCreateToolTargetManagerFunc

Public function Virtual

void

 

SetShutdownContextStoreFunc

(
    TUniqueFunction< void...
)

Public function Virtual

void

 

SetShutdownGizmoManagerFunc

(
    TUniqueFunction< void...
)

Public function Virtual

void

 

SetShutdownInputRouterFunc

(
    TUniqueFunction< void ...
)

Public function Virtual

void

 

SetShutdownToolManagerFunc

(
    TUniqueFunction< void...
)

Public function Virtual

void

 

SetShutdownToolTargetManagerFunc

(
    TUniqueFunction< void...
)

Public function Virtual

void

 

Shutdown()

Shutdown Context by destroying InputRouter and ToolManager

Public function

bool

 

StartTool

(
    EToolSide WhichSide,
    const FString& ToolTypeIdentifier
)

Classes

Name

Description

Public struct

FContextInitInfo

FContextInitInfo is used by Initialize() to pass information to the various creator functions below.

Typedefs