Expand description
Shared pieces of the full-screen views: the palette, panels, header and help lines, the event loop, histogram scales and binning, and a histogram plot with a y gutter, an x axis, and markers.
Structs§
- Binned
- A sorted statistic binned on a scale: the bins and their counts.
- Binning
- Equal-width bins on a scale, keyed by integers. On the log scale these are the printed histogram’s tenth-decade bins, keyed by rounding.
- Hist
Plot - Mirror
Plot - Two bar series on one scale around a zero line, one growing up and the
other down, as a Miami plot, in half cells. Signed values are a mirror of
their positive and negative parts. Axes as
HistPlot’s, one column per bar. - Mirror
Side - One side of a
MirrorPlot.
Enums§
- Scale
- How a histogram axis is drawn.
Constants§
- ACCENT
- ACCENTED
- Accent bars and marks.
- DIM
- Secondary text: labels, axes, units.
- HIGHLIGHT
- Key names in help lines, typed values, and the value in focus.
- PLAIN
- Plain text and bars in the terminal’s foreground.
- TICK
- How often
run_screenasksScreen::tick, keys or not.
Traits§
- BarValue
- A histogram of
countsover binskmin.., scaled to them. A bar heightHistPlotcan draw: whole counts, or any non-negative real value (a summed signal, a log statistic). - Screen
- A full-screen view driven by
run_screen.
Functions§
- compact
- Compact number for axis labels: 950, 1.2k, 35k, 1.1M; small fractions keep two significant digits.
- header
- Title bar: a reverse-video badge naming the view, then plain text.
- help_
line - Help line from
(key, what it does)pairs. - input_
line - Footer while typing:
prompt, the text so far with a cursor, then keys. - median
- Median of an ascending slice (0 when empty).
- notify
- Ring the terminal’s bell and ask it for a desktop notification saying
text(OSC 9); terminals without either ignore them. - panel
- Rounded panel titled
title: plain border and accent title whenfocused, dim border otherwise. - run_
screen - Run
screenfull screen until it is done. The terminal is restored on return and on panic. Log records raised meanwhile are held back and written once the normal screen is back. Blocking work runs on the normal screen, where its own progress output belongs, and the view comes back after it. The mouse and keys held with modifiers are reported only to a screen that asks for them, and events already queued (a turn of the wheel is several) are taken before the screen is drawn again. - run_
screen_ with run_screen, with each key (but Ctrl-C) handed toon_keyrather thanScreen::handle_key: for a caller with rules of its own about which keys a screen sees.