NSToolbarDelegate
NSToolbarDelegate is a protocol in Apple's AppKit that defines the interface for objects that manage an NSToolbar’s contents. A class that acts as the toolbar’s delegate provides the set of item identifiers that may appear in the toolbar, supplies the NSToolbarItem instances for those identifiers, and can respond to toolbar customization events. The delegate is typically a window controller or view controller that coordinates the toolbar with the surrounding UI.
The core responsibilities of NSToolbarDelegate include supplying item identifiers and items. The key required/delegated methods describe
Several optional methods influence behavior. toolbarSelectableItemIdentifiers: can specify which items are selectable in the customization interface.
Identifiers are NSToolbarItem.Identifier values, commonly defined as strings. Items returned by the delegate are instances of