Toolbar

Window toolbar.

Modulerequire("gui")
TypeClass
PlatformsmacOS

This view is only implemented for macOS by wrapping NSToolbar.

Class methods

create(identifier)

Create a new Toolbar view with identifier.

Within the application all toolbars with the same identifier are synchronized to maintain the same state, including for example, the display mode and item order. The identifier is used as the autosave name for toolbars that save their configuration.

Parameters

Return

Toolbar

Methods

setDefaultItemIdentifiers(identifiers)

Set the identifiers of default items that would show in toolbar.

Parameters

setAllowedItemIdentifiers(identifiers)

Set the identifiers of the items that are allowed to show in toolbar.

Parameters

setAllowCustomization(allow)

Set whether users are allowed to customize the toolbar.

Parameters

setDisplayMode(mode)

Set the display mode of the toolbar items.

Parameters

setVisible(visible)

Set whether toolbar is visible.

Parameters

isVisible()

Return whether toolbar is visible.

Return

Boolean

getIdentifier()

Return the identifier of the toolbar.

Return

String

Delegates

getItem(toolbar, identifier)

Called lazily when the toolbar is going to get the item with identifier.

You should not cache the item to be returned.

Parameters

Return

Toolbar::Item