UIFocusStack
Defined in: ui/src/focus/UIFocusStack.ts:20
Every focus scope in one scene, and which of them reads input.
A scope shows and hides with its own subtree, so this is not a push/pop list: each frame it records which scopes are shown and gives input to the innermost one. Hiding a dialog inside a menu hands the keys back to the menu, on the row it had.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UIFocusStack():
UIFocusStack
Returns
Section titled “Returns”UIFocusStack
Accessors
Section titled “Accessors”active
Section titled “active”Get Signature
Section titled “Get Signature”get active():
UIFocusScope|null
Defined in: ui/src/focus/UIFocusStack.ts:26
The scope reading input, or null while none is shown.
Returns
Section titled “Returns”UIFocusScope | null
Methods
Section titled “Methods”_drive()
Section titled “_drive()”_drive(
input):void
Defined in: ui/src/focus/UIFocusStack.ts:72
Internal
Give input to the innermost scope shown and run its frame. A scope holding a shown scope inside it stands aside. Among the rest, the one shown most recently wins, and two shown in the same frame rank in registration order.
Parameters
Section titled “Parameters”UIFocusInputSource | null
Returns
Section titled “Returns”void
_hasDeviceScope()
Section titled “_hasDeviceScope()”_hasDeviceScope():
boolean
Defined in: ui/src/focus/UIFocusStack.ts:102
Internal
Whether any shown scope reads a device.
Returns
Section titled “Returns”boolean
_observe()
Section titled “_observe()”_observe():
boolean
Defined in: ui/src/focus/UIFocusStack.ts:51
Internal
Recompute which scopes are shown, stamping each one that just became shown, and report whether any is. Runs for every scene each frame, driven or not, so a menu shown under a pushed scene gets its stamp that frame.
Returns
Section titled “Returns”boolean
_register()
Section titled “_register()”_register(
scope):void
Defined in: ui/src/focus/UIFocusStack.ts:31
Internal
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
_suspend()
Section titled “_suspend()”_suspend():
void
Defined in: ui/src/focus/UIFocusStack.ts:95
Internal
Take input away from whatever holds it, dropping its latch.
Returns
Section titled “Returns”void
_unregister()
Section titled “_unregister()”_unregister(
scope):void
Defined in: ui/src/focus/UIFocusStack.ts:36
Internal
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
destroy()
Section titled “destroy()”destroy():
void
Defined in: ui/src/focus/UIFocusStack.ts:109
Forget every scope. Called when the owning scene exits.
Returns
Section titled “Returns”void
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/ui.md.