Expand description
The terminal renderer for makeover_layout.
§Surfaces
frame draws a region at a Depth. It paints the depth’s fill where
Palette::shows says the fill differs from what is behind it, draws the
bevel around the outside, and returns the Rect left for content: one
cell in from each side an edge took. A fill begins and ends on a cell
boundary, and a frame has no corner radius.
Above sixteen colours the bevel is drawn in half-blocks, and the two
corners where its tones meet carry both, one per half-cell. At
Fidelity::Ansi16 and Fidelity::NoColor it is drawn in box-drawing
characters: doubled for Depth::Raised, light for every other depth.
§Overlays, selection and the focus ring
Palette::fill answers Fill::Overlay, so Depth::Overlay is painted
from a description with no edge. Theme::selection_on and
Theme::focus_ring are derived from the theme’s other tokens, so the
theme format has no key for either; border-strong is a divider.
§Modules
tabledraws a described table throughratatui::widgets::Table, measuring content and narrowing columns.textwraps styled runs in terminal cells.piecedraws the renderer-local pieces; its docs say which of the vocabulary’s members the host draws instead.theme(featuretheme) loads a makeover theme into aPalettequantised for aFidelity.
§Every colour is in the palette
Palette holds the surfaces and bevel pair a frame needs and the
Tones text and tables are drawn in. The styles hold metrics and marks
only. A tone the palette leaves empty is said with a modifier instead.
§No substitution
Palette::fill returns None for an intent it has no colour for, and
frame then draws the edge alone. Fill::Well does not fall back to
Fill::Page.
Re-exports§
pub use makeover_layout;
Modules§
- piece
- The pieces every terminal app draws, drawn once: the ink every terminal
drawing resolves once per frame (
Ink), a badge or chip (token), and the wait marks (activityandawaiting, out of wikiloading-and-progress-standard). - table
- Column layout and row structure for tables.
- text
- Words into cells.
Structs§
- Palette
- The resolved colours this renderer needs.
- Tones
- The colours text, controls and tables are drawn in.
Enums§
- Fidelity
- How many colours the terminal can show, as the caller recorded it.
- Motion
Preference - Whether the reader asked for less motion, as
activity_littakes it. Whether the reader has asked for less motion, as their platform reported it.
Functions§
- activity_
lit - Whether the activity mark is lit,
elapsedinto a wait: the phase ofmakeover_timing::blink. With motion reduced it is always lit. - frame
- Draw a region at a given
Depthand return the area left for content. - paint_
bevel - Paint a two-tone edge around the outside of
area.