pub struct Splash {
pub art: Vec<String>,
pub tagline: String,
pub entries: Vec<SplashEntry>,
pub facts: Vec<String>,
}Expand description
The start screen, as data.
Fields§
§art: Vec<String>Wordmark rows, top to bottom. Dropped wholesale when the canvas
is too small for them (see Splash::rows).
tagline: StringThe line under the wordmark.
entries: Vec<SplashEntry>The menu, in display order.
facts: Vec<String>Footer facts — joined with · at render time. Filled by the
binary with live values (version, plugin count, theme), so the
strip states what this build actually is rather than what a
static string once claimed.
Implementations§
Source§impl Splash
impl Splash
Sourcepub fn entry_for(&self, key: char) -> Option<&SplashEntry>
pub fn entry_for(&self, key: char) -> Option<&SplashEntry>
The entry key selects, if any.
Sourcepub fn rows(&self, width: u16, height: u16) -> Vec<SplashRow>
pub fn rows(&self, width: u16, height: u16) -> Vec<SplashRow>
Lay the splash out on a width × height canvas.
Degrades rather than overflowing, in a fixed order: the art drops to a one-line wordmark when it does not fit the width, the whole art block drops when it does not fit the height, and the menu truncates from the bottom last. An empty result means the canvas is too small for even the wordmark — the caller paints nothing, never a mangled frame.
Rows are guaranteed to sit inside the canvas: row < height and
col + row_width <= width for every row returned.
Sourcepub fn screen_chunks(&self, width: u16, height: u16) -> Vec<SplashSpan>
pub fn screen_chunks(&self, width: u16, height: u16) -> Vec<SplashSpan>
The same layout, flattened into one screen-shaped stream of
(text, role) chunks whose concatenation IS the screen — padding
and newlines included.
Self::rows suits a face that positions widgets (ratatui); this
suits the two that emit a character stream (the ANSI dump and the
GPU’s rich-text buffer, which requires a coverage-complete
partition). Both derive from rows, so a face can pick the shape
it wants without a second layout ever existing.
Trailing blank lines are not emitted — nothing is gained by painting empty rows to the bottom of the canvas.