Class: GenericUiFocusableComponent
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:43
A generic implementation of UiFocusableComponent which renders its children as-is and defers callback logic to
functions passed to its props.
Extends
DisplayComponent<GenericUiFocusableComponentProps>
Implements
Constructors
Constructor
new GenericUiFocusableComponent(
props):GenericUiFocusableComponent
Defined in: src/sdk/components/FSComponent.ts:73
Creates an instance of a DisplayComponent.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | GenericUiFocusableComponentProps | The propertis of the component. |
Returns
GenericUiFocusableComponent
Inherited from
DisplayComponent<GenericUiFocusableComponentProps>.constructor
Properties
canBeFocused
readonlycanBeFocused:Subscribable<boolean> |Subscribable<false> |Subscribable<true>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:52
Whether this component can be focused.
Implementation of
UiFocusableComponent.canBeFocused
context?
optionalcontext: [] =undefined
Defined in: src/sdk/components/FSComponent.ts:64
The context on this component, if any.
Inherited from
DisplayComponent.context
contextType?
readonlyoptionalcontextType: readonly [] =undefined
Defined in: src/sdk/components/FSComponent.ts:67
The type of context for this component, if any.
Inherited from
DisplayComponent.contextType
isUiFocusableComponent
readonlyisUiFocusableComponent:true=true
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:49
Flags this component as a UiFocusableComponent.
Implementation of
UiFocusableComponent.isUiFocusableComponent
props
props:
GenericUiFocusableComponentProps&ComponentProps
Defined in: src/sdk/components/FSComponent.ts:61
The properties of the component.
Inherited from
DisplayComponent.props
Methods
destroy()
destroy():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:104
Returns
void
Inherit Doc
Overrides
DisplayComponent.destroy
focusSelf()
focusSelf(
direction?):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:65
Attempts to set focus on this component.
Parameters
| Parameter | Type | Description |
|---|---|---|
direction? | UiFocusDirection | The direction from which to set focus. Defaults to UiFocusDirection.Unspecified. |
Returns
void
getContext()
protectedgetContext(context):never
Defined in: src/sdk/components/FSComponent.ts:106
Gets a context data subscription from the context collection.
Parameters
| Parameter | Type | Description |
|---|---|---|
context | never | The context to get the subscription for. |
Returns
never
The requested context.
Throws
An error if no data for the specified context type could be found.
Inherited from
DisplayComponent.getContext
onAfterRender()
onAfterRender(
thisNode):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:55
Parameters
| Parameter | Type |
|---|---|
thisNode | VNode |
Returns
void
Inherit Doc
Overrides
DisplayComponent.onAfterRender
onBeforeRender()
onBeforeRender():
void
Defined in: src/sdk/components/FSComponent.ts:80
A callback that is called before the component is rendered.
Returns
void
Inherited from
DisplayComponent.onBeforeRender
onDeregistered()
onDeregistered(
controller):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:76
Responds to when this component is deregistered with a controller.
Parameters
| Parameter | Type | Description |
|---|---|---|
controller | UiFocusController | The controller with which this component was deregistered. |
Returns
void
Implementation of
UiFocusableComponent.onDeregistered
onFocusGained()
onFocusGained(
direction):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:82
Responds to when this component gains focus.
Parameters
| Parameter | Type | Description |
|---|---|---|
direction | UiFocusDirection | The direction from which focus was gained. |
Returns
void
Implementation of
UiFocusableComponent.onFocusGained
onFocusLost()
onFocusLost():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:87
Responds to when this component loses focus.
Returns
void
Implementation of
UiFocusableComponent.onFocusLost
onRegistered()
onRegistered(
controller):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:70
Responds to when this component is registered with a controller.
Parameters
| Parameter | Type | Description |
|---|---|---|
controller | UiFocusController | The controller with which this component was registered. |
Returns
void
Implementation of
UiFocusableComponent.onRegistered
onUiInteractionEvent()
onUiInteractionEvent(
event):boolean
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:92
Handles a UiInteractionEvent.
Parameters
| Parameter | Type | Description |
|---|---|---|
event | UiInteractionEvent | The event to handle. |
Returns
boolean
Whether the event was handled.
Implementation of
UiFocusableComponent.onUiInteractionEvent
render()
render():
VNode
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:97
Returns
VNode
Inherit Doc
Overrides
DisplayComponent.render