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:

extern crate conrod;
#[macro_use] extern crate conrod_derive;

#[derive(WidgetCommon)]
struct MyWidget {
    #[conrod(common_builder)]
    common: conrod::widget::CommonBuilder,
    // etc
}

Required Methods

Borrows the CommonBuilder field.

Mutably borrows the CommonBuilder field.

Implementors