[−][src]Struct vt100::Screen
Represents a terminal screen.
Methods
impl Screen
[src]
pub fn new(rows: u16, cols: u16) -> Self
[src]
Creates a new terminal screen of the given size.
pub fn process(&mut self, bytes: &[u8])
[src]
Processes the contents of the given byte string, and updates the in-memory terminal state.
pub fn set_size(&mut self, rows: u16, cols: u16)
[src]
Resizes the terminal.
pub fn size(&self) -> (u16, u16)
[src]
Returns the current size of the terminal.
The return value will be (rows, cols).
pub fn contents(
&self,
row_start: u16,
col_start: u16,
row_end: u16,
col_end: u16
) -> String
[src]
&self,
row_start: u16,
col_start: u16,
row_end: u16,
col_end: u16
) -> String
Returns the text contents of the subset of the terminal given by the parameters.
This will not include any formatting information, and will be in plain text format.
pub fn contents_formatted(
&self,
row_start: u16,
col_start: u16,
row_end: u16,
col_end: u16
) -> String
[src]
&self,
row_start: u16,
col_start: u16,
row_end: u16,
col_end: u16
) -> String
Returns the formatted contents of the subset of the terminal given by the parameters.
Formatting information will be included inline as terminal escape codes. The result will be suitable for feeding directly to a raw terminal parser, and will result in the same visual output. Internal terminal modes (such as application keypad mode or alternate screen mode) will not be included here.
pub fn cell(&self, row: u16, col: u16) -> Option<&Cell>
[src]
Returns the Cell
object at the given location in the terminal, if it
exists.
pub fn cursor_position(&self) -> (u16, u16)
[src]
Returns the current cursor position of the terminal.
The return value will be (row, col).
pub fn fgcolor(&self) -> Color
[src]
Returns the currently active foreground color.
This is the foreground color which will be used when writing text to a new cell.
pub fn bgcolor(&self) -> Color
[src]
Returns the currently active background color.
This is the background color which will be used when writing text to a new cell.
pub fn bold(&self) -> bool
[src]
Returns whether the bold text attribute is active.
If true, text written to a new cell will have the bold text attribute.
pub fn italic(&self) -> bool
[src]
Returns whether the italic text attribute is active.
If true, text written to a new cell will have the italic text attribute.
pub fn underline(&self) -> bool
[src]
Returns whether the underline text attribute is active.
If true, text written to a new cell will have the underline text attribute.
pub fn inverse(&self) -> bool
[src]
Returns whether the inverse text attribute is active.
If true, text written to a new cell will have the inverse text attribute.
pub fn title(&self) -> &str
[src]
Returns the terminal's window title.
pub fn icon_name(&self) -> &str
[src]
Returns the terminal's icon name.
pub fn check_audible_bell(&mut self) -> bool
[src]
Returns whether an audible bell has occurred since the last time this method was called.
pub fn check_visual_bell(&mut self) -> bool
[src]
Returns whether an visual bell has occurred since the last time this method was called.
pub fn application_keypad(&self) -> bool
[src]
Returns whether the terminal should be in application keypad mode.
pub fn application_cursor(&self) -> bool
[src]
Returns whether the terminal should be in application cursor mode.
pub fn hide_cursor(&self) -> bool
[src]
Returns whether the terminal should be in hide cursor mode.
pub fn alternate_screen(&self) -> bool
[src]
Returns whether the terminal should be in alternate screen mode.
pub fn bracketed_paste(&self) -> bool
[src]
Returns whether the terminal should be in bracketed paste mode.
pub fn mouse_protocol_mode(&self) -> MouseProtocolMode
[src]
Returns the currently active MouseProtocolMode
pub fn mouse_protocol_encoding(&self) -> MouseProtocolEncoding
[src]
Returns the currently active MouseProtocolEncoding
Auto Trait Implementations
impl Send for Screen
impl Sync for Screen
impl Unpin for Screen
impl UnwindSafe for Screen
impl RefUnwindSafe for Screen
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,