Struct tui::terminal::Terminal [−][src]
pub struct Terminal<B> where
B: Backend, { /* fields omitted */ }
Interface to the terminal backed by Termion
Methods
impl<B> Terminal<B> where
B: Backend,
[src]
impl<B> Terminal<B> where
B: Backend,
pub fn new(backend: B) -> Result<Terminal<B>, Error>
[src]
pub fn new(backend: B) -> Result<Terminal<B>, Error>
Wrapper around Termion initialization. Each buffer is initialized with a blank string and default colors for the foreground and the background
pub fn get_frame(&mut self) -> Frame<B>
[src]
pub fn get_frame(&mut self) -> Frame<B>
pub fn current_buffer_mut(&mut self) -> &mut Buffer
[src]
pub fn current_buffer_mut(&mut self) -> &mut Buffer
pub fn backend(&self) -> &B
[src]
pub fn backend(&self) -> &B
pub fn backend_mut(&mut self) -> &mut B
[src]
pub fn backend_mut(&mut self) -> &mut B
pub fn flush(&mut self) -> Result<(), Error>
[src]
pub fn flush(&mut self) -> Result<(), Error>
Builds a string representing the minimal escape sequences and characters set necessary to update the UI and writes it to stdout.
pub fn resize(&mut self, area: Rect) -> Result<(), Error>
[src]
pub fn resize(&mut self, area: Rect) -> Result<(), Error>
Updates the interface so that internal buffers matches the current size of the terminal. This leads to a full redraw of the screen.
pub fn draw<F>(&mut self, f: F) -> Result<(), Error> where
F: FnOnce(Frame<B>),
[src]
pub fn draw<F>(&mut self, f: F) -> Result<(), Error> where
F: FnOnce(Frame<B>),
Flushes the current internal state and prepares the interface for the next draw call
pub fn hide_cursor(&mut self) -> Result<(), Error>
[src]
pub fn hide_cursor(&mut self) -> Result<(), Error>
pub fn show_cursor(&mut self) -> Result<(), Error>
[src]
pub fn show_cursor(&mut self) -> Result<(), Error>
pub fn clear(&mut self) -> Result<(), Error>
[src]
pub fn clear(&mut self) -> Result<(), Error>
pub fn size(&self) -> Result<Rect, Error>
[src]
pub fn size(&self) -> Result<Rect, Error>