Trait conrod_core::widget::Common [−][src]
pub trait Common { fn common(&self) -> &CommonBuilder; fn common_mut(&mut self) -> &mut CommonBuilder; }
Expand description
A trait implemented by all Widget types.
This trait provides access to a field of type CommonBuilder on the implementor. This allows
the Widget
trait to automatically provide a large number of methods including those from the
Positionable and Sizeable traits.
The Common trait can be automatically derived for widgets like so:
ⓘ
extern crate conrod_core; #[macro_use] extern crate conrod_derive; #[derive(WidgetCommon)] struct MyWidget { #[conrod(common_builder)] common: conrod_core::widget::CommonBuilder, // etc }
Required methods
fn common(&self) -> &CommonBuilder
fn common(&self) -> &CommonBuilder
Borrows the CommonBuilder
field.
fn common_mut(&mut self) -> &mut CommonBuilder
fn common_mut(&mut self) -> &mut CommonBuilder
Mutably borrows the CommonBuilder
field.