Skip to main content

CellPainter

Struct CellPainter 

Source
pub struct CellPainter<'a, A: AtlasView> { /* private fields */ }

Implementations§

Source§

impl<'a, A: AtlasView> CellPainter<'a, A>

Source

pub fn new( screen: &'a ScreenBuffer, metrics: CellMetrics, theme: &'a ResolvedTheme, atlas: &'a A, shape_frame: &'a ShapeFrame, ) -> Self

Overlays default to absent and layer on through with_*.

The provided shape_frame determines whether cells render via glyph IDs, clusters, or the per-char fallback.

Source

pub const fn with_reverse_video(self, on: bool) -> Self

?5 DECSCNM as the daemon reports it, xor’d against each cell’s SGR 7.

Source

pub const fn with_cursor_visible(self, visible: bool) -> Self

True only while focused and the blink clock is in its visible phase; both hide the cursor identically, so they arrive folded.

Source

pub const fn with_selection(self, selection: Option<SelectionRange>) -> Self

Source

pub const fn with_viewport(self, viewport: u32, viewport_max: u32) -> Self

viewport rows above the live bottom out of viewport_max; 0 is the live bottom.

Source

pub const fn with_reserved_bottom_rows(self, rows: u16) -> Self

Rows trimmed off the bottom so bottom-anchored chrome (the search bar) owns them without the cells doubling through.

Source

pub const fn with_preedit(self, span: Option<PreeditSpan>) -> Self

The span (from preedit_covered_cols) whose cells are skipped so the underlying glyph does not draw through the opaque overlay in the later fg pass.

Source

pub fn extend_screen(self, out: &mut RowPaint)

Appends into caller-owned scratch (kept across frames so the steady state allocates nothing); callers clear first for a fresh frame. An atlas miss skips only the fg quad; the bg still lands.

Source

pub fn resolved(self) -> Self

Fixes the cursor paint, which every row reads.

Source

pub const fn cursor(&self) -> CursorPaint

Resolved by Self::resolved; meaningless before.

Source

pub fn extend_row(&self, out: &mut RowPaint, r: u16)

Everything a row emits depends on that row’s cells and the painter’s frame-wide inputs alone, which is what lets a renderer’s row cache repaint a row in isolation.

Source

pub fn push_scrollbar_lane(&self, out: &mut RowPaint)

Absent at the live bottom. Gated on viewport_max > rows as defense-in-depth: the daemon should already have clamped.

Auto Trait Implementations§

§

impl<'a, A> Freeze for CellPainter<'a, A>
where &'a A: Freeze,

§

impl<'a, A> RefUnwindSafe for CellPainter<'a, A>

§

impl<'a, A> Send for CellPainter<'a, A>
where &'a A: Send,

§

impl<'a, A> Sync for CellPainter<'a, A>
where &'a A: Sync,

§

impl<'a, A> Unpin for CellPainter<'a, A>
where &'a A: Unpin,

§

impl<'a, A> UnsafeUnpin for CellPainter<'a, A>

§

impl<'a, A> UnwindSafe for CellPainter<'a, A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more