[go: up one dir, main page]

Drawable

Trait Drawable 

Source
pub trait Drawable:
    _Drawable
    + Debug
    + Any {
    // Required methods
    fn request_size(&self, ctx: &mut Context) -> SizeRequest;
    fn name(&self) -> String;
    fn into_any(self: Box<Self>) -> Box<dyn Any>;
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
}
Expand description

A renderable element in the UI.

The Drawable trait is implemented by all visual elements such as shapes, text, and images.

Required Methods§

Source

fn request_size(&self, ctx: &mut Context) -> SizeRequest

Source

fn name(&self) -> String

Source

fn into_any(self: Box<Self>) -> Box<dyn Any>

Source

fn as_any(&self) -> &dyn Any

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Implementors§

Source§

impl<D: _Drawable + Debug + Any> Drawable for D