Module status_bar
Expand description
The status bar: persistent status at the bottom edge of a window region.
What a person reads while working and expects to stay put (the cursor’s
line and column, a word count, the number of unresolved conflicts) goes
here, never into a floating bubble over the content. The bar reserves its
band (split): the content above it is laid out in what is left, so
nothing is ever painted under it.
The bar sits on its region’s ground (the framework paints that) with one
hairline along its top edge; it is never a raised band. Each readout is a
Caption with tabular figures in the secondary ink, inset by the
content gutter step spacing.s4.
Structs§
- Status
Readout - One readout of the status bar. A readout that does something when
clicked (a zoom level that opens its menu, a line number that opens “Go
to line”) is
StatusReadout::action: it lifts under the pointer, anddraw_readoutsreturns its rect for the host to hit-test.
Functions§
- draw
- Draw the status bar in
bar(fromsplit) withleft- andright-aligned readouts.themeis the theme of the region the bar sits in (theme.in_region(..)for a sidebar or inspector). - draw_
readouts - Draw the status bar in
barwithleftreadouts from its leading edge andrightreadouts from its trailing edge,s4apart.hoveredis an index intoleftthenright(as the returned rects are ordered). Returns each readout’s rect, for hit-testing the clickable ones. - height
- Height of the status bar: the compact control height, so a status bar
and a bar control read as the same tier, grown with the
Captionline at a large text scale so the readouts always haves1of air. - split
- Reserve the status bar’s band at the bottom of
region: returns(content, bar). Lay the region’s content out incontentand draw the bar inbar.