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
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
Properties
canBeFocused
readonly
canBeFocused: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?
optional
context: [] =undefined
Defined in: src/sdk/components/FSComponent.ts:64
The context on this component, if any.
Inherited from
contextType?
readonly
optional
contextType: readonly [] =undefined
Defined in: src/sdk/components/FSComponent.ts:67
The type of context for this component, if any.
Inherited from
isUiFocusableComponent
readonly
isUiFocusableComponent: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
Defined in: src/sdk/components/FSComponent.ts:61
The properties of the component.
Inherited from
Methods
destroy()
destroy():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:104
Destroys this component.
Returns
void
Overrides
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()
protected
getContext(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
onAfterRender()
onAfterRender(
thisNode
):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/GenericUiFocusableComponent.tsx:55
A callback that is called after the component is rendered.
Parameters
Parameter | Type | Description |
---|---|---|
thisNode | VNode | The component's VNode. |
Returns
void
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
Renders the component.
Returns
A JSX element to be rendered.