类:TouchBarScrubber
类:TouchBarScrubber
¥Class: TouchBarScrubber
创建一个洗涤器(可滚动选择器)
¥Create a scrubber (a scrollable selector)
进程:主进程
该类不是从 'electron'
模块导出的。它仅可用作 Electron API 中其他方法的返回值。
¥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.
new TouchBarScrubber(options)
实例属性
¥Instance Properties
以下属性在 TouchBarScrubber
的实例上可用:
¥The following properties are available on instances of TouchBarScrubber
:
touchBarScrubber.items
代表此清理器中的项目的 ScrubberItem[]
数组。更新此值会立即更新触摸栏中的控件。更新此数组内的深层属性不会更新触摸栏。
¥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.
touchBarScrubber.selectedStyle
string
代表洗涤器中所选项目应具有的样式。更新此值会立即更新触摸栏中的控件。可能的值:
¥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
- 映射到[NSScrubberSelectionStyle roundedBackgroundStyle]
。¥
background
- Maps to[NSScrubberSelectionStyle roundedBackgroundStyle]
. -
outline
- 映射到[NSScrubberSelectionStyle outlineOverlayStyle]
。¥
outline
- Maps to[NSScrubberSelectionStyle outlineOverlayStyle]
. -
none
- 删除所有样式。¥
none
- Removes all styles.
touchBarScrubber.overlayStyle
string
代表洗涤器中所选项目应具有的样式。此样式覆盖在 Scrubber 项的顶部,而不是放在其后面。更新此值会立即更新触摸栏中的控件。可能的值:
¥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
- 映射到[NSScrubberSelectionStyle roundedBackgroundStyle]
。¥
background
- Maps to[NSScrubberSelectionStyle roundedBackgroundStyle]
. -
outline
- 映射到[NSScrubberSelectionStyle outlineOverlayStyle]
。¥
outline
- Maps to[NSScrubberSelectionStyle outlineOverlayStyle]
. -
none
- 删除所有样式。¥
none
- Removes all styles.
touchBarScrubber.showArrowButtons
boolean
代表是否在此洗涤器中显示左/右选择箭头。更新此值会立即更新触摸栏中的控件。
¥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.
touchBarScrubber.mode
string
代表该洗涤器的模式。更新此值会立即更新触摸栏中的控件。可能的值:
¥A string
representing the mode of this scrubber. Updating this value immediately
updates the control in the touch bar. Possible values:
-
fixed
- 映射到NSScrubberModeFixed
。¥
fixed
- Maps toNSScrubberModeFixed
. -
free
- 映射到NSScrubberModeFree
。¥
free
- Maps toNSScrubberModeFree
.
touchBarScrubber.continuous
boolean
代表该洗涤器是否连续。更新此值会立即更新触摸栏中的控件。
¥A boolean
representing whether this scrubber is continuous or not. Updating this value immediately
updates the control in the touch bar.