Trait textmode::Textmode

source ·
pub trait Textmode: Output {
Show 16 methods // Provided methods fn screen(&self) -> &Screen { ... } fn write(&mut self, buf: &[u8]) { ... } fn set_size(&mut self, rows: u16, cols: u16) { ... } fn write_str(&mut self, text: &str) { ... } fn move_to(&mut self, row: u16, col: u16) { ... } fn move_relative(&mut self, row_offset: i16, col_offset: i16) { ... } fn clear(&mut self) { ... } fn clear_line(&mut self) { ... } fn reset_attributes(&mut self) { ... } fn set_fgcolor(&mut self, color: Color) { ... } fn set_bgcolor(&mut self, color: Color) { ... } fn set_bold(&mut self, bold: bool) { ... } fn set_italic(&mut self, italic: bool) { ... } fn set_underline(&mut self, underline: bool) { ... } fn set_inverse(&mut self, inverse: bool) { ... } fn hide_cursor(&mut self, hide: bool) { ... }
}
Expand description

Provides the methods used to manipulate the in-memory screen.

Provided Methods§

source

fn screen(&self) -> &Screen

Returns the in-memory screen itself. This is the screen that will be drawn on the next call to refresh.

source

fn write(&mut self, buf: &[u8])

Writes a sequence of bytes, potentially containing terminal escape sequences, to the in-memory screen.

source

fn set_size(&mut self, rows: u16, cols: u16)

Sets the terminal size for the in-memory screen.

source

fn write_str(&mut self, text: &str)

Writes a string of printable characters to the in-memory screen.

source

fn move_to(&mut self, row: u16, col: u16)

Moves the in-memory screen’s cursor.

source

fn move_relative(&mut self, row_offset: i16, col_offset: i16)

source

fn clear(&mut self)

Clears the in-memory screen.

source

fn clear_line(&mut self)

Clears the line containing the cursor on the in-memory screen.

source

fn reset_attributes(&mut self)

Clears the in-memory screen’s currently active drawing attributes.

source

fn set_fgcolor(&mut self, color: Color)

Sets the foreground color for subsequent drawing operations to the in-memory screen.

source

fn set_bgcolor(&mut self, color: Color)

Sets the background color for subsequent drawing operations to the in-memory screen.

source

fn set_bold(&mut self, bold: bool)

Sets whether subsequent text drawn to the in-memory screen should be bold.

source

fn set_italic(&mut self, italic: bool)

Sets whether subsequent text drawn to the in-memory screen should be italic.

source

fn set_underline(&mut self, underline: bool)

Sets whether subsequent text drawn to the in-memory screen should be underlined.

source

fn set_inverse(&mut self, inverse: bool)

Sets whether subsequent text drawn to the in-memory screen should have its colors inverted.

source

fn hide_cursor(&mut self, hide: bool)

Sets whether the cursor should be visible.

Implementors§