Interface: UiValueTouchButtonProps<S>
Component props for UiValueTouchButton.
Type parameters
Name | Type |
---|---|
S | extends Subscribable <any > |
Hierarchy
Omit
<ValueTouchButtonProps
<S
>,"onTouched"
|"onPressed"
|"onHoldStarted"
|"onHoldTick"
|"onHoldEnded"
|"focusOnDrag"
|"class"
>↳
UiValueTouchButtonProps
Properties
canBeFocused
• Optional
canBeFocused: boolean
| Subscribable
<boolean
>
Whether the button can be focused. Irrespective of this value, the button cannot be focused while it is disabled
or not visible. Defaults to true
.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:123
children
• Optional
children: DisplayChildren
[]
The children of the display component.
Inherited from
Omit.children
Defined in
src/sdk/components/FSComponent.ts:122
class
• Optional
class: string
| ToggleableClassNameRecord
| SubscribableSet
<string
>
CSS class(es) to apply to the button's root element.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:129
dragThresholdPx
• Optional
dragThresholdPx: number
The distance, in pixels, the mouse can click and drag before the pad begins to ignore mouse events. Ignored if
inhibitOnDrag
is false
. Defaults to 40 pixels.
Inherited from
Omit.dragThresholdPx
Defined in
src/garminsdk/components/touchbutton/TouchButton.tsx:156
focusController
• Optional
focusController: UiFocusController
A UI focus controller with which to automatically register the button after it is rendered. If not defined, then the button will not be automatically registered with any controller, but it may still be registered manually.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:117
focusOnDrag
• Optional
focusOnDrag: boolean
Whether the pad should focus all mouse events when dragging, preventing them from bubbling up to any ancestors
in the DOM tree. Defaults to true
.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:93
focusOptions
• Optional
focusOptions: Readonly
<UiTouchButtonFocusModuleOptions
>
Options to configure the button's behavior related to UI focus.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:126
gduFormat
• Optional
gduFormat: GduFormat
The format of the button's parent GDU display. Used to set the button's inhibit on drag threshold unless otherwise
specified by the dragThresholdPx
prop. Defaults to '460'
.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:111
inhibitOnDrag
• Optional
inhibitOnDrag: boolean
Whether the button should stop responding to mouse events and instead forward them to its parent after clicking
and dragging for a certain distance defined by dragThresholdPx
along the axis defined by inhibitOnDragAxis
.
When mouse events are inhibited, the button cannot be primed or held. Defaults to false
.
Inherited from
Omit.inhibitOnDrag
Defined in
src/garminsdk/components/touchbutton/TouchButton.tsx:150
inhibitOnDragAxis
• Optional
inhibitOnDragAxis: "both"
| "x"
| "y"
The axis along which dragging will trigger the inhibit function. Ignored if inhibitOnDrag
is false
.
Defaults to 'both'
.
Inherited from
Omit.inhibitOnDragAxis
Defined in
src/garminsdk/components/touchbutton/TouchButton.tsx:162
isEnabled
• Optional
isEnabled: boolean
| Subscribable
<boolean
>
Whether the button is enabled, or a subscribable which provides it. Disabled buttons cannot be touched, primed,
pressed, or held. Defaults to true
.
Inherited from
Omit.isEnabled
Defined in
src/garminsdk/components/touchbutton/TouchButton.tsx:79
isHighlighted
• Optional
isHighlighted: boolean
| Subscribable
<boolean
>
Whether the button is highlighted, or a subscribable which provides it. Defaults to false
.
Inherited from
Omit.isHighlighted
Defined in
src/garminsdk/components/touchbutton/TouchButton.tsx:82
isInList
• Optional
isInList: boolean
Whether the button is in a scrollable list. If true
, will enable the inhibit on drag function unless otherwise
specified by the inhibitOnDrag
prop. Defaults to false
.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:99
isVisible
• Optional
isVisible: boolean
| Subscribable
<boolean
>
Whether the button is visible. Defaults to true
.
Inherited from
Omit.isVisible
Defined in
src/garminsdk/components/touchbutton/TouchButton.tsx:85
label
• Optional
label: string
| VNode
| Subscribable
<string
>
The label for the button. Can be defined as either a static string
, a subscribable which provides the label
string
, or a VNode. If not defined, the button will not have a label.
If the label is defined as a VNode, all first-level DisplayComponents in the VNode tree will be destroyed when the button is destroyed.
Inherited from
Omit.label
Defined in
src/garminsdk/components/touchbutton/TouchButton.tsx:94
listScrollAxis
• Optional
listScrollAxis: "x"
| "y"
The scroll axis of the button's parent list. Ignored if isInList
is false
. Sets the button's inhibit on drag
axis unless otherwise specified by the inhibitOnDragAxis
prop. Defaults to y
.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:105
onDestroy
• Optional
onDestroy: () => void
A callback function which will be called when the button is destroyed.
Type declaration
▸ (): void
A callback function which will be called when the button is destroyed.
Returns
void
Inherited from
Omit.onDestroy
Defined in
src/garminsdk/components/touchbutton/TouchButton.tsx:165
onFocusGained
• Optional
onFocusGained: <B>(button
: B
, direction
: UiFocusDirection
) => void
A function which is called when the button gains UI focus.
Param
The button that gained UI focus.
Type declaration
▸ <B
>(button
, direction
): void
A function which is called when the button gains UI focus.
Type parameters
Name | Type |
---|---|
B | extends UiValueTouchButton <S > = UiValueTouchButton <S > |
Parameters
Name | Type | Description |
---|---|---|
button | B | The button that gained UI focus. |
direction | UiFocusDirection | - |
Returns
void
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:81
onFocusLost
• Optional
onFocusLost: <B>(button
: B
) => void
A function which is called when the button loses UI focus.
Param
The button that lost UI focus.
Type declaration
▸ <B
>(button
): void
A function which is called when the button loses UI focus.
Type parameters
Name | Type |
---|---|
B | extends UiValueTouchButton <S > = UiValueTouchButton <S > |
Parameters
Name | Type | Description |
---|---|---|
button | B | The button that lost UI focus. |
Returns
void
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:87
onHoldEnded
• Optional
onHoldEnded: <B>(button
: B
, state
: S
, totalHoldDuration
: number
, endReason
: TouchButtonHoldEndReason
) => void
A function which is called when the button exits the held state.
Param
The button that was held.
Param
The state that is bound to the button.
Param
The total amount of time, in milliseconds, that the button was held.
Param
The reason that the button exited the held state.
Type declaration
▸ <B
>(button
, state
, totalHoldDuration
, endReason
): void
A function which is called when the button exits the held state.
Type parameters
Name | Type |
---|---|
B | extends UiValueTouchButton <S > = UiValueTouchButton <S > |
Parameters
Name | Type | Description |
---|---|---|
button | B | The button that was held. |
state | S | The state that is bound to the button. |
totalHoldDuration | number | The total amount of time, in milliseconds, that the button was held. |
endReason | TouchButtonHoldEndReason | The reason that the button exited the held state. |
Returns
void
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:70
onHoldStarted
• Optional
onHoldStarted: <B>(button
: B
, state
: S
) => TouchButtonHoldAction
A function which is called when the button enters the held state. If not defined, then the button will default to taking no specific action when it enters the held state.
Param
The button that is held.
Param
The state that is bound to the button.
Type declaration
▸ <B
>(button
, state
): TouchButtonHoldAction
A function which is called when the button enters the held state. If not defined, then the button will default to taking no specific action when it enters the held state.
Type parameters
Name | Type |
---|---|
B | extends UiValueTouchButton <S > = UiValueTouchButton <S > |
Parameters
Name | Type | Description |
---|---|---|
button | B | The button that is held. |
state | S | The state that is bound to the button. |
Returns
TouchButtonHoldAction
The action to take. Ignored if the value is equal to TouchButtonHoldAction.EndHold.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:42
onHoldTick
• Optional
onHoldTick: <B>(button
: B
, state
: S
, dt
: number
, totalTime
: number
, timeSinceLastPress
: number
) => TouchButtonHoldAction
A function which is called every frame when the button is held. If not defined, then the button will default to taking no specific action with each frame tick.
Param
The button that is held.
Param
The state that is bound to the button.
Param
The elapsed time, in milliseconds, since the previous frame.
Param
The total amount of time, in milliseconds, that the button has been held.
Param
The amount of time, in milliseconds, that the button has been held since the last time the button was pressed as a tick action.
Type declaration
▸ <B
>(button
, state
, dt
, totalTime
, timeSinceLastPress
): TouchButtonHoldAction
A function which is called every frame when the button is held. If not defined, then the button will default to taking no specific action with each frame tick.
Type parameters
Name | Type |
---|---|
B | extends UiValueTouchButton <S > = UiValueTouchButton <S > |
Parameters
Name | Type | Description |
---|---|---|
button | B | The button that is held. |
state | S | The state that is bound to the button. |
dt | number | The elapsed time, in milliseconds, since the previous frame. |
totalTime | number | The total amount of time, in milliseconds, that the button has been held. |
timeSinceLastPress | number | The amount of time, in milliseconds, that the button has been held since the last time the button was pressed as a tick action. |
Returns
TouchButtonHoldAction
The action to take.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:55
onPressed
• Optional
onPressed: <B>(button
: B
, state
: S
, isHeld
: boolean
) => void
A callback function which will be called when the button is pressed.
Param
The button that was pressed.
Param
The state that is bound to the button.
Param
Whether the button was held when it was pressed.
Type declaration
▸ <B
>(button
, state
, isHeld
): void
A callback function which will be called when the button is pressed.
Type parameters
Name | Type |
---|---|
B | extends UiValueTouchButton <S > = UiValueTouchButton <S > |
Parameters
Name | Type | Description |
---|---|---|
button | B | The button that was pressed. |
state | S | The state that is bound to the button. |
isHeld | boolean | Whether the button was held when it was pressed. |
Returns
void
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:33
onTouched
• Optional
onTouched: <B>(button
: B
, state
: S
) => TouchButtonOnTouchedAction
A callback function which will be called every time the button is touched (i.e. a mouse down event on the button is detected). If not defined, then the button will default to entering the primed state when touched.
Param
The button that was touched.
Param
The state that is bound to the button.
Type declaration
▸ <B
>(button
, state
): TouchButtonOnTouchedAction
A callback function which will be called every time the button is touched (i.e. a mouse down event on the button is detected). If not defined, then the button will default to entering the primed state when touched.
Type parameters
Name | Type |
---|---|
B | extends UiValueTouchButton <S > = UiValueTouchButton <S > |
Parameters
Name | Type | Description |
---|---|---|
button | B | The button that was touched. |
state | S | The state that is bound to the button. |
Returns
TouchButtonOnTouchedAction
The action to take as a result of the button being touched.
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/TouchButton/UiValueTouchButton.tsx:25
ref
• Optional
ref: NodeReference
<any
>
A reference to the display component.
Inherited from
Omit.ref
Defined in
src/sdk/components/FSComponent.ts:125
renderValue
• Optional
renderValue: VNode
| (stateValue
: SubscribableType
<S
>) => string
| VNode
A function which renders the value of the button's bound state, or a VNode which renders the value. If not
defined, values are rendered into strings via default toString()
behavior.
If the rendered value is a VNode, all first-level DisplayComponents in the VNode tree will be destroyed when a new value is rendered or when the button is destroyed.
Inherited from
Omit.renderValue
Defined in
src/garminsdk/components/touchbutton/ValueTouchButton.tsx:21
state
• state: S
A subscribable whose state will be bound to the button.
Inherited from
Omit.state
Defined in
src/garminsdk/components/touchbutton/ValueTouchButton.tsx:12