Class: UiTouchSlider<S>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:120
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.
Extends
Type Parameters
| Type Parameter |
|---|
S extends Subscribable<number> | MutableSubscribable<number> |
Implements
Constructors
Constructor
new UiTouchSlider<
S>(props):UiTouchSlider<S>
Defined in: src/sdk/components/FSComponent.ts:73
Creates an instance of a DisplayComponent.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | UiTouchSliderProps | The propertis of the component. |
Returns
UiTouchSlider<S>
Inherited from
Properties
canBeFocused
readonlycanBeFocused:Subscribable<boolean>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:138
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
contextType?
readonlyoptionalcontextType: readonly [] =undefined
Defined in: src/sdk/components/FSComponent.ts:67
The type of context for this component, if any.
Inherited from
focusModule
protectedreadonlyfocusModule:UiTouchSliderFocusModule
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:128
isUiFocusableComponent
readonlyisUiFocusableComponent:true=true
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:124
Flags this component as a UiFocusableComponent.
Implementation of
UiFocusableComponent.isUiFocusableComponent
props
props:
UiTouchSliderProps<S> &ComponentProps
Defined in: src/sdk/components/FSComponent.ts:61
The properties of the component.
Inherited from
sliderRef
protectedreadonlysliderRef:NodeReference<TouchSlider<S,TouchSliderProps<S>>>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:126
Methods
destroy()
destroy():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:260
Destroys this component.
Returns
void
Overrides
focusSelf()
focusSelf():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:150
Attempts to set focus on this slider.
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
onAfterRender()
onAfterRender():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:143
A callback that is called after the component is rendered.
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():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:160
Responds to when this component is deregistered with a controller.
Returns
void
Implementation of
UiFocusableComponent.onDeregistered
onDragEnded()
protectedonDragEnded(position,initialPosition):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:221
Responds to when a mouse drag is released on this slider.
Parameters
| Parameter | Type | Description |
|---|---|---|
position | ReadonlyFloat64Array | The current position of the mouse. |
initialPosition | ReadonlyFloat64Array | The position of the mouse at the start of the drag motion. |
Returns
void
onDragMoved()
protectedonDragMoved(position,prevPosition,initialPosition):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:212
Responds to when this slider is dragged.
Parameters
| Parameter | Type | Description |
|---|---|---|
position | ReadonlyFloat64Array | The current mouse position. |
prevPosition | ReadonlyFloat64Array | The position of the mouse at the previous update. |
initialPosition | ReadonlyFloat64Array | The position of the mouse at the start of the current drag motion. |
Returns
void
onDragStarted()
protectedonDragStarted(position):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:198
Responds to when a mouse drag is started on this slider.
Parameters
| Parameter | Type | Description |
|---|---|---|
position | ReadonlyFloat64Array | The current mouse position. |
Returns
void
onFocusGained()
onFocusGained(
direction):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:165
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/Components/TouchSlider/UiTouchSlider.tsx:171
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/Components/TouchSlider/UiTouchSlider.tsx:155
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/Components/TouchSlider/UiTouchSlider.tsx:177
Handles a UiInteractionEvent.
Parameters
| Parameter | Type | Description |
|---|---|---|
event | UiInteractionEvent | The event to handle. |
Returns
boolean
Whether the event was handled.
Implementation of
UiFocusableComponent.onUiInteractionEvent
onValueChanged()
protectedonValueChanged(value,state):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:186
Responds to when this slider's value changes from user input.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | number | The new slider value. |
state | S | The slider's bound state. |
Returns
void
render()
render():
VNode
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:226
Renders the component.
Returns
A JSX element to be rendered.