class

CArcInputProcessor

Module
Arc
Header
#include "Arc/Input/CArcInputProcessor.h"
Namespace
Arcf

Type aliases

AliasDescription
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

SignatureNameDescription
CArcInputProcessor() = defaultCArcInputProcessor

Public functions

ReturnsNameDescription
voidSetRootWidget
voidSetPlatformWindowThe OS window this processor belongs to — needed so StartTextInput targets the right window (keyboard-focus lookup fails for wrapped windows)
CReplyProcessMouseMove
CReplyProcessMouseButtonDown
CReplyProcessMouseButtonUp
CReplyProcessMouseWheel
CReplyProcessMouseWheelBoth wheel axes.
CReplyProcessKeyDown
CReplyProcessKeyUp
CReplyProcessKeyChar
CReplyProcessTextComposition
voidSetTextInputAreaReports the focused widget's caret rect (logical UI units) to the OS so the IME candidate window docks at the caret
voidSetFocus
voidSetFocus
voidClearFocus
boolFocusAdjacentWidgetTab traversal (U1): focus the next/previous focusable widget in paint order.
TSharedPtr<AWidget>GetFocusedWidget
voidSetWindowFocusedOS-level activation.
boolIsWindowFocused
boolIsTextProducingKeyTrue for keys whose press produces a character.
EArcTextInputTypeGetDesiredTextInputTypeThe OS text-input session the focused widget gets: Text or Password for a text field, NoComposition (characters, no IME) for anything else.
boolIsFieldUndoChordCtrl+Z, Ctrl+Y and Ctrl+Shift+Z: the chords a focused text input owns outright, so they never reach the scene undo.
voidSetTextFieldFocusHook
voidSetMouseCapture
voidReleaseMouseCapture
voidResetAll
TSharedPtr<AWidget>GetMouseCaptureWidget
EModifierKeyGetKeyboardModifiersThe 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&GetRootGeometryThe geometry hit tests start from.
TSharedPtr<AWidget>GetHoveredWidget
const std::vector<TSharedPtr<AWidget>>&GetHoveredPath
boolWantCaptureMouseCapture-want flags for host engines that arbitrate input between UI stacks
boolWantCaptureKeyboard
CWidgetPathHitTestPoint
CWidgetPathHitTestPointIgnoringCaptureThe path a drop target is resolved from.

Function details

CArcInputProcessor

C++
CArcInputProcessor() = default

SetRootWidget

C++
void SetRootWidget(TSharedPtr<AWidget> root, const CGeometry& rootGeometry)

SetPlatformWindow

C++
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

C++
CReply ProcessMouseMove(const ArcVec2& screenPos, EModifierKey modifiers)

ProcessMouseButtonDown

C++
CReply ProcessMouseButtonDown(EMouseButton button, const ArcVec2& screenPos, EModifierKey modifiers)

ProcessMouseButtonUp

C++
CReply ProcessMouseButtonUp(EMouseButton button, const ArcVec2& screenPos, EModifierKey modifiers)

ProcessMouseWheel

C++
CReply ProcessMouseWheel(float delta, const ArcVec2& screenPos, EModifierKey modifiers)

ProcessMouseWheel

C++
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

C++
CReply ProcessKeyDown(EKey key, EModifierKey modifiers, bool isRepeat)

ProcessKeyUp

C++
CReply ProcessKeyUp(EKey key, EModifierKey modifiers)

ProcessKeyChar

C++
CReply ProcessKeyChar(uint32_t character, EModifierKey modifiers)

ProcessTextComposition

C++
CReply ProcessTextComposition(const std::string& text, int32_t cursorStart, int32_t selectionLength)

SetTextInputArea

C++
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

C++
void SetFocus(TSharedPtr<AWidget> widget)

SetFocus

C++
void SetFocus(TSharedPtr<AWidget> widget, EFocusCause cause)

ClearFocus

C++
void ClearFocus()

FocusAdjacentWidget

C++
bool FocusAdjacentWidget(bool reverse)

Tab traversal (U1): focus the next/previous focusable widget in paint order. Returns false when the window has none.

GetFocusedWidget

C++
TSharedPtr<AWidget> GetFocusedWidget() const

SetWindowFocused

C++
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

C++
bool IsWindowFocused() const

IsTextProducingKey

C++
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

C++
EArcTextInputType GetDesiredTextInputType() const

The OS text-input session the focused widget gets: Text or Password for a text field, NoComposition (characters, no IME) for anything else.

IsFieldUndoChord

C++
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

C++
static void SetTextFieldFocusHook(FTextFieldFocusHook hook)

SetMouseCapture

C++
void SetMouseCapture(TSharedPtr<AWidget> widget)

ReleaseMouseCapture

C++
void ReleaseMouseCapture()

ResetAll

C++
void ResetAll()

GetMouseCaptureWidget

C++
TSharedPtr<AWidget> GetMouseCaptureWidget() const

GetKeyboardModifiers

C++
EModifierKey GetKeyboardModifiers() const

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).

GetRootGeometry

C++
const CGeometry& GetRootGeometry() const

The 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

C++
TSharedPtr<AWidget> GetHoveredWidget() const

GetHoveredPath

C++
const std::vector<TSharedPtr<AWidget>>& GetHoveredPath() const

WantCaptureMouse

C++
bool WantCaptureMouse() const

Capture-want flags for host engines that arbitrate input between UI stacks

WantCaptureKeyboard

C++
bool WantCaptureKeyboard() const

HitTestPoint

C++
CWidgetPath HitTestPoint(const ArcVec2& absolutePos) const

HitTestPointIgnoringCapture

C++
CWidgetPath HitTestPointIgnoringCapture(const ArcVec2& absolutePos) const

The 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.

Generated from Arc/Input/CArcInputProcessor.h via arc.json · Nov 5, 2026Version 1.0.0