Trait tui_term::widget::Screen

source ·
pub trait Screen {
    type C: Cell;

    // Required methods
    fn cell(&self, row: u16, col: u16) -> Option<&Self::C>;
    fn hide_cursor(&self) -> bool;
    fn cursor_position(&self) -> (u16, u16);
}
Expand description

A trait representing a pseudo-terminal screen.

Implementing this trait allows for backends other than vt100 to be used with the PseudoTerminal widget.

Required Associated Types§

source

type C: Cell

The type of cell this screen contains

Required Methods§

source

fn cell(&self, row: u16, col: u16) -> Option<&Self::C>

Returns the cell at the given location if it exists.

source

fn hide_cursor(&self) -> bool

Returns whether the terminal should be hidden

source

fn cursor_position(&self) -> (u16, u16)

Returns cursor position of screen.

The return value is expected to be (row, column)

Implementations on Foreign Types§

source§

impl Screen for Screen

§

type C = Cell

source§

fn cell(&self, row: u16, col: u16) -> Option<&Self::C>

source§

fn hide_cursor(&self) -> bool

source§

fn cursor_position(&self) -> (u16, u16)

Implementors§