[−][src]Trait gui::Renderable
A trait representing a renderable object.
Required methods
fn type_id(&self) -> TypeId
Get the TypeId
of self
.
fn render(&self, renderer: &dyn Renderer, bbox: BBox, cap: &dyn Cap) -> BBox
Render the renderable object.
This method just forwards the call to the given Renderer
,
supplying a trait object of the actual widget. The renderer is
advised to honor the given BBox
and is free to inquire
additional state using the supplied Cap
.
Methods
impl dyn Renderable
[src]
pub fn is<T>(&self) -> bool where
T: Renderable,
[src]
T: Renderable,
Check if the widget is of type T
.
pub fn downcast_ref<T>(&self) -> Option<&T> where
T: Renderable,
[src]
T: Renderable,
Downcast the widget reference to type T
.
pub fn downcast_mut<T>(&mut self) -> Option<&mut T> where
T: Renderable,
[src]
T: Renderable,
Downcast the widget reference to type T
.