Skip to main content

Class: UiTouchSliderFocusModule

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:28

A module which handles UI focus for a touchscreen slider.

The module syncs whether it can be focused with whether its parent slider is enabled and visible. When registered with a focus controller, the module will attempt to set focus on itself. Finally, the module handles adding the ui-slider-focused CSS class to the slider's class list when focused.

Implements

Constructors

Constructor

new UiTouchSliderFocusModule(slider, isSliderVisible, isSliderEnabled, sliderCanBeFocused, cssClass?, options?): UiTouchSliderFocusModule

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:59

Creates a new instance of UiTouchSliderFocusModule.

Parameters

ParameterTypeDescription
sliderUiFocusableComponentThis module's parent slider.
isSliderVisibleundefined | boolean | Subscribable<boolean>Whether this module's parent slider is visible.
isSliderEnabledundefined | boolean | Subscribable<boolean>Whether this module's parent slider is enabled.
sliderCanBeFocusedundefined | boolean | Subscribable<boolean>Whethe this module's parent slider can be focused.
cssClass?string | ToggleableClassNameRecord | SubscribableSet<string>CSS class(es) to apply to this module's parent slider.
options?Readonly<UiTouchSliderFocusModuleOptions>Options with which to configure this module.

Returns

UiTouchSliderFocusModule

Properties

canBeFocused

readonly canBeFocused: Subscribable<boolean>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:36

Whether this component can be focused.

Implementation of

UiFocusableComponent.canBeFocused


cssClass

readonly cssClass: SubscribableSet<string>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:46

The set of CSS classes to apply to this module's parent button, including any that are applied by this module.


isEnabled

readonly isEnabled: Subscribable<boolean>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:39

Whether this module's parent button is enabled.


isUiFocusableComponent

readonly isUiFocusableComponent: true = true

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:30

Flags this component as a UiFocusableComponent.

Implementation of

UiFocusableComponent.isUiFocusableComponent


isVisible

readonly isVisible: Subscribable<boolean>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:42

Whether this module's parent button is visible.

Methods

destroy()

destroy(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:146

Destroys this module.

Returns

void


focusSlider()

focusSlider(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:97

Attempts to set focus on this module's parent slider.

Returns

void


onDeregistered()

onDeregistered(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:116

Responds to when this component is deregistered with a controller.

Returns

void

Implementation of

UiFocusableComponent.onDeregistered


onFocusGained()

onFocusGained(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:121

Responds to when this component gains focus.

Returns

void

Implementation of

UiFocusableComponent.onFocusGained


onFocusLost()

onFocusLost(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:126

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/UiTouchSliderFocusModule.ts:111

Responds to when this component is registered with a controller.

Parameters

ParameterTypeDescription
controllerUiFocusControllerThe controller with which this component was registered.

Returns

void

Implementation of

UiFocusableComponent.onRegistered


onSliderDragStarted()

onSliderDragStarted(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:106

Responds to when a drag motion has started on this module's parent slider.

Returns

void


onUiInteractionEvent()

onUiInteractionEvent(event): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSliderFocusModule.ts:131

Handles a UiInteractionEvent.

Parameters

ParameterTypeDescription
eventUiInteractionEventThe event to handle.

Returns

boolean

Whether the event was handled.

Implementation of

UiFocusableComponent.onUiInteractionEvent