Struct elmesque::element::Element [] [src]

pub struct Element {
    pub props: Properties,
    pub element: Prim,
}

Graphical elements that snap together to build complex widgets and layouts.

Each element is a rectangle with a known width and height, making them easy to combine and position.

Fields

Methods

impl Element
[src]

Create an Element with a given width.

Create an Element with a given height.

Create an Element with a given size.

Create an Element with a given opacity.

Create an `Element with a given background color.

Crops an Element with the given rectangle.

Put an element in a container. This lets you position the element really easily, and there are tons of ways to set the Position.

Put an element in a cleared wrapper. The color provided will be the color that clears the screen before rendering the contained element.

Stack elements vertically. To put a above b you would say: a.above(b)

Stack elements vertically. To put a below b you would say: a.below(b)

Put elements beside each other horizontally. To put b to the right of a you would say: a.beside(b)

Return the width of the Element.

Return the height of the Element.

Return the size of the Element's bounding rectangle.

Draw the form with some given graphics backend.

Return whether or not a point is over the element.

Trait Implementations

impl Clone for Element
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Element
[src]

Formats the value using the given formatter.