pub struct Screen { /* private fields */ }Expand description
Represents the overall terminal state.
Implementations§
Source§impl Screen
impl Screen
pub fn get_selected_text( &self, low_x: i32, low_y: i32, high_x: i32, high_y: i32, ) -> String
termtui only.Sourcepub fn size(&self) -> Size
Available on crate feature termtui only.
pub fn size(&self) -> Size
termtui only.Returns the current size of the terminal.
The return value will be (rows, cols).
Sourcepub fn scrollback(&self) -> usize
Available on crate feature termtui only.
pub fn scrollback(&self) -> usize
termtui only.Returns the current position in the scrollback.
This position indicates the offset from the top of the screen, and is
0 when the normal screen is in view.
pub fn scrollback_len(&self) -> usize
termtui only.pub fn set_scrollback(&mut self, rows: usize)
termtui only.pub fn scroll_screen_up(&mut self, n: usize)
termtui only.pub fn scroll_screen_down(&mut self, n: usize)
termtui only.Sourcepub fn cursor_position(&self) -> (u16, u16)
Available on crate feature termtui only.
pub fn cursor_position(&self) -> (u16, u16)
termtui only.Returns the current cursor position of the terminal.
The return value will be (row, col).
Sourcepub fn cell(&self, row: u16, col: u16) -> Option<&Cell>
Available on crate feature termtui only.
pub fn cell(&self, row: u16, col: u16) -> Option<&Cell>
termtui only.Returns the Cell object at the given location in the terminal, if it
exists.
pub fn cursor_style(&self) -> CursorStyle
termtui only.Sourcepub fn application_cursor(&self) -> bool
Available on crate feature termtui only.
pub fn application_cursor(&self) -> bool
termtui only.Returns whether the terminal should be in application cursor mode.
Sourcepub fn hide_cursor(&self) -> bool
Available on crate feature termtui only.
pub fn hide_cursor(&self) -> bool
termtui only.Returns whether the terminal should be in hide cursor mode.
Sourcepub fn mouse_protocol_mode(&self) -> MouseProtocolMode
Available on crate feature termtui only.
pub fn mouse_protocol_mode(&self) -> MouseProtocolMode
termtui only.Returns the currently active MouseProtocolMode
Source§impl Screen
impl Screen
Sourcepub fn process(&mut self, data: &[u8], events: &mut Vec<VtEvent>)
Available on crate feature termtui only.
pub fn process(&mut self, data: &[u8], events: &mut Vec<VtEvent>)
termtui only.https://man7.org/linux/man-pages/man4/console_codes.4.html https://en.wikipedia.org/wiki/ANSI_escape_code https://terminalguide.namepad.de/seq/ https://vt100.net/docs/vt510-rm/contents.html https://xtermjs.org/docs/api/vtfeatures/ https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences https://bjh21.me.uk/all-escapes/all-escapes.txt
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Screen
impl RefUnwindSafe for Screen
impl Send for Screen
impl Sync for Screen
impl Unpin for Screen
impl UnsafeUnpin for Screen
impl UnwindSafe for Screen
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more