Constructs a new FocusManager
instance.
Private
currentOptional
focusDebug group for visualizing focus.
Optional
focusDebug label for visualizing focus.
Optional
focusDebug rectangle for visualizing focus.
Optional
focusedThe currently focused view.
Optional
focusThe view on which focus is locked.
Indicates whether focus is currently locked.
Indicates whether the focus is locked on the native renderer.
Private
isThe current key event being processed.
A mapping of key strings to Key
enums.
Private
keyA mapping of keys to navigation directions.
The last view that was focused.
Indicates whether a long press has been triggered.
Injected system service for accessing system-level utilities.
Locks focus on the specified view.
The view to lock focus on.
Unlocks focus.
Internal method to handle periodic updates for focus management.
Toggles the visibility of the debug view.
Adds a debug view for visualizing focus.
Private
notifyNotifies parent views of a focused child change event.
The child view that triggered the event.
Handles key events and updates the key state.
The key pressed or released.
Whether the key is pressed.
True if the key event was handled, false otherwise.
Private
registerRegisters an error for the specified view.
The error message.
The view associated with the error.
Reports the current key event to the focused view.
Private
sendSends a key event notification to the system.
The key event to send.
Sets focus to the specified view.
The view to focus on.
Whether to force the focus change (default: false).
An operation result indicating success or failure.
Sets the native focus on the specified renderer or the global scene.
Optional
renderer: ISGNNodeThe renderer to set focus on (optional).
Updates the debug rectangle for visualizing focus.
FocusManager
is responsible for managing focus within the application. It handles key events, focus transitions, and focus locking mechanisms.