TouchBarScrubber Type
⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ❌
Create a scrubber (a scrollable selector)Process: Main This class is not exported from the 'electron' module. It is only available as a return value of other methods in the Electron API.
Constructors
| Constructor |
Description
|
Full Usage:
TouchBarScrubber(items, ?select, ?highlight, ?selectedStyle, ?overlayStyle, ?showArrowButtons, ?mode, ?continuous)
Parameters:
ScrubberItem[]
-
An array of items to place in this scrubber.
?select : int -> unit
-
Called when the user taps an item that was not the last tapped item.
?highlight : int -> unit
-
Called when the user taps any item.
?selectedStyle : SelectedStyle
-
Selected item style. Can be background, outline or none. Defaults to none.
?overlayStyle : OverlayStyle
-
Selected overlay item style. Can be background, outline or none. Defaults to none.
?showArrowButtons : bool
-
Whether to show arrow buttons. Defaults to false and is only shown if items is non-empty.
?mode : Mode
-
Can be fixed or free. The default is free.
?continuous : bool
-
Defaults to true.
Returns: TouchBarScrubber
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.continuous
|
A boolean representing whether this scrubber is continuous or not. Updating this value immediately updates the control in the touch bar. |
Full Usage:
this.items
|
A ScrubberItem[] array representing the items in this scrubber. Updating this value immediately updates the control in the touch bar. Updating deep properties inside this array does not update the touch bar. |
Full Usage:
this.mode
|
A string representing the mode of this scrubber. Updating this value immediately updates the control in the touch bar. Possible values:* fixed - Maps to NSScrubberModeFixed.* free - Maps to NSScrubberModeFree. |
Full Usage:
this.overlayStyle
|
A string representing the style that selected items in the scrubber should have. This style is overlaid on top of the scrubber item instead of being placed behind it. Updating this value immediately updates the control in the touch bar. Possible values:* background - Maps to [NSScrubberSelectionStyle roundedBackgroundStyle].* outline - Maps to [NSScrubberSelectionStyle outlineOverlayStyle].* none - Removes all styles. |
Full Usage:
this.selectedStyle
|
A string representing the style that selected items in the scrubber should have. Updating this value immediately updates the control in the touch bar. Possible values:* background - Maps to [NSScrubberSelectionStyle roundedBackgroundStyle].* outline - Maps to [NSScrubberSelectionStyle outlineOverlayStyle].* none - Removes all styles. |
Full Usage:
this.showArrowButtons
|
A boolean representing whether to show the left / right selection arrows in this scrubber. Updating this value immediately updates the control in the touch bar. |
fable-electron-docs-api