[][src]Trait embedded_layout::View

pub trait View {
    fn translate(&mut self, by: Point);
fn bounds(&self) -> Rectangle; fn size(&self) -> Size { ... } }

A View is the base unit for most of the embedded-layout operations.

Views must have a size and a position, so they need to implement the Dimensions and Transform traits.

See the custom_view example for how you can define more complex views.

Required methods

fn translate(&mut self, by: Point)

Move the origin of an object by a given number of (x, y) pixels

fn bounds(&self) -> Rectangle

Returns the bounding box of the View as a Rectangle

Loading content...

Provided methods

fn size(&self) -> Size

Get the size of a View.

Loading content...

Implementors

impl<C: ViewChainElement> View for ViewGroup<C>[src]

impl<T> View for T where
    T: Transform + Dimensions
[src]

Loading content...