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]
B: Backend,
pub fn new(backend: B) -> Result<Terminal<B>, Error>
[src]
Wrapper around Termion initialization. Each buffer is initialized with a blank string and default colors for the foreground and the background
pub fn backend(&self) -> &B
[src]
pub fn backend_mut(&mut self) -> &mut B
[src]
pub fn compute_layout(&mut self, group: &Group, area: &Rect) -> Vec<Rect>
[src]
Check if we have already computed a layout for a given group, otherwise it creates one and add it to the layout cache. Moreover the function marks the queried entries so that we can clean outdated ones at the end of the draw call.
pub fn flush(&mut self) -> Result<(), Error>
[src]
Builds a string representing the minimal escape sequences and characters set necessary to update the UI and writes it to stdout.
pub fn render<W>(&mut self, widget: &mut W, area: &Rect) where
W: Widget,
[src]
W: Widget,
Calls the draw method of a given widget on the current buffer
pub fn resize(&mut self, area: Rect) -> Result<(), Error>
[src]
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(&mut self) -> Result<(), Error>
[src]
Flushes the current internal state and prepares the interface for the next draw call