pub struct EditingUi {
pub caret: Option<usize>,
pub selection: Option<(usize, usize)>,
pub selection_bg: (u8, u8, u8),
pub selection_fg: (u8, u8, u8),
}Expand description
The editing UI to paint into a raster. Offsets are bytes into the spec’s
text, on char boundaries; anything out of range or misaligned is dropped
rather than panicking, since a stale frontend offset is not worth refusing
to draw the heading over.
Fields§
§caret: Option<usize>Byte offset the caret bar is drawn at, or None for no caret.
selection: Option<(usize, usize)>Selected byte range (start, end), or None for no selection.
selection_bg: (u8, u8, u8)The fill behind selected glyphs. The terminal’s selection is reverse video, so its caller passes the heading’s own ink here…
selection_fg: (u8, u8, u8)…and something that reads on that fill here, for the glyphs on it (and for the caret whenever it stands inside the selection, where a bar in the ink would sink into a fill of the same color).
Trait Implementations§
impl Copy for EditingUi
impl StructuralPartialEq for EditingUi
Auto Trait Implementations§
impl Freeze for EditingUi
impl RefUnwindSafe for EditingUi
impl Send for EditingUi
impl Sync for EditingUi
impl Unpin for EditingUi
impl UnsafeUnpin for EditingUi
impl UnwindSafe for EditingUi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more