Interface: UiListButtonProps
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListButton.tsx:15
Component props for UiListButton.
Extends
ComponentProps
.Pick
<UiTouchButtonProps
,"isEnabled"
|"isHighlighted"
|"label"
|"onTouched"
|"onPressed"
|"onHoldStarted"
|"onHoldTick"
|"onHoldEnded"
|"onFocusGained"
|"onFocusLost"
|"gduFormat"
|"canBeFocused"
>
Properties
canBeFocused?
optional
canBeFocused:boolean
|Subscribable
<boolean
>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchButton/UiTouchButton.tsx:108
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
.
Inherited from
Pick.canBeFocused
children?
optional
children:DisplayChildren
[]
Defined in: src/sdk/components/FSComponent.ts:122
The children of the display component.
Inherited from
ComponentProps.children
class?
optional
class:string
|ToggleableClassNameRecord
|SubscribableSet
<string
>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListButton.tsx:36
CSS class(es) to apply to the button's root element.
fullSize?
optional
fullSize:boolean
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListButton.tsx:24
Whether to render the button as a full-size button. A full-size button takes up the entire space allotted to the
the list item and is not surrounded by a visible border (besides the button's own border). Defaults to false
.
gduFormat?
optional
gduFormat:GduFormat
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchButton/UiTouchButton.tsx:96
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'
.
Inherited from
Pick.gduFormat
isEnabled?
optional
isEnabled:boolean
|Subscribable
<boolean
>
Defined in: src/garminsdk/components/touchbutton/TouchButton.tsx:79
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
Pick.isEnabled
isHighlighted?
optional
isHighlighted:boolean
|Subscribable
<boolean
>
Defined in: src/garminsdk/components/touchbutton/TouchButton.tsx:82
Whether the button is highlighted, or a subscribable which provides it. Defaults to false
.
Inherited from
Pick.isHighlighted
label?
optional
label:string
|VNode
|Subscribable
<string
>
Defined in: src/garminsdk/components/touchbutton/TouchButton.tsx:94
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
Pick.label
onDestroy()?
optional
onDestroy: () =>void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListButton.tsx:33
A callback function to execute when the list item is destroyed.
Returns
void
onFocusGained()?
optional
onFocusGained: <B
>(button
,direction
) =>void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchButton/UiTouchButton.tsx:66
A function which is called when the button gains UI focus.
Type Parameters
Type Parameter | Default type |
---|---|
B extends UiTouchButton | UiTouchButton |
Parameters
Parameter | Type | Description |
---|---|---|
button | B | The button that gained UI focus. |
direction | UiFocusDirection | - |
Returns
void
Inherited from
Pick.onFocusGained
onFocusLost()?
optional
onFocusLost: <B
>(button
) =>void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchButton/UiTouchButton.tsx:72
A function which is called when the button loses UI focus.
Type Parameters
Type Parameter | Default type |
---|---|
B extends UiTouchButton | UiTouchButton |
Parameters
Parameter | Type | Description |
---|---|---|
button | B | The button that lost UI focus. |
Returns
void
Inherited from
Pick.onFocusLost
onHoldEnded()?
optional
onHoldEnded: <B
>(button
,totalHoldDuration
,endReason
) =>void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchButton/UiTouchButton.tsx:60
A function which is called when the button exits the held state.
Type Parameters
Type Parameter | Default type |
---|---|
B extends UiTouchButton | UiTouchButton |
Parameters
Parameter | Type | Description |
---|---|---|
button | B | The button that was held. |
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
Inherited from
Pick.onHoldEnded
onHoldStarted()?
optional
onHoldStarted: <B
>(button
) =>TouchButtonHoldAction
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchButton/UiTouchButton.tsx:40
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
Type Parameter | Default type |
---|---|
B extends UiTouchButton | UiTouchButton |
Parameters
Parameter | Type | Description |
---|---|---|
button | B | The button that is held. |
Returns
TouchButtonHoldAction
The action to take. Ignored if the value is equal to TouchButtonHoldAction.EndHold.
Inherited from
Pick.onHoldStarted
onHoldTick()?
optional
onHoldTick: <B
>(button
,dt
,totalTime
,timeSinceLastPress
) =>TouchButtonHoldAction
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchButton/UiTouchButton.tsx:52
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
Type Parameter | Default type |
---|---|
B extends UiTouchButton | UiTouchButton |
Parameters
Parameter | Type | Description |
---|---|---|
button | B | The button that is held. |
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.
Inherited from
Pick.onHoldTick
onPressed()?
optional
onPressed: <B
>(button
,isHeld
) =>void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchButton/UiTouchButton.tsx:32
A callback function which will be called every time the button is pressed.
Type Parameters
Type Parameter | Default type |
---|---|
B extends UiTouchButton | UiTouchButton |
Parameters
Parameter | Type | Description |
---|---|---|
button | B | The button that was pressed. |
isHeld | boolean | Whether the button was held when it was pressed. |
Returns
void
Inherited from
Pick.onPressed
onTouched()?
optional
onTouched: <B
>(button
) =>TouchButtonOnTouchedAction
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchButton/UiTouchButton.tsx:25
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 attempting to set focus on its focus module and entering the primed state when touched.
Type Parameters
Type Parameter | Default type |
---|---|
B extends UiTouchButton | UiTouchButton |
Parameters
Parameter | Type | Description |
---|---|---|
button | B | The button that was touched. |
Returns
TouchButtonOnTouchedAction
The action to take as a result of the button being touched.
Inherited from
Pick.onTouched
ref?
optional
ref:NodeReference
<any
>
Defined in: src/sdk/components/FSComponent.ts:125
A reference to the display component.
Inherited from
ComponentProps.ref
useListItemStyle?
optional
useListItemStyle:boolean
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListButton.tsx:30
Whether to style the button to appear as a list item instead of a touchscreen button. Ignored if fullSize
is
false
. Defaults to false
.