Struct tanmatsu::Terminal [−][src]
pub struct Terminal { pub stdout: Stdout, pub size: Size, pub flush_count: usize, // some fields omitted }
Fields
stdout: Stdout
size: Size
flush_count: usize
Implementations
impl Terminal
[src]
impl Terminal
[src]pub fn enter_alternate_dimension(&mut self)
[src]
pub fn exit_alternate_dimension(&mut self)
[src]
pub fn set_title(&mut self, title: &str)
[src]
pub fn enable_raw_mode(&self)
[src]
pub fn disable_raw_mode(&self)
[src]
pub fn enable_mouse_capture(&mut self)
[src]
pub fn disable_mouse_capture(&mut self)
[src]
pub fn show_cursor(&mut self)
[src]
pub fn hide_cursor(&mut self)
[src]
pub fn read_event(&mut self) -> Option<Event>
[src]
pub fn read_event(&mut self) -> Option<Event>
[src]Reads an event. It also sets the new size if the terminal has been resized, hence a mutable borrow of self
is required.
pub fn poll_event(&mut self, timeout: Duration) -> Option<Event>
[src]
pub fn set_cursor(&mut self, point: Point)
[src]
pub fn move_cursor_left(&mut self, cells: u16)
[src]
pub fn move_cursor_right(&mut self, cells: u16)
[src]
pub fn move_cursor_up(&mut self, cells: u16)
[src]
pub fn move_cursor_down(&mut self, cells: u16)
[src]
pub fn save_cursor_point(&mut self)
[src]
pub fn restore_cursor_point(&mut self)
[src]
pub fn save_cursor_x(&mut self)
[src]
pub fn restore_cursor_y(&mut self)
[src]
pub fn set_foreground_color(&mut self, color: Color)
[src]
pub fn set_background_color(&mut self, color: Color)
[src]
pub fn enable_italic(&mut self)
[src]
pub fn disable_italic(&mut self)
[src]
pub fn reset_colors(&mut self)
[src]
pub fn clear(&mut self)
[src]
pub fn clear_from_cursor_to_end(&mut self)
[src]
pub fn size() -> Size
[src]
impl Terminal
[src]
impl Terminal
[src]A terminal with an io::Stdout
inside.
Optimally every program should have a single instance.
pub fn new() -> Result<Self, NotTTY>
[src]
pub fn write(&mut self, string: &str)
[src]
pub fn write_bytes(&mut self, bytes: &[u8])
[src]
pub fn flush(&mut self)
[src]
pub fn get_centered_border_point(&self, size: &Size) -> Point
[src]
pub fn get_center(&self) -> Point
[src]
pub fn initialize(&mut self)
[src]
pub fn initialize(&mut self)
[src]Makes the terminal ready for drawing and input
and registers a panic hook that makes sure [deinitialize
] is called before the panic output.