TouchBar触摸条scrubber
创建一个scrubber(一个可滚动的选择器)
进程: 主进程
new TouchBarScrubber(options) 实验功能
new TouchBarScrubber(options) 实验功能用途: 创建一个新的scrubber
optionsObjectitemsScrubberItem[] - 要放置在此scrubber中的项数组selectFunction - 当用户点击的不是最后一个点击项时调用selectedIndexInteger - 用户选择项的索引
highlightFunction - 当用户点击任何项时调用highlightedIndexInteger - 用户触摸项的索引
selectedStyleString - 所选项样式。默认为null.overlayStyleString - 选择的覆盖项样式 默认为null.showArrowButtonsBoolean - 默认为false.modeString - 默认为free.continuousBoolean - 默认为true.
实例属性
TouchBarScrubber有以下实例属性:
touchBarSegmentedControl.items
touchBarSegmentedControl.items属性: scrubber中的项组成的数组(
ScrubberItem[])
touchBarSegmentedControl.selectedStyle
touchBarSegmentedControl.selectedStyle属性: scrubber中的选择项的样式(
String)
可能的值:
background- 映射到[NSScrubberSelectionStyle roundedBackgroundStyle]outline- 映射到[NSScrubberSelectionStyle outlineOverlayStyle]null- null时表示删除所有样式.
touchBarSegmentedControl.overlayStyle
touchBarSegmentedControl.overlayStyle属性: scrubber中的选择项的覆盖样式(
String)
可能的值: background - 映射到 [NSScrubberSelectionStyle roundedBackgroundStyle]
outline- 映射到[NSScrubberSelectionStyle outlineOverlayStyle]null- null时表示删除所有样式.
touchBarSegmentedControl.showArrowButtons
touchBarSegmentedControl.showArrowButtons属性: 是否在scrubber中显示左右提示箭头(
Boolean)
touchBarSegmentedControl.mode
touchBarSegmentedControl.mode属性: scrubber的模式(
String)
fixed- 映射到NSScrubberModeFixedfree- 映射到NSScrubberModeFree
touchBarSegmentedControl.continuous
touchBarSegmentedControl.continuous属性: scrubber是否是连续的(
Boolean)
Last updated
Was this helpful?