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§
sourcefn screen(&self) -> &Screen
fn screen(&self) -> &Screen
Returns the in-memory screen itself. This is the screen that will be
drawn on the next call to refresh
.
sourcefn write(&mut self, buf: &[u8])
fn write(&mut self, buf: &[u8])
Writes a sequence of bytes, potentially containing terminal escape sequences, to the in-memory screen.
sourcefn write_str(&mut self, text: &str)
fn write_str(&mut self, text: &str)
Writes a string of printable characters to the in-memory screen.
fn move_relative(&mut self, row_offset: i16, col_offset: i16)
sourcefn clear_line(&mut self)
fn clear_line(&mut self)
Clears the line containing the cursor on the in-memory screen.
sourcefn reset_attributes(&mut self)
fn reset_attributes(&mut self)
Clears the in-memory screen’s currently active drawing attributes.
sourcefn set_fgcolor(&mut self, color: Color)
fn set_fgcolor(&mut self, color: Color)
Sets the foreground color for subsequent drawing operations to the in-memory screen.
sourcefn set_bgcolor(&mut self, color: Color)
fn set_bgcolor(&mut self, color: Color)
Sets the background color for subsequent drawing operations to the in-memory screen.
sourcefn set_bold(&mut self, bold: bool)
fn set_bold(&mut self, bold: bool)
Sets whether subsequent text drawn to the in-memory screen should be bold.
sourcefn set_italic(&mut self, italic: bool)
fn set_italic(&mut self, italic: bool)
Sets whether subsequent text drawn to the in-memory screen should be italic.
sourcefn set_underline(&mut self, underline: bool)
fn set_underline(&mut self, underline: bool)
Sets whether subsequent text drawn to the in-memory screen should be underlined.
sourcefn set_inverse(&mut self, inverse: bool)
fn set_inverse(&mut self, inverse: bool)
Sets whether subsequent text drawn to the in-memory screen should have its colors inverted.
sourcefn hide_cursor(&mut self, hide: bool)
fn hide_cursor(&mut self, hide: bool)
Sets whether the cursor should be visible.