pub struct Grid {
pub cursor_pos: Option<Pos>,
pub cursor_style: CursorStyle,
/* private fields */
}Fields§
§cursor_pos: Option<Pos>§cursor_style: CursorStyleImplementations§
Source§impl Grid
impl Grid
pub fn new(size: Size, scrollback_len: usize) -> Grid
Available on crate feature
termtui only.pub fn get_selected_text( &self, low_x: i32, low_y: i32, high_x: i32, high_y: i32, ) -> String
Available on crate feature
termtui only.pub fn clear(&mut self)
Available on crate feature
termtui only.pub fn size(&self) -> Size
Available on crate feature
termtui only.pub fn set_size(&mut self, size: Size)
Available on crate feature
termtui only.pub fn pos(&self) -> Pos
Available on crate feature
termtui only.pub fn set_pos(&mut self, pos: Pos)
Available on crate feature
termtui only.pub fn save_cursor(&mut self)
Available on crate feature
termtui only.pub fn restore_cursor(&mut self)
Available on crate feature
termtui only.pub fn visible_rows(&self) -> impl Iterator<Item = &Row>
Available on crate feature
termtui only.pub fn drawing_rows(&self) -> impl Iterator<Item = &Row>
Available on crate feature
termtui only.pub fn drawing_rows_mut(&mut self) -> impl Iterator<Item = &mut Row>
Available on crate feature
termtui only.pub fn visible_row(&self, row: u16) -> Option<&Row>
Available on crate feature
termtui only.pub fn drawing_row(&self, row: u16) -> Option<&Row>
Available on crate feature
termtui only.pub fn drawing_row_mut(&mut self, row: u16) -> Option<&mut Row>
Available on crate feature
termtui only.pub fn current_row_mut(&mut self) -> &mut Row
Available on crate feature
termtui only.pub fn visible_cell(&self, pos: Pos) -> Option<&Cell>
Available on crate feature
termtui only.pub fn drawing_cell(&self, pos: Pos) -> Option<&Cell>
Available on crate feature
termtui only.pub fn drawing_cell_mut(&mut self, pos: Pos) -> Option<&mut Cell>
Available on crate feature
termtui only.pub fn scrollback_len(&self) -> usize
Available on crate feature
termtui only.pub fn scrollback(&self) -> usize
Available on crate feature
termtui only.pub fn set_scrollback(&mut self, rows: usize)
Available on crate feature
termtui only.pub fn erase_all(&mut self, attrs: Attrs)
Available on crate feature
termtui only.pub fn erase_all_forward(&mut self, attrs: Attrs)
Available on crate feature
termtui only.pub fn erase_all_backward(&mut self, attrs: Attrs)
Available on crate feature
termtui only.pub fn erase_row(&mut self, attrs: Attrs)
Available on crate feature
termtui only.pub fn erase_row_forward(&mut self, attrs: Attrs)
Available on crate feature
termtui only.pub fn erase_row_backward(&mut self, attrs: Attrs)
Available on crate feature
termtui only.pub fn insert_cells(&mut self, count: u16)
Available on crate feature
termtui only.pub fn delete_cells(&mut self, count: u16)
Available on crate feature
termtui only.pub fn erase_cells(&mut self, count: u16, attrs: Attrs)
Available on crate feature
termtui only.pub fn insert_lines(&mut self, count: u16)
Available on crate feature
termtui only.pub fn delete_lines(&mut self, count: u16, blank_attrs: Attrs)
Available on crate feature
termtui only.pub fn scroll_up(&mut self, count: u16)
Available on crate feature
termtui only.pub fn scroll_down(&mut self, count: u16)
Available on crate feature
termtui only.pub fn set_scroll_region(&mut self, top: u16, bottom: u16)
Available on crate feature
termtui only.pub fn set_origin_mode(&mut self, mode: bool)
Available on crate feature
termtui only.pub fn row_inc_clamp(&mut self, count: u16)
Available on crate feature
termtui only.pub fn row_inc_scroll(&mut self, count: u16) -> u16
Available on crate feature
termtui only.pub fn row_dec_clamp(&mut self, count: u16)
Available on crate feature
termtui only.pub fn row_dec_scroll(&mut self, count: u16)
Available on crate feature
termtui only.pub fn row_set(&mut self, i: u16)
Available on crate feature
termtui only.pub fn col_inc(&mut self, count: u16)
Available on crate feature
termtui only.pub fn col_inc_clamp(&mut self, count: u16)
Available on crate feature
termtui only.pub fn col_dec(&mut self, count: u16)
Available on crate feature
termtui only.pub fn col_tab(&mut self)
Available on crate feature
termtui only.pub fn col_set(&mut self, i: u16)
Available on crate feature
termtui only.pub fn col_wrap(&mut self, width: u16, wrap: bool)
Available on crate feature
termtui only.Source§impl Grid
impl Grid
pub fn area(&self) -> Rect
Available on crate feature
termtui only.pub fn draw_block(&mut self, area: Rect, type_: BorderType, attrs: Attrs)
Available on crate feature
termtui only.pub fn draw_text(&mut self, area: Rect, text: &str, attrs: Attrs) -> Rect
Available on crate feature
termtui only.pub fn fill_area(&mut self, area: Rect, c: char, attrs: Attrs)
Available on crate feature
termtui only.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