Skip to main content

Interface: GtcSetValueTouchButtonProps<S>

Component props for GtcSetValueTouchButton.

Type parameters

NameType
Sextends MutableSubscribable<any>

Hierarchy

  • SetValueTouchButtonProps<S>

    GtcSetValueTouchButtonProps

Properties

children

Optional children: DisplayChildren[]

The children of the display component.

Inherited from

SetValueTouchButtonProps.children

Defined in

sdk/components/FSComponent.ts:122


class

Optional class: string | SubscribableSet<string>

CSS class(es) to apply to the button's root element.

Inherited from

SetValueTouchButtonProps.class

Defined in

garminsdk/components/touchbutton/TouchButton.tsx:168


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

SetValueTouchButtonProps.dragThresholdPx

Defined in

garminsdk/components/touchbutton/TouchButton.tsx:156


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.

Overrides

SetValueTouchButtonProps.focusOnDrag

Defined in

workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/TouchButton/GtcSetValueTouchButton.tsx:16


gtcOrientation

Optional gtcOrientation: GtcOrientation

The orientation of the button's parent GTC. Used to set the button's inhibit on drag threshold unless otherwise specified by the dragThresholdPx prop. Defaults to 'horizontal'.

Defined in

workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/TouchButton/GtcSetValueTouchButton.tsx:34


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

SetValueTouchButtonProps.inhibitOnDrag

Defined in

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

SetValueTouchButtonProps.inhibitOnDragAxis

Defined in

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

SetValueTouchButtonProps.isEnabled

Defined in

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

SetValueTouchButtonProps.isHighlighted

Defined in

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

workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/TouchButton/GtcSetValueTouchButton.tsx:22


isVisible

Optional isVisible: boolean | Subscribable<boolean>

Whether the button is visible. Defaults to true.

Inherited from

SetValueTouchButtonProps.isVisible

Defined in

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

SetValueTouchButtonProps.label

Defined in

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

workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/TouchButton/GtcSetValueTouchButton.tsx:28


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

SetValueTouchButtonProps.onDestroy

Defined in

garminsdk/components/touchbutton/TouchButton.tsx:165


onHoldEnded

Optional onHoldEnded: <B>(button: B, state: S, setValue: SubscribableType<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 value that the button sets.

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, setValue, totalHoldDuration, endReason): void

A function which is called when the button exits the held state.

Type parameters
NameType
Bextends SetValueTouchButton<S> = SetValueTouchButton<S>
Parameters
NameTypeDescription
buttonBThe button that was held.
stateSThe state that is bound to the button.
setValueSubscribableType<S>The value that the button sets.
totalHoldDurationnumberThe total amount of time, in milliseconds, that the button was held.
endReasonTouchButtonHoldEndReasonThe reason that the button exited the held state.
Returns

void

Inherited from

SetValueTouchButtonProps.onHoldEnded

Defined in

garminsdk/components/touchbutton/SetValueTouchButton.tsx:80


onHoldStarted

Optional onHoldStarted: <B>(button: B, state: S, setValue: SubscribableType<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.

Param

The value that the button sets.

Type declaration

▸ <B>(button, state, setValue): 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
NameType
Bextends SetValueTouchButton<S> = SetValueTouchButton<S>
Parameters
NameTypeDescription
buttonBThe button that is held.
stateSThe state that is bound to the button.
setValueSubscribableType<S>The value that the button sets.
Returns

TouchButtonHoldAction

The action to take. Ignored if the value is equal to TouchButtonHoldAction.EndHold.

Inherited from

SetValueTouchButtonProps.onHoldStarted

Defined in

garminsdk/components/touchbutton/SetValueTouchButton.tsx:49


onHoldTick

Optional onHoldTick: <B>(button: B, state: S, setValue: SubscribableType<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 value that the button sets.

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, setValue, 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
NameType
Bextends SetValueTouchButton<S> = SetValueTouchButton<S>
Parameters
NameTypeDescription
buttonBThe button that is held.
stateSThe state that is bound to the button.
setValueSubscribableType<S>The value that the button sets.
dtnumberThe elapsed time, in milliseconds, since the previous frame.
totalTimenumberThe total amount of time, in milliseconds, that the button has been held.
timeSinceLastPressnumberThe 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.

Inherited from

SetValueTouchButtonProps.onHoldTick

Defined in

garminsdk/components/touchbutton/SetValueTouchButton.tsx:63


onPressed

Optional onPressed: <B>(button: B, state: S, setValue: SubscribableType<S>, isHeld: boolean) => void

A callback function which will be called when the button is pressed. If not defined, pressing the button will apply the button's set value to its bound state.

Param

The button that was pressed.

Param

The state that is bound to the button.

Param

The value that the button sets.

Param

Whether the button was held when it was pressed.

Type declaration

▸ <B>(button, state, setValue, isHeld): void

A callback function which will be called when the button is pressed. If not defined, pressing the button will apply the button's set value to its bound state.

Type parameters
NameType
Bextends SetValueTouchButton<S> = SetValueTouchButton<S>
Parameters
NameTypeDescription
buttonBThe button that was pressed.
stateSThe state that is bound to the button.
setValueSubscribableType<S>The value that the button sets.
isHeldbooleanWhether the button was held when it was pressed.
Returns

void

Inherited from

SetValueTouchButtonProps.onPressed

Defined in

garminsdk/components/touchbutton/SetValueTouchButton.tsx:39


onTouched

Optional onTouched: <B>(button: B, state: S, setValue: SubscribableType<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.

Param

The value that the button sets.

Type declaration

▸ <B>(button, state, setValue): 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
NameType
Bextends SetValueTouchButton<S> = SetValueTouchButton<S>
Parameters
NameTypeDescription
buttonBThe button that was touched.
stateSThe state that is bound to the button.
setValueSubscribableType<S>The value that the button sets.
Returns

TouchButtonOnTouchedAction

The action to take as a result of the button being touched.

Inherited from

SetValueTouchButtonProps.onTouched

Defined in

garminsdk/components/touchbutton/SetValueTouchButton.tsx:29


ref

Optional ref: NodeReference<any>

A reference to the display component.

Inherited from

SetValueTouchButtonProps.ref

Defined in

sdk/components/FSComponent.ts:125


setValue

setValue: SubscribableType<S> | Subscribable<SubscribableType<S>>

A subscribable which provides the value that the button sets.

Inherited from

SetValueTouchButtonProps.setValue

Defined in

garminsdk/components/touchbutton/SetValueTouchButton.tsx:19


state

state: S

A mutable subscribable whose state will be bound to the button.

Inherited from

SetValueTouchButtonProps.state

Defined in

garminsdk/components/touchbutton/SetValueTouchButton.tsx:16