pub struct Canvas { /* private fields */ }Implementations§
Source§impl Canvas
impl Canvas
pub fn restore_buffer(&mut self, buffer: &mut CanvasBuffer)
pub fn take_buffer(&mut self) -> CanvasBuffer
pub fn translate(&self, pos: Pos) -> LocalPos
pub fn put(&mut self, c: char, style: Style, pos: impl Into<LocalPos>)
pub fn get(&mut self, pos: impl Into<LocalPos>) -> Option<(char, Style)>
pub fn get_mut( &mut self, pos: impl Into<LocalPos>, ) -> Option<(&mut char, &mut Style)>
pub fn erase(&mut self, pos: impl Into<LocalPos>)
pub fn clear(&mut self)
Trait Implementations§
Source§impl Widget for Canvas
impl Widget for Canvas
fn layout<'bp>( &mut self, _: LayoutForEach<'_, 'bp>, constraints: Constraints, id: WidgetId, ctx: &mut LayoutCtx<'_, 'bp>, ) -> Result<Size>
fn position<'bp>( &mut self, _: PositionChildren<'_, 'bp>, _id: WidgetId, _attribute_storage: &AttributeStorage<'bp>, ctx: PositionCtx, )
fn paint<'bp>( &mut self, _children: PaintChildren<'_, 'bp>, _id: WidgetId, _attribute_storage: &AttributeStorage<'bp>, ctx: PaintCtx<'_, SizePos>, )
fn needs_reflow(&mut self) -> bool
fn floats(&self) -> bool
fn inner_bounds(&self, pos: Pos, size: Size) -> Region
Auto Trait Implementations§
impl Freeze for Canvas
impl RefUnwindSafe for Canvas
impl Send for Canvas
impl Sync for Canvas
impl Unpin for Canvas
impl UnsafeUnpin for Canvas
impl UnwindSafe for Canvas
Blanket Implementations§
Source§impl<T> AnyWidget for Twhere
T: 'static + Widget,
impl<T> AnyWidget for Twhere
T: 'static + Widget,
fn to_any_ref(&self) -> &(dyn Any + 'static)
fn to_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn any_layout<'bp>( &mut self, children: LayoutForEach<'_, 'bp>, constraints: Constraints, id: Key, ctx: &mut LayoutCtx<'_, 'bp>, ) -> Result<Size, Error>
fn any_position<'bp>( &mut self, children: ForEach<'_, 'bp, PositionFilter>, id: Key, attribute_storage: &AttributeStorage<'bp>, ctx: PositionCtx, )
fn any_paint<'bp>( &mut self, children: ForEach<'_, 'bp, PaintFilter>, id: Key, attribute_storage: &AttributeStorage<'bp>, ctx: PaintCtx<'_, SizePos>, )
fn any_inner_bounds(&self, pos: Pos, size: Size) -> Region
fn any_floats(&self) -> bool
fn any_needs_reflow(&mut self) -> bool
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