Skip to main content

frame_rows

Function frame_rows 

Source
pub fn frame_rows(
    style: Style,
    choices: &[Choice],
    cursor: usize,
    selected: Option<&[usize]>,
    default: Option<usize>,
) -> Vec<String>
Expand description

Build the live frame a key-driven terminal redraws as focus and selection change.

cursor is the focused row. For single-select pass selected as None and each row shows a radio (Glyphs::radio_on/radio_off); for multi-select pass the chosen indices and each row shows a checkbox ([x]/[ ]). The focused row is marked with the pointer glyph and rendered bold.