[][src]Struct tuikit::canvas::BoundedCanvas

pub struct BoundedCanvas<'a> { /* fields omitted */ }

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.

Methods

impl<'a> BoundedCanvas<'a>[src]

pub fn new(
    top: usize,
    left: usize,
    width: usize,
    height: usize,
    canvas: &'a mut dyn Canvas
) -> Self
[src]

Trait Implementations

impl<'a> Canvas for BoundedCanvas<'a>[src]

fn put_char_with_attr(
    &mut self,
    row: usize,
    col: usize,
    ch: char,
    attr: Attr
) -> Result<usize>
[src]

just like put_cell, except it accept (char & attr) return the width of the character/cell Read more

fn print_with_attr(
    &mut self,
    row: usize,
    col: usize,
    content: &str,
    attr: Attr
) -> Result<usize>
[src]

print content starting with position (row, col) with attr - canvas should NOT wrap to y+1 if the content is too long - canvas should handle wide characters return the printed width of the content Read more

fn print(&mut self, row: usize, col: usize, content: &str) -> Result<usize>[src]

print content starting with position (row, col) with default attribute

Auto Trait Implementations

impl<'a> !Send for BoundedCanvas<'a>

impl<'a> !Sync for BoundedCanvas<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]