TabsControlDataSource
Undocumented
-
Returns the number of tabs
Declaration
Swift
func tabsControlNumberOfTabs(_ control: TabsControl) -> IntParameters
controlThe instance of the tabs control.
Return Value
A unsigned integer indicating the number of tabs to display.
-
Return the item for the tab at the given index, similarly to a
representedObject
in a cell view.Declaration
Swift
func tabsControl(_ control: TabsControl, itemAtIndex index: Int) -> AnyObjectParameters
controlThe instance of the tabs control.
indexThe index of the given item.
Return Value
An instance of an object representing the tab.
-
Return the title for the tab of the given item
Declaration
Swift
func tabsControl(_ control: TabsControl, titleForItem item: AnyObject) -> StringParameters
controlThe instance of the tabs control.
itemThe item representing the given tab.
Return Value
A string to be used as title of the tab.
-
If any, returns a menu for the tab, to be place to the right side of it. It is your responsability to fully configure its targets and actions before returning it to the tabs control.
Declaration
Swift
@objc optional func tabsControl(_ control: TabsControl, menuForItem item:AnyObject) -> NSMenu?Parameters
controlThe instance of the tabs control.
itemThe item representing the given tab.
Return Value
A menu instance.
-
If any, returns an icon for the tab, to be placed to the left side of it.
Declaration
Swift
@objc optional func tabsControl(_ control: TabsControl, iconForItem item:AnyObject) -> NSImage?Parameters
controlThe instance of the tabs control.
itemThe item representing the given tab.
Return Value
An image instance for the icon.
-
If the width of the tab is not large enough to draw the title, it is possible to provide here an alternate icon to replace it. The threshold at which one switch between the title and the icon is computed individually for each title.
Declaration
Swift
@objc optional func tabsControl(_ control: TabsControl, titleAlternativeIconForItem item:AnyObject) -> NSImage?Parameters
controlThe instance of the tabs control.
itemThe item representing the given tab.
Return Value
An image instance for the alternate icon.
View on GitHub
Install in Dash
TabsControlDataSource Protocol Reference