Navigation
API > API/Editor > API/Editor/EditorInteractiveToolsFramework
This class hosts a list of ITF Viewport Interactions and a UBehaviorSet containing the UInteractionBehavior instances required by those Viewport Interactions. It also acts as a behavior target, registering the status of Shift, Alt, Ctrl modifier keys. That and other pieces of information can be accessed externally, so that e.g. Viewport Interactions can know about modifier states without having to implement themselves what would be duplicate logic to handle those inputs. This class can also be used to know whether the Viewport camera is being moved using the mouse,or to mark it as such.
| Name | UViewportInteractionsBehaviorSource |
| Type | class |
| Header File | /Engine/Source/Editor/Experimental/EditorInteractiveToolsFramework/Public/ViewportInteractions/ViewportInteractionsBehaviorSource.h |
| Include Path | #include "ViewportInteractions/ViewportInteractionsBehaviorSource.h" |
Syntax
UCLASS (Transient, MinimalAPI)
class UViewportInteractionsBehaviorSource :
public UObject ,
public IInputBehaviorSource ,
public IModifierToggleBehaviorTarget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UViewportInteractionsBehaviorSource
Implements Interfaces
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCameraHasMoved | bool | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| BehaviorSet | TObjectPtr< UInputBehaviorSet > | All Input Behaviors from registered Viewport Interactions should be added to this Behavior Set (done with AddInteraction() ) | ViewportInteractions/ViewportInteractionsBehaviorSource.h |
|
| bGizmoDragging | bool | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| bIsAltDown | bool | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| bIsCtrlDown | bool | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| bIsLeftMouseButtonDown | bool | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| bIsMiddleMouseButtonDown | bool | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| bIsRightMouseButtonDown | bool | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| bIsShiftDown | bool | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| CoreBehaviors | TArray< TObjectPtr< UInputBehavior > > | Behaviors that are guaranteed to always be present | ViewportInteractions/ViewportInteractionsBehaviorSource.h |
|
| CursorOverride | TOptional< EMouseCursor::Type > | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| EditorInteractiveToolsContextWeak | TWeakObjectPtr< UEditorInteractiveToolsContext > | ViewportInteractions/ViewportInteractionsBehaviorSource.h |
|
|
| HiddenCursorPosition | TOptional< FIntPoint > | Caches cursor position whenever we hide it, so we can place it back where it was as soon as we show it again | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
| LastCursorOverride | TOptional< EMouseCursor::Type > | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| OnAltKeyStateChangedDelegate | FOnModifierKeyChanged | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| OnCtrlKeyStateChangedDelegate | FOnModifierKeyChanged | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| OnMouseLookingChangedDelegate | FOnMouseLookingChanged | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| OnShiftKeyStateChangedDelegate | FOnModifierKeyChanged | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| TransformGizmo | TObjectPtr< UEditorTransformGizmo > | ViewportInteractions/ViewportInteractionsBehaviorSource.h |
|
|
| UnsupportedInteractions | TArray< FName > | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
| ViewportInteractionGroups | TMap< FName, FViewportInteractionGroup > | Groups <-> Interactions is a many-to-many relationship. | ViewportInteractions/ViewportInteractionsBehaviorSource.h |
|
| ViewportInteractions | TMap< FName, TObjectPtr< UViewportInteraction > > | A collection of ITF-based Viewport Interactions Key is the interaction name (class name when no Interaction name is specified) | ViewportInteractions/ViewportInteractionsBehaviorSource.h |
|
| WeakCursorAPI | TWeakObjectPtr< UToolsContextCursorAPI > | ViewportInteractions/ViewportInteractionsBehaviorSource.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UViewportInteraction * AddInteraction
(
const UClass* InInteractionClass, |
Add the specified interaction to this Behavior Source | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
T * AddInteraction
(
bool bInReregister |
Use the templated version in case there is some class specific initialization required by the newly created interaction, since this method will return the newly instantiated interaction | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
| Add the specified interactions to this Behavior Source | ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
void ClearMouseCursorOverride() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
void DeregisterBehaviorSources() |
Deregister this Input Behavior Source from the InputRouter | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
void DrawTools
(
FCanvas* InCanvas, |
Draws the active tool on the specified View/Canvas | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
UViewportInteraction * FindInteraction
(
const UClass* InInteractionClass |
Finds an interaction with a given class if one exists | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
UViewportInteraction * FindInteraction
(
const FName& InName |
Finds an interaction with a given name if one exists | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
UEditorTransformGizmo * GetEditorTransformGizmo() |
If available, return the current Editor Transform Gizmo | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
FEditorViewportClient * GetEditorViewportClient() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
FEditorViewportClient * GetHoveredEditorViewportClient() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
FEditorModeTools * GetModeTools() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
T * GetTypedViewportInteraction() |
Returns the first Viewport Interaction of type T | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
TArray< T * > GetTypedViewportInteractions() |
Returns all Viewport Interactions of type T | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
| ViewportInteractions/ViewportInteractionsBehaviorSource.h | |||
bool HasCameraMoved() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
void Initialize
(
UEditorInteractiveToolsContext* InInteractiveToolsContext |
Will initialize the required behaviors and the Behavior Set | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
bool IsAltDown() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
bool IsAnyInteractionInGroupActive
(
const FName& InName |
Returns true if any interaction in the given group is active. | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
bool IsAnyInteractionInGroupEnabled
(
const FName& InName |
Returns true if any interaction in the given group is enabled. | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
bool IsCtrlDown() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
bool IsGizmoDragging() |
Whether the Editor Transform Gizmo is being interacted with | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
bool IsLeftMouseButtonDown() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
bool IsMiddleMouseButtonDown() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
bool IsMouseLooking() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
bool IsRightMouseButtonDown() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
bool IsShiftDown() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
FOnModifierKeyChanged & OnAltKeyStateChanged() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
FOnModifierKeyChanged & OnCtrlKeyStateChanged() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
FOnMouseLookingChanged & OnMouseLookingStateChanged() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
FOnModifierKeyChanged & OnShiftKeyStateChanged() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
void RegisterBehaviorSources() |
Register this Input Behavior Source to the InputRouter | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
void RemoveInteraction
(
const FName InInteractionName, |
Removes the specified interaction from the active ones. | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
void RenderTools
(
IToolsContextRenderAPI* InRenderAPI |
Renders the active tool on the specified View/World | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
void Reset () |
De-registers behaviors, removes viewport interactions. | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
void SetCameraHasMoved
(
bool bInHasMoved |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
void SetIsMouseLooking
(
bool bInIsLooking |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
void SetMouseCursorOverride
(
EMouseCursor::Type InMouseCursor |
Sets current mouse cursor override | ViewportInteractions/ViewportInteractionsBehaviorSource.h | |
| ViewportInteractions/ViewportInteractionsBehaviorSource.h | |||
void Tick
(
float InDeltaTime |
Call Tick on those Viewport Interactions which require it (e.g. Camera Mover) | ViewportInteractions/ViewportInteractionsBehaviorSource.h |
Public Virtual
Overridden from IInputBehaviorSource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const UInputBehaviorSet * GetInputBehaviors() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h |
Overridden from IModifierToggleBehaviorTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnForceEndCapture() |
ViewportInteractions/ViewportInteractionsBehaviorSource.h | ||
virtual void OnUpdateModifierState
(
int InModifierID, |
ViewportInteractions/ViewportInteractionsBehaviorSource.h |