Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
Inheritance Hierarchy
- UObject
- UInputRouter
References
| Module | InteractiveToolsFramework |
| Header | /Engine/Source/Runtime/InteractiveToolsFramework/Public/InputRouter.h |
| Include | #include "InputRouter.h" |
Syntax
UCLASS (Transient, MinimalAPI)
class UInputRouter : public UObject
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UInputBehaviorSet > | ActiveInputBehaviors | ||
| UInputBehavior * | ActiveKeyboardCapture | ||
| FInputCaptureData | ActiveKeyboardCaptureData | ||
| void * | ActiveKeyboardCaptureOwner | ||
| UInputBehavior * | ActiveLeftCapture | ||
| FInputCaptureData | ActiveLeftCaptureData | ||
| void * | ActiveLeftCaptureOwner | ||
| UInputBehavior * | ActiveLeftHoverCapture | Hover support | |
| void * | ActiveLeftHoverCaptureOwner | ||
| UInputBehavior * | ActiveRightCapture | ||
| FInputCaptureData | ActiveRightCaptureData | ||
| void * | ActiveRightCaptureOwner | ||
| bool | bAutoInvalidateOnCapture | If true, then we post an Invalidation (ie redraw) request on every captured input event (default false) | |
| bool | bAutoInvalidateOnHover | If true, then we post an Invalidation (ie redraw) request if any active InputBehavior responds to Hover events (default false) | |
| FInputDeviceState | LastMouseInputState | ||
| IToolsContextTransactionsAPI * | TransactionsAPI |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UInputRouter () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CheckForKeyboardCaptures
(
const FInputDeviceState& Input |
||
| void | CheckForMouseCaptures
(
const FInputDeviceState& Input |
||
| void | DeregisterSource
(
IInputBehaviorSource* Source |
Remove Behaviors from this Source from the active set | |
| void | Terminate any active captures and end all hovers | ||
| void | ForceTerminateSource
(
IInputBehaviorSource* Source |
If this Behavior is capturing, call ForceEndCapture() to notify that we are taking capture away | |
| void | HandleCapturedKeyboardInput
(
const FInputDeviceState& Input |
||
| void | HandleCapturedMouseInput
(
const FInputDeviceState& Input |
||
| bool | Returns true if there is an active mouse capture | ||
| void | Initialize
(
IToolsContextTransactionsAPI* TransactionsAPI |
Initialize the InputRouter with the necessary Context-level state. | |
| void | PostHoverInputEvent
(
const FInputDeviceState& Input |
Insert a new hover input event which is forwarded to all hover-enabled Behaviors | |
| bool | PostInputEvent
(
const FInputDeviceState& Input |
Insert a new input event which is used to check for new captures, or forwarded to active capture | |
| void | PostInputEvent_Keyboard
(
const FInputDeviceState& Input |
||
| void | PostInputEvent_Mouse
(
const FInputDeviceState& Input |
||
| bool | ProcessMouseHover
(
const FInputDeviceState& Input |
||
| void | RegisterSource
(
IInputBehaviorSource* Source |
Add a new behavior Source. Behaviors from this source will be added to the active behavior set. | |
| void | Shutdown () |
Shutdown the InputRouter. | |
| void | TerminateHover
(
EInputCaptureSide Side |
||
| bool | UpdateExistingHoverCaptureIfPresent
(
const FInputDeviceState& Input |