Einhugur macOS Bridge plugin. |
|
EinhugurMacOSBridge.NSCustomTouchBarItem Class
Touch Bar item type to display basic elements in the Touch Bar such as Button and text label for example.
For Touch Bars macOS 10.12.2 or later is needed.
NSTouchBarItem
NSCustomTouchBarItem
class EinhugurMacOSBridge.NSCustomTouchBarItem
Constructors
Properties
CustomizationLabel (Inherited) | Sets or gets the user-visible string identifying this item during bar customization. |
Handle (Inherited) | Returns Integer handle to the native NSObject structure. |
Methods
Release (Inherited) | Releases the NSObject. |
Retain (Inherited) | Retains the NSObject |
SetView | Sets the view of the custom item to a NSControl (usually NSButton or NSTextField) |
SetVisibilityPriority (Inherited) | Sets priority of the Touch Bar item, where the lowest priority ones get hidden if there is no space to show them all. |
Examples
If itemIdentifier = "com.einhugur.testapp.button1” then item= new NSCustomTouchBarItem(itemIdentifier)
Dim button as NSButton = new NSButton("Some button", addressof Button1Click)
item.SetView(button)
return item
In this example we could have also stored handle to the button in a property to be able to enable or disable the button later if needed.
Supported Platforms:
MacOS X Cocoa 32 bitMacOS X Cocoa 64 bitUnsupported Platforms:
MacOS X CarbonWindows 32 bitWindows 64 bitLinux 32 bitLinux 64 bitLinux ARM