[][src]Struct nannou::ui::prelude::widget::Rectangle

pub struct Rectangle {
    pub common: CommonBuilder,
    pub style: Style,
}

A basic, non-interactive rectangle shape widget.

Fields

common: CommonBuilder

Data necessary and common for all widget builder types.

style: Style

Unique styling for the Rectangle.

Methods

impl Rectangle[src]

pub fn styled(dim: [f64; 2], style: Style) -> Rectangle[src]

Build a rectangle with the dimensions and style.

pub fn fill(dim: [f64; 2]) -> Rectangle[src]

Build a new filled rectangle.

pub fn fill_with(dim: [f64; 2], color: Color) -> Rectangle[src]

Build a new filled rectangle widget filled with the given color.

pub fn outline(dim: [f64; 2]) -> Rectangle[src]

Build a new outlined rectangle widget.

pub fn outline_styled(dim: [f64; 2], line_style: Style) -> Rectangle[src]

Build an outlined rectangle rather than a filled one.

Trait Implementations

impl Clone for Rectangle[src]

impl Colorable for Rectangle[src]

impl Common for Rectangle[src]

impl Copy for Rectangle[src]

impl Debug for Rectangle[src]

impl Widget for Rectangle[src]

type State = State

State to be stored within the Uis widget cache. Read more

type Style = Style

Every widget is required to have its own associated Style type. This type is intended to contain high-level styling information for the widget that can be optionally specified by a user of the widget. Read more

type Event = ()

The type of event yielded by the widget, returned via the Widget::set function. Read more

fn update(self, args: UpdateArgs<Rectangle>) -> <Rectangle as Widget>::Event[src]

Update the state of the Rectangle.

Auto Trait Implementations

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<W> Positionable for W where
    W: Widget
[src]

impl<T> SetParameter for T

impl<T> SetParameter for T

impl<W> Sizeable for W where
    W: Widget
[src]

fn get_x_dimension(&self, ui: &Ui) -> Dimension[src]

We attempt to retrieve the x Dimension for the widget via the following:

  • Check for specified value at maybe_x_dimension
  • Otherwise, use the default returned by Widget::default_x_dimension.

fn get_y_dimension(&self, ui: &Ui) -> Dimension[src]

We attempt to retrieve the y Dimension for the widget via the following:

  • Check for specified value at maybe_y_dimension
  • Otherwise, use the default returned by Widget::default_y_dimension.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,