Module toolbar
Expand description
The toolbar: a measured strip of commands with a shared ContextMenu
for overflow, so every command stays reachable however narrow the window.
The extent cache is the sole source for intrinsic sizing, fitting and placement.
Commands are Label-role plain buttons; a toggle that is on is a lift;
groups are split by hairline separators that never stand at the start or
end of what is shown. A command can be disabled (dimmed, announced as
disabled, inert), carry a dot (something new behind it), open a menu of
its own, or rank above its neighbours for staying out of the More menu
(Toolbar::with_priority). Hosted controls (a segmented strip, a
number field, a colour well) stand in the row with
Toolbar::push_element. A painted widget hosts one with
Toolbar::lay_out_in (or Toolbar::lay_out_at once it has been
measured). The band behind a window’s toolbar row is paint_band
with its controls inset by band_padding.
Structs§
- Toolbar
- Toolbar
Command - One command of a toolbar and what it carries.
Enums§
Functions§
- band_
padding - The inset of a toolbar band’s controls from its edges: siblings’ step across, the tightest step above and below so the band stays one control tall (HIG §7b).
- paint_
band - The band behind a window’s toolbar row: no fill of its own (the toolbar
stands on its region’s ground) and one derived hairline along its bottom
edge, at
metrics.chrome_rule_px.
Type Aliases§
- Glyph
Painter - Paints a command’s mark into the glyph square it is given.