Class: TouchBarScrubber
Class: TouchBarScrubber
Create a scrubber (a scrollable selector)创建一个洗涤器(一个可滚动的选择器)
Process:进程:Main
This class is not exported from the 此类不是从'electron'
module. 'electron'
模块导出的。It is only available as a return value of other methods in the Electron API.它只能作为Electron API中其他方法的返回值使用。
new TouchBarScrubber(options)
Instance Properties实例属性
The following properties are available on instances of TouchBarScrubber
:TouchBarScrubber
实例上提供了以下属性:
touchBarScrubber.items
A ScrubberItem[]
array representing the items in this scrubber. Updating this value immediately updates the control in the touch bar. ScrubberItem[]
数组,表示此洗涤器中的项目。更新此值会立即更新触摸条中的控件。Updating deep properties inside this array does not update the touch bar.更新此数组中的深层属性不会更新触摸栏。
touchBarScrubber.selectedStyle
A 一个string
representing the style that selected items in the scrubber should have. string
,表示洗涤器中所选项目应该具有的样式。Updating this value immediately updates the control in the touch bar. 更新此值会立即更新触摸条中的控件。Possible values:可能的值:
background
-Maps to映射到[NSScrubberSelectionStyle roundedBackgroundStyle]
.[NSScrubberSelectionStyle roundedBackgroundStyle]
。outline
-Maps to映射到[NSScrubberSelectionStyle outlineOverlayStyle]
.[NSScrubberSelectionStyle outlineOverlayStyle]
。none
-Removes all styles.删除所有样式。
touchBarScrubber.overlayStyle
A 一个string
representing the style that selected items in the scrubber should have. string
,表示洗涤器中所选项目应该具有的样式。This style is overlayed 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]
.[NSScrubberSelectionStyle roundedBackgroundStyle]
。outline
-Maps to映射到[NSScrubberSelectionStyle outlineOverlayStyle]
.[NSScrubberSelectionStyle outlineOverlayStyle]
。none
-Removes all styles.删除所有样式。
touchBarScrubber.showArrowButtons
A 一个boolean
representing whether to show the left / right selection arrows in this scrubber. boolean
,表示是否在此洗涤器中显示左/右选择箭头。Updating this value immediately updates the control in the touch bar.更新此值会立即更新触摸条中的控件。
touchBarScrubber.mode
A 表示此洗涤器模式的string
representing the mode of this scrubber. string
。Updating this value immediately updates the control in the touch bar. Possible values:更新此值会立即更新触摸条中的控件。可能的值:
fixed
-Maps to映射到NSScrubberModeFixed
.NSScrubberModeFixed
。free
-Maps to映身到NSScrubberModeFree
.NSScrubberModeFree
。
touchBarScrubber.continuous
A 一个boolean
representing whether this scrubber is continuous or not. boolean
,表示此洗涤器是否连续。Updating this value immediately updates the control in the touch bar.更新此值会立即更新触摸条中的控件。