You can create toolbars using the toolbar class explicitly, and arrange them like other elements, using layouts. This approach differs from interface toolbars as described in the preceding sections of this chapter. Note that, while it allows you some flexibility this approach can produce non-standard appearance, does not support user-customization, and does not support folding on Cocoa. Other than this, non-standard toolbars support all the features described in the preceding sections of this chapter, and additionally:
It can be merged with the separate smaller button such that it displays only the menu and does not respond to its selection-callback .
Alternatively, it can display the menu only after being pressed down for a while, and respond to the selection-callback when pressed only briefly. In this case the smaller button does not appear.
See toolbar-button for the details.
(example-edit-file "capi/elements/toolbar")
The best way to change a non-standard toolbar is to use a switchable-layout. Include a toolbar instance in each of two or more child layouts, of which only one is visible at a time.
(example-edit-file "capi/layouts/switchable")
CAPI User Guide and Reference Manual (Macintosh version) - 3 Aug 2017