[][src]Struct meli::terminal::embed::grid::EmbedGrid

pub struct EmbedGrid {
    cursor: (usize, usize),
    scroll_region: ScrollRegion,
    pub grid: CellBuffer,
    pub state: State,
    pub stdin: File,
    pub child_pid: Pid,
    pub terminal_size: (usize, usize),
    fg_color: Color,
    bg_color: Color,
    prev_fg_color: Option<Color>,
    prev_bg_color: Option<Color>,
    show_cursor: bool,
    origin_mode: bool,
    auto_wrap_mode: bool,
    wrap_next: bool,
    codepoints: CodepointBuf,
}

EmbedGrid manages the terminal grid state of the embed process.

The embed process sends bytes to the master end (see super mod) and interprets them in a state machine stored in State. Escape codes are translated as changes to the grid, eg changes in a cell's colors.

The main process copies the grid whenever the actual terminal is redrawn.

Fields

cursor: (usize, usize)scroll_region: ScrollRegion

[top;bottom]

grid: CellBufferstate: Statestdin: Filechild_pid: Pid

Pid of the embed process

terminal_size: (usize, usize)

(width, height)

fg_color: Colorbg_color: Colorprev_fg_color: Option<Color>

Store the fg/bg color when highlighting the cell where the cursor is so that it can be restored afterwards

prev_bg_color: Option<Color>show_cursor: boolorigin_mode: boolauto_wrap_mode: boolwrap_next: bool

If next grapheme should be placed in the next line This should be reset whenever the cursor value changes

codepoints: CodepointBuf

Store state in case a multi-byte character is encountered

Implementations

impl EmbedGrid[src]

pub fn new(stdin: File, child_pid: Pid) -> Self[src]

pub fn set_terminal_size(&mut self, new_val: (usize, usize))[src]

pub fn wake_up(&self)[src]

pub fn stop(&self)[src]

pub fn is_active(&self) -> Result<WaitStatus>[src]

pub fn process_byte(&mut self, byte: u8)[src]

Trait Implementations

impl Debug for EmbedGrid[src]

Auto Trait Implementations

impl RefUnwindSafe for EmbedGrid

impl Send for EmbedGrid

impl Sync for EmbedGrid

impl Unpin for EmbedGrid

impl UnwindSafe for EmbedGrid

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]