Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSTouchBarMBS class.

NSTouchBarMBS.AssignToApp

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Assigns the TouchBar to be the main TouchBar for the whole app.

Some examples using this method:

NSTouchBarMBS.AssignToWindow(window as DesktopWindow)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 22.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Assigns the TouchBar to be the given window.

The TouchBar on MacBook Pro will show this entries, if the given window is the front window.

See also:

Some examples using this method:

NSTouchBarMBS.AssignToWindow(window as NSWindowMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Assigns the TouchBar to be the given window.

The TouchBar on MacBook Pro will show this entries, if the given window is the front window.

See also:

NSTouchBarMBS.AssignToWindow(window as window)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Assigns the TouchBar to be the given window.

The TouchBar on MacBook Pro will show this entries, if the given window is the front window.

See also:

NSTouchBarMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The constructor.

NSTouchBarMBS.customizationAllowedItemIdentifiers as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The items that are presented in the customization palette for the user to add to the touch bar.

These items will be presented to the user in the order specified in this array.

NSTouchBarMBS.customizationRequiredItemIdentifiers as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Some items are too important to be removed.

The corresponding item identifiers should be listed here. During customization the user will be prevented from removing these items from the touch bar.

NSTouchBarMBS.defaultItemIdentifiers as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An array of identifiers specifying the items in this touch bar.

When constructing the instantiated items array, the identifiers in this array will be fed through the itemForIdentifier method.
Item identifiers should be globally unique, excepting NSTouchBarItemIdentifierFixedSpaceSmall, NSTouchBarItemIdentifierFixedSpaceLarge, NSTouchBarItemIdentifierFlexibleSpace, and NSTouchBarItemIdentifierOtherItemsProxy.

This array also corresponds to the item ordering for the receiver in the “default set” in the customization palette.

NSTouchBarMBS.itemForIdentifier(identifier as string) as NSTouchBarItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns an instantiated NSTouchBarItem for the given identifier.

Items are resolved from the following locations, in order:

  • items already in the instantiated items array
  • items in the defaultTouchBarItems set
  • items returned from the delegate's -touchBar:makeItemForIdentifier: method
  • some special identifiers are handled automatically
NSTouchBarItemIdentifierFixedSpaceSmall -> NSTouchBar will automatically create a standard small space
NSTouchBarItemIdentifierFixedSpaceLarge -> NSTouchBar will automatically create a standard large space
NSTouchBarItemIdentifierFlexibleSpace -> NSTouchBar will automatically create a standard flexible space
NSTouchBarItemIdentifierOtherItemsProxy -> NSTouchBar will automatically create a special item that acts as a proxy for the items of touch bars closer to the first responder.

NSTouchBarMBS.itemIdentifiers as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The resolved array of item identifiers. If the bar has not been customized this will match the defaultItemIdentifiers.

NSTouchBarMBS.setCustomizationAllowedItemIdentifiers(Identifiers() as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the items that are presented in the customization palette for the user to add to the touch bar.

These items will be presented to the user in the order specified in this array.

Some examples using this method:

NSTouchBarMBS.setCustomizationRequiredItemIdentifiers(Identifiers() as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the items are too important to be removed.

The corresponding item identifiers should be listed here. During customization the user will be prevented from removing these items from the touch bar.

Some examples using this method:

NSTouchBarMBS.setDefaultItemIdentifiers(Identifiers() as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the array of identifiers specifying the items in this touch bar.

Some examples using this method:

NSTouchBarMBS.setTemplateItems(Identifiers() as NSTouchBarItemMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the template item identifiers.

Items in this set are the first step in resolving instantiated items from their identifiers.
If an item identifier is specified in the itemIdentifiers array, and an item with that identifier is in this set, it will be added to the items array in the corresponding location.

NSTouchBarMBS.templateItems as NSTouchBarItemMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TouchBar MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Items in this set are the first step in resolving instantiated items from their identifiers.

If an item identifier is specified in the itemIdentifiers array, and an item with that identifier is in this set, it will be added to the items array in the corresponding location.

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...