Struct tuikit::canvas::BoundedCanvas
source · [−]pub struct BoundedCanvas<'a> { /* private fields */ }
Expand description
A sub-area of a canvas. It will handle the adjustments of cursor movement, so that you could write to for example (0, 0) and BoundedCanvas will adjust it to real position.
Implementations
Trait Implementations
sourceimpl<'a> Canvas for BoundedCanvas<'a>
impl<'a> Canvas for BoundedCanvas<'a>
sourcefn put_cell(&mut self, row: usize, col: usize, cell: Cell) -> Result<usize>
fn put_cell(&mut self, row: usize, col: usize, cell: Cell) -> Result<usize>
change a cell of position
(row, col)
to cell
if (row, col)
is out of boundary, Ok
is returned, but no operation is taken
return the width of the character/cell Read moresourcefn set_cursor(&mut self, row: usize, col: usize) -> Result<()>
fn set_cursor(&mut self, row: usize, col: usize) -> Result<()>
move cursor position (row, col) and show cursor
sourcefn show_cursor(&mut self, show: bool) -> Result<()>
fn show_cursor(&mut self, show: bool) -> Result<()>
show/hide cursor, set
show
to false
to hide the cursorsourcefn put_char_with_attr(
&mut self,
row: usize,
col: usize,
ch: char,
attr: Attr
) -> Result<usize>
fn put_char_with_attr(
&mut self,
row: usize,
col: usize,
ch: char,
attr: Attr
) -> Result<usize>
just like put_cell, except it accept (char & attr)
return the width of the character/cell Read more
Auto Trait Implementations
impl<'a> !RefUnwindSafe for BoundedCanvas<'a>
impl<'a> !Send for BoundedCanvas<'a>
impl<'a> !Sync for BoundedCanvas<'a>
impl<'a> Unpin for BoundedCanvas<'a>
impl<'a> !UnwindSafe for BoundedCanvas<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more