Skip to main content

Module ui

Module ui 

Source
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.
HistPlot
A histogram of counts over bins kmin.., scaled to them.

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.

Traits§

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).
panel
Rounded panel titled title: plain border and accent title when focused, dim border otherwise.
run_screen
Run screen full screen until it is done. The terminal is restored on return and on panic. Blocking work runs on the normal screen, where its own progress output belongs, and the view comes back after it.