CArcInputProcessor
- Module
- Arc
- Header
#include "Arc/Input/CArcInputProcessor.h"- Namespace
Arcf
Type aliases
| Alias | Description |
|---|---|
using FTextFieldFocusHook = std::function<void(const ArcRect& fieldRect, bool password, EFocusCause cause)> | Called when a text-editing widget gains focus, with its window-space rect: the game host raises the platform keyboard (Steam Deck) there. Arc stays platform-free; an empty hook is the default. |
Constructors
| Signature | Name | Description |
|---|---|---|
CArcInputProcessor() = default | CArcInputProcessor |
Public functions
| Returns | Name | Description |
|---|---|---|
void | SetRootWidget | |
void | SetPlatformWindow | The OS window this processor belongs to — needed so StartTextInput targets the right window (keyboard-focus lookup fails for wrapped windows) |
CReply | ProcessMouseMove | |
CReply | ProcessMouseButtonDown | |
CReply | ProcessMouseButtonUp | |
CReply | ProcessMouseWheel | |
CReply | ProcessMouseWheel | Both wheel axes. |
CReply | ProcessKeyDown | |
CReply | ProcessKeyUp | |
CReply | ProcessKeyChar | |
CReply | ProcessTextComposition | |
void | SetTextInputArea | Reports the focused widget's caret rect (logical UI units) to the OS so the IME candidate window docks at the caret |
void | SetFocus | |
void | SetFocus | |
void | ClearFocus | |
bool | FocusAdjacentWidget | Tab traversal (U1): focus the next/previous focusable widget in paint order. |
TSharedPtr<AWidget> | GetFocusedWidget | |
void | SetWindowFocused | OS-level activation. |
bool | IsWindowFocused | |
bool | IsTextProducingKey | True for keys whose press produces a character. |
EArcTextInputType | GetDesiredTextInputType | The OS text-input session the focused widget gets: Text or Password for a text field, NoComposition (characters, no IME) for anything else. |
bool | IsFieldUndoChord | Ctrl+Z, Ctrl+Y and Ctrl+Shift+Z: the chords a focused text input owns outright, so they never reach the scene undo. |
void | SetTextFieldFocusHook | |
void | SetMouseCapture | |
void | ReleaseMouseCapture | |
void | ResetAll | |
TSharedPtr<AWidget> | GetMouseCaptureWidget | |
EModifierKey | GetKeyboardModifiers | The modifiers held as of the last key event — for a click handler that has no event of its own (Shift-click a section header). |
const CGeometry& | GetRootGeometry | The geometry hit tests start from. |
TSharedPtr<AWidget> | GetHoveredWidget | |
const std::vector<TSharedPtr<AWidget>>& | GetHoveredPath | |
bool | WantCaptureMouse | Capture-want flags for host engines that arbitrate input between UI stacks |
bool | WantCaptureKeyboard | |
CWidgetPath | HitTestPoint | |
CWidgetPath | HitTestPointIgnoringCapture | The path a drop target is resolved from. |
Function details
CArcInputProcessor
CArcInputProcessor() = defaultSetRootWidget
void SetRootWidget(TSharedPtr<AWidget> root, const CGeometry& rootGeometry)SetPlatformWindow
void SetPlatformWindow(IArcPlatformWindow* window)The OS window this processor belongs to — needed so StartTextInput targets the right window (keyboard-focus lookup fails for wrapped windows)
ProcessMouseMove
CReply ProcessMouseMove(const ArcVec2& screenPos, EModifierKey modifiers)ProcessMouseButtonDown
CReply ProcessMouseButtonDown(EMouseButton button, const ArcVec2& screenPos, EModifierKey modifiers)ProcessMouseButtonUp
CReply ProcessMouseButtonUp(EMouseButton button, const ArcVec2& screenPos, EModifierKey modifiers)ProcessMouseWheel
CReply ProcessMouseWheel(float delta, const ArcVec2& screenPos, EModifierKey modifiers)ProcessMouseWheel
CReply ProcessMouseWheel(float delta, float deltaX, const ArcVec2& screenPos, EModifierKey modifiers)Both wheel axes. The walk is leaf to root and stops at the first widget that handles the event, so a scroller at its limit that declines hands the wheel to the one around it.
ProcessKeyDown
CReply ProcessKeyDown(EKey key, EModifierKey modifiers, bool isRepeat)ProcessKeyUp
CReply ProcessKeyUp(EKey key, EModifierKey modifiers)ProcessKeyChar
CReply ProcessKeyChar(uint32_t character, EModifierKey modifiers)ProcessTextComposition
CReply ProcessTextComposition(const std::string& text, int32_t cursorStart, int32_t selectionLength)SetTextInputArea
void SetTextInputArea(const ArcRect& logicalRect, float cursorOffsetX)Reports the focused widget's caret rect (logical UI units) to the OS so the IME candidate window docks at the caret
SetFocus
void SetFocus(TSharedPtr<AWidget> widget)SetFocus
void SetFocus(TSharedPtr<AWidget> widget, EFocusCause cause)ClearFocus
void ClearFocus()FocusAdjacentWidget
bool FocusAdjacentWidget(bool reverse)Tab traversal (U1): focus the next/previous focusable widget in paint order. Returns false when the window has none.
GetFocusedWidget
TSharedPtr<AWidget> GetFocusedWidget() constSetWindowFocused
void SetWindowFocused(bool focused)OS-level activation. Losing it drops keyboard focus (so an editable widget commits its edit), releases capture and ends hovering.
IsWindowFocused
bool IsWindowFocused() constIsTextProducingKey
static bool IsTextProducingKey(EKey key)True for keys whose press produces a character. A focused text widget owns those without a command modifier; everything else (function keys, Escape, navigation) still reaches the command system once the widget declines it.
GetDesiredTextInputType
EArcTextInputType GetDesiredTextInputType() constThe OS text-input session the focused widget gets: Text or Password for a text field, NoComposition (characters, no IME) for anything else.
IsFieldUndoChord
static bool IsFieldUndoChord(EKey key, EModifierKey modifiers)Ctrl+Z, Ctrl+Y and Ctrl+Shift+Z: the chords a focused text input owns outright, so they never reach the scene undo.
SetTextFieldFocusHook
static void SetTextFieldFocusHook(FTextFieldFocusHook hook)SetMouseCapture
void SetMouseCapture(TSharedPtr<AWidget> widget)ReleaseMouseCapture
void ReleaseMouseCapture()ResetAll
void ResetAll()GetMouseCaptureWidget
TSharedPtr<AWidget> GetMouseCaptureWidget() constGetKeyboardModifiers
EModifierKey GetKeyboardModifiers() constThe modifiers held as of the last key event — for a click handler that has no event of its own (Shift-click a section header).
GetRootGeometry
const CGeometry& GetRootGeometry() constThe geometry hit tests start from. It is refreshed as each event is routed, so a zero size means no pointer event has arrived yet rather than a broken layout - a diagnostic has to tell those apart.
GetHoveredWidget
TSharedPtr<AWidget> GetHoveredWidget() constGetHoveredPath
const std::vector<TSharedPtr<AWidget>>& GetHoveredPath() constWantCaptureMouse
bool WantCaptureMouse() constCapture-want flags for host engines that arbitrate input between UI stacks
WantCaptureKeyboard
bool WantCaptureKeyboard() constHitTestPoint
CWidgetPath HitTestPoint(const ArcVec2& absolutePos) constHitTestPointIgnoringCapture
CWidgetPath HitTestPointIgnoringCapture(const ArcVec2& absolutePos) constThe path a drop target is resolved from. Identical to HitTestPoint except that the widget holding mouse capture — the drag source, which owns every move event for the length of the gesture — and everything below it are cut away, so a drag can never resolve onto itself.