Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
UInputRouter mediates between a higher-level input event source (eg like an FEdMode) and a set of InputBehaviors that respond to those events. Sets of InputBehaviors are registered, and then PostInputEvent() is called for each event.
Internally one of the active Behaviors may "capture" the event stream. Separate "Left" and "Right" captures are supported, which means that (eg) an independent capture can be tracked for each VR controller.
If the input device supports "hover", PostHoverInputEvent() will forward hover events to InputBehaviors that also support it.
| Name | UInputRouter |
| Type | class |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/InputRouter.h |
| Include Path | #include "InputRouter.h" |
Syntax
UCLASS (Transient, MinimalAPI)
class UInputRouter : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UInputRouter
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UInputRouter() |
InputRouter.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAutoInvalidateOnCapture | bool | If true, then we post an Invalidation (ie redraw) request on every captured input event (default false) | InputRouter.h | |
| bAutoInvalidateOnHover | bool | If true, then we post an Invalidation (ie redraw) request if any active InputBehavior responds to Hover events (default false) | InputRouter.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DeregisterSource
(
IInputBehaviorSource* Source |
Remove Behaviors from this Source from the active set | InputRouter.h | |
virtual void ForceTerminateAll() |
Terminate any active captures and end all hovers | InputRouter.h | |
virtual void ForceTerminateSource
(
IInputBehaviorSource* Source |
If this Behavior is capturing, call ForceEndCapture() to notify that we are taking capture away | InputRouter.h | |
virtual bool HasActiveMouseCapture() |
Returns true if there is an active mouse capture | InputRouter.h | |
virtual void PostHoverInputEvent
(
const FInputDeviceState& Input |
Insert a new hover input event which is forwarded to all hover-enabled Behaviors | InputRouter.h | |
virtual bool PostInputEvent
(
const FInputDeviceState& Input |
Insert a new input event which is used to check for new captures, or forwarded to active capture | InputRouter.h | |
virtual void RegisterSource
(
IInputBehaviorSource* Source |
Add a new behavior Source. Behaviors from this source will be added to the active behavior set. | InputRouter.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CheckForKeyboardCaptures
(
const FInputDeviceState& Input |
InputRouter.h | ||
void CheckForMouseCaptures
(
const FInputDeviceState& Input |
InputRouter.h | ||
void HandleCapturedKeyboardInput
(
const FInputDeviceState& Input |
InputRouter.h | ||
void HandleCapturedMouseInput
(
const FInputDeviceState& Input |
InputRouter.h | ||
virtual void Initialize
(
IToolsContextTransactionsAPI* TransactionsAPI |
Initialize the InputRouter with the necessary Context-level state. | InputRouter.h | |
void OnApplicationFocusChanged
(
bool bInIsFocused |
InputRouter.h | ||
virtual void PostInputEvent_Keyboard
(
const FInputDeviceState& Input |
InputRouter.h | ||
virtual void PostInputEvent_Mouse
(
const FInputDeviceState& Input |
InputRouter.h | ||
bool ProcessMouseHover
(
const FInputDeviceState& Input |
InputRouter.h | ||
virtual void Shutdown () |
Shutdown the InputRouter. | InputRouter.h | |
void TerminateHover
(
EInputCaptureSide Side |
InputRouter.h | ||
bool UpdateExistingHoverCaptureIfPresent
(
const FInputDeviceState& Input |
InputRouter.h |