Trait conrod::widget::Common
[−]
[src]
pub trait Common { fn common(&self) -> &CommonBuilder; fn common_mut(&mut self) -> &mut CommonBuilder; }
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:
⚠Be careful when using this code, it's not being tested!
extern crate conrod; #[macro_use] extern crate conrod_derive; #[derive(WidgetCommon)] struct MyWidget { #[conrod(common_builder)] common: conrod::widget::CommonBuilder, // etc }
Required Methods
fn common(&self) -> &CommonBuilder
Borrows the CommonBuilder
field.
fn common_mut(&mut self) -> &mut CommonBuilder
Mutably borrows the CommonBuilder
field.