pub struct Grid {
pub cursor_pos: Option<Pos>,
pub cursor_style: CursorStyle,
/* private fields */
}Available on crate feature
termtui only.Fields§
§cursor_pos: Option<Pos>§cursor_style: CursorStyleImplementations§
Source§impl Grid
impl Grid
pub fn new(size: Size, scrollback_len: usize) -> Grid
pub fn get_selected_text( &self, low_x: i32, low_y: i32, high_x: i32, high_y: i32, ) -> String
pub fn clear(&mut self)
pub fn size(&self) -> Size
pub fn set_size(&mut self, size: Size)
pub fn pos(&self) -> Pos
pub fn set_pos(&mut self, pos: Pos)
pub fn save_cursor(&mut self)
pub fn restore_cursor(&mut self)
pub fn visible_rows(&self) -> impl Iterator<Item = &Row>
pub fn drawing_rows(&self) -> impl Iterator<Item = &Row>
pub fn drawing_rows_mut(&mut self) -> impl Iterator<Item = &mut Row>
pub fn visible_row(&self, row: u16) -> Option<&Row>
pub fn drawing_row(&self, row: u16) -> Option<&Row>
pub fn drawing_row_mut(&mut self, row: u16) -> Option<&mut Row>
pub fn current_row_mut(&mut self) -> &mut Row
pub fn visible_cell(&self, pos: Pos) -> Option<&Cell>
pub fn drawing_cell(&self, pos: Pos) -> Option<&Cell>
pub fn drawing_cell_mut(&mut self, pos: Pos) -> Option<&mut Cell>
pub fn scrollback_len(&self) -> usize
pub fn scrollback(&self) -> usize
pub fn set_scrollback(&mut self, rows: usize)
pub fn erase_all(&mut self, attrs: Attrs)
pub fn erase_all_forward(&mut self, attrs: Attrs)
pub fn erase_all_backward(&mut self, attrs: Attrs)
pub fn erase_row(&mut self, attrs: Attrs)
pub fn erase_row_forward(&mut self, attrs: Attrs)
pub fn erase_row_backward(&mut self, attrs: Attrs)
pub fn insert_cells(&mut self, count: u16)
pub fn delete_cells(&mut self, count: u16)
pub fn erase_cells(&mut self, count: u16, attrs: Attrs)
pub fn insert_lines(&mut self, count: u16)
pub fn delete_lines(&mut self, count: u16, blank_attrs: Attrs)
pub fn scroll_up(&mut self, count: u16)
pub fn scroll_down(&mut self, count: u16)
pub fn set_scroll_region(&mut self, top: u16, bottom: u16)
pub fn set_origin_mode(&mut self, mode: bool)
pub fn row_inc_clamp(&mut self, count: u16)
pub fn row_inc_scroll(&mut self, count: u16) -> u16
pub fn row_dec_clamp(&mut self, count: u16)
pub fn row_dec_scroll(&mut self, count: u16)
pub fn row_set(&mut self, i: u16)
pub fn col_inc(&mut self, count: u16)
pub fn col_inc_clamp(&mut self, count: u16)
pub fn col_dec(&mut self, count: u16)
pub fn col_tab(&mut self)
pub fn col_set(&mut self, i: u16)
pub fn col_wrap(&mut self, width: u16, wrap: bool)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Grid
impl RefUnwindSafe for Grid
impl Send for Grid
impl Sync for Grid
impl Unpin for Grid
impl UnsafeUnpin for Grid
impl UnwindSafe for Grid
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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