Trait nannou::ui::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:
ⓘThis example is not 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.
Implementors
impl<'a, T> Common for NumberDialer<'a, T>
impl<'a> Common for Canvas<'a>
impl<'a, X, Y> Common for XYPad<'a, X, Y>
impl<X, Y, I> Common for Grid<X, Y, I>
impl Common for Rectangle
impl<'a> Common for TextBox<'a>
impl Common for Image
impl<'a> Common for FileNavigator<'a>
impl<'a> Common for TextEdit<'a>
impl<D, S> Common for List<D, S>
impl<'a> Common for Text<'a>
impl<'a, E> Common for EnvelopeEditor<'a, E> where
E: EnvelopePoint + 'a,impl<I> Common for Polygon<I>
impl<'a, T> Common for RangeSlider<'a, T>
impl<'a, T> Common for DropDownList<'a, T> where
T: 'a,impl<I> Common for PointPath<I>
impl<'a> Common for CollapsibleArea<'a>
impl Common for RoundedRectangle
impl<'a, T> Common for Slider<'a, T>
impl<W> Common for Node<W>
impl<'a> Common for Tabs<'a>
impl<'a> Common for Toggle<'a>
impl<'a, N, E> Common for Graph<'a, N, E> where
E: Iterator<Item = (NodeSocket<<N as Iterator>::Item>, NodeSocket<<N as Iterator>::Item>)>,
N: Iterator,
<N as Iterator>::Item: NodeId,impl<M, D, S> Common for ListSelect<M, D, S>
impl<X, Y, F> Common for PlotPath<X, Y, F>
impl<S, I> Common for Triangles<S, I>
impl<'a> Common for TitleBar<'a>
impl Common for BorderedRectangle
impl<'a> Common for DirectoryView<'a>
impl Common for Line
impl<'a, S> Common for Button<'a, S>
impl<S> Common for Oval<S>
impl Common for Matrix
impl<A> Common for Scrollbar<A>