Class: UiTouchSlider<S>
A G3X Touch UI version of TouchSlider
. Supports UI focus, enables focus on drag and lock focus on drag by default.
The root element of the slider conditionally contains the ui-slider-focused
CSS class when the slider has UI
focus.
Type parameters
Name | Type |
---|---|
S | extends Subscribable <number > | MutableSubscribable <number > |
Hierarchy
DisplayComponent
<UiTouchSliderProps
<S
>>↳
UiTouchSlider
Implements
Constructors
constructor
• new UiTouchSlider<S
>(props
): UiTouchSlider
<S
>
Creates an instance of a DisplayComponent.
Type parameters
Name | Type |
---|---|
S | extends Subscribable <number > | MutableSubscribable <number , number > |
Parameters
Name | Type | Description |
---|---|---|
props | UiTouchSliderProps <S > | The propertis of the component. |
Returns
Inherited from
DisplayComponent<UiTouchSliderProps<S>>.constructor
Defined in
src/sdk/components/FSComponent.ts:73
Properties
canBeFocused
• Readonly
canBeFocused: Subscribable
<boolean
>
Whether this component can be focused.
Implementation of
UiFocusableComponent.canBeFocused
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:138
context
• Optional
context: [] = undefined
The context on this component, if any.
Inherited from
DisplayComponent.context
Defined in
src/sdk/components/FSComponent.ts:64
contextType
• Optional
Readonly
contextType: readonly [] = undefined
The type of context for this component, if any.
Inherited from
DisplayComponent.contextType
Defined in
src/sdk/components/FSComponent.ts:67
focusModule
• Protected
Readonly
focusModule: UiTouchSliderFocusModule
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:128
isUiFocusableComponent
• Readonly
isUiFocusableComponent: true
Flags this component as a UiFocusableComponent.
Implementation of
UiFocusableComponent.isUiFocusableComponent
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:124
props
• props: UiTouchSliderProps
<S
> & ComponentProps
The properties of the component.
Inherited from
DisplayComponent.props
Defined in
src/sdk/components/FSComponent.ts:61
sliderRef
• Protected
Readonly
sliderRef: NodeReference
<TouchSlider
<S
, TouchSliderProps
<S
>>>
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:126
Methods
destroy
▸ destroy(): void
Returns
void
Inherit Doc
Overrides
DisplayComponent.destroy
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:260
focusSelf
▸ focusSelf(): void
Attempts to set focus on this slider.
Returns
void
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:150
getContext
▸ getContext(context
): never
Gets a context data subscription from the context collection.
Parameters
Name | 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
Defined in
src/sdk/components/FSComponent.ts:106
onAfterRender
▸ onAfterRender(): void
Returns
void
Inherit Doc
Overrides
DisplayComponent.onAfterRender
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:143
onBeforeRender
▸ onBeforeRender(): void
A callback that is called before the component is rendered.
Returns
void
Inherited from
DisplayComponent.onBeforeRender
Defined in
src/sdk/components/FSComponent.ts:80
onDeregistered
▸ onDeregistered(): void
Responds to when this component is deregistered with a controller.
Returns
void
Implementation of
UiFocusableComponent.onDeregistered
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:160
onDragEnded
▸ onDragEnded(position
, initialPosition
): void
Responds to when a mouse drag is released on this slider.
Parameters
Name | Type | Description |
---|---|---|
position | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | The current position of the mouse. |
initialPosition | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | The position of the mouse at the start of the drag motion. |
Returns
void
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:221
onDragMoved
▸ onDragMoved(position
, prevPosition
, initialPosition
): void
Responds to when this slider is dragged.
Parameters
Name | Type | Description |
---|---|---|
position | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | The current mouse position. |
prevPosition | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | The position of the mouse at the previous update. |
initialPosition | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | The position of the mouse at the start of the current drag motion. |
Returns
void
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:212
onDragStarted
▸ onDragStarted(position
): void
Responds to when a mouse drag is started on this slider.
Parameters
Name | Type | Description |
---|---|---|
position | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | The current mouse position. |
Returns
void
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:198
onFocusGained
▸ onFocusGained(direction
): void
Responds to when this component gains focus.
Parameters
Name | Type | Description |
---|---|---|
direction | UiFocusDirection | The direction from which focus was gained. |
Returns
void
Implementation of
UiFocusableComponent.onFocusGained
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:165
onFocusLost
▸ onFocusLost(): void
Responds to when this component loses focus.
Returns
void
Implementation of
UiFocusableComponent.onFocusLost
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:171
onRegistered
▸ onRegistered(controller
): void
Responds to when this component is registered with a controller.
Parameters
Name | Type | Description |
---|---|---|
controller | UiFocusController | The controller with which this component was registered. |
Returns
void
Implementation of
UiFocusableComponent.onRegistered
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:155
onUiInteractionEvent
▸ onUiInteractionEvent(event
): boolean
Handles a UiInteractionEvent.
Parameters
Name | Type | Description |
---|---|---|
event | UiInteractionEvent | The event to handle. |
Returns
boolean
Whether the event was handled.
Implementation of
UiFocusableComponent.onUiInteractionEvent
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:177
onValueChanged
▸ onValueChanged(value
, state
): void
Responds to when this slider's value changes from user input.
Parameters
Name | Type | Description |
---|---|---|
value | number | The new slider value. |
state | S | The slider's bound state. |
Returns
void
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:186
render
▸ render(): VNode
Returns
VNode
Inherit Doc
Overrides
DisplayComponent.render
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchSlider/UiTouchSlider.tsx:226