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>>
[src]
pub fn new(backend: B) -> Result<Terminal<B>>
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<()>
[src]
pub fn flush(&mut self) -> Result<()>
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<()>
[src]
pub fn resize(&mut self, area: Rect) -> Result<()>
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<()> where
F: FnOnce(Frame<B>),
[src]
pub fn draw<F>(&mut self, f: F) -> Result<()> 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<()>
[src]
pub fn hide_cursor(&mut self) -> Result<()>
pub fn show_cursor(&mut self) -> Result<()>
[src]
pub fn show_cursor(&mut self) -> Result<()>
pub fn clear(&mut self) -> Result<()>
[src]
pub fn clear(&mut self) -> Result<()>
pub fn size(&self) -> Result<Rect>
[src]
pub fn size(&self) -> Result<Rect>
Trait Implementations
impl<B: Debug> Debug for Terminal<B> where
B: Backend,
[src]
impl<B: Debug> Debug for Terminal<B> where
B: Backend,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<B> Drop for Terminal<B> where
B: Backend,
[src]
impl<B> Drop for Terminal<B> where
B: Backend,