components/toolbar library

Classes

CNToolbar
The Apple toolbar: at the top of the window on macOS, at the bottom of the screen on iPhone and iPad.
CNToolbarBadge
A badge on a CNToolbarButton: a count, a short text, or a dot.
CNToolbarButton
A toolbar button: an icon or a text label, with an optional badge.
CNToolbarInspectorToggle
The standard button that shows and hides the window's inspector (NSToolbarItem.Identifier.toggleInspector, macOS 14+).
CNToolbarInspectorTrackingSeparator
Lines the items after it up with the window's inspector (NSToolbarItem.Identifier.inspectorTrackingSeparator, macOS 14+).
CNToolbarItem
An item of a CNToolbar.
CNToolbarMenu
A toolbar button that opens a menu.
CNToolbarSearch
The search field of a window toolbar (NSSearchToolbarItem, macOS).
CNToolbarSegment
One segment of a CNToolbarSegmentedGroup.
CNToolbarSegmentedGroup
A group of segments in the toolbar, such as view modes or filters.
CNToolbarSidebarToggle
The standard button that shows and hides the window's sidebar (NSToolbarItem.Identifier.toggleSidebar, macOS).
CNToolbarSidebarTrackingSeparator
Lines the items before it up with the window's sidebar, so they sit over the sidebar and the rest over the content (NSToolbarItem.Identifier.sidebarTrackingSeparator, macOS).
CNToolbarSpace
Empty space between toolbar items.

Enums

CNToolbarGroupRole
What a CNToolbarSegmentedGroup is for, which macOS 27 shows with a look of its own (NSToolbarItemGroup.Role). Earlier systems and iOS draw every group the same.
CNToolbarItemStyle
The look of a CNToolbarButton.
CNToolbarSelectionMode
How the segments of a CNToolbarSegmentedGroup are selected.
CNToolbarStyle
How the window toolbar of a CNToolbar is laid out on macOS.

Functions

debugResetCNToolbarWindow() → void
Forgets every shown toolbar, so each test starts from a window without one.
debugResolveToolbarItemIds(List<CNToolbarItem> items) → List<String>
The id CNToolbar gives each of items in its payload and its events: the item's own CNToolbarItem.id, or its kind and its index among the items of that kind (button#0, menu#1).