[][src]Struct conrod_core::widget::grid::Grid

pub struct Grid<X, Y, I> {
    pub common: CommonBuilder,
    pub style: Style,
    pub min_x: X,
    pub max_x: X,
    pub min_y: Y,
    pub max_y: Y,
    pub x_offset: Option<X>,
    pub y_offset: Option<Y>,
    pub lines: I,
}

A widget for displaying a grid of lines across two axes.

Fields

common: CommonBuilder

Builder parameters that are common to all Widgets.

style: Style

Unique styling parameters for the Grid widget.

min_x: X

The minimum visible bound along the x axis.

max_x: X

The maximum visible bound along the x axis.

min_y: Y

The minimum visible bound along the y axis.

max_y: Y

The maximum visible bound along the y axis.

x_offset: Option<X>

An offset for all vertical lines distributed across the x axis.

y_offset: Option<Y>

An offset for all horizontal lines distributed across the y axis.

lines: I

An iterator yielding each sequence of lines to be distributed across the grid.

Implementations

impl<X, Y, I> Grid<X, Y, I>[src]

pub fn new(
    min_x: X,
    max_x: X,
    min_y: Y,
    max_y: Y,
    lines: I
) -> Grid<X, Y, I::IntoIter> where
    X: Into<Scalar>,
    Y: Into<Scalar>,
    I: IntoIterator<Item = Axis<X, Y>>, 
[src]

Begin building a new PlotPath widget instance.

The first four arguments represent the visible range along both axes.

The final argument is an iterator yielding Lines across either Axis. The given lines will be drawn in the order that they're given.

pub fn x_offset(self, x: X) -> Self[src]

Specify an offset for all vertical lines placed along the X axis.

pub fn y_offset(self, y: Y) -> Self[src]

Specify an offset for all horizontal lines placed along the Y axis.

Trait Implementations

impl<X: Clone, Y: Clone, I: Clone> Clone for Grid<X, Y, I>[src]

impl<X, Y, I> Colorable for Grid<X, Y, I>[src]

fn color(self, color: Color) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

impl<X, Y, I> Common for Grid<X, Y, I>[src]

impl<X: Copy, Y: Copy, I: Copy> Copy for Grid<X, Y, I>[src]

impl<X: Debug, Y: Debug, I: Debug> Debug for Grid<X, Y, I>[src]

impl<X, Y, I> Widget for Grid<X, Y, I> where
    X: Into<Scalar>,
    Y: Into<Scalar>,
    I: Iterator<Item = Axis<X, Y>>, 
[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<'_, '_, '_, '_, Self>) -> Self::Event[src]

Update the state of the PlotPath.

Auto Trait Implementations

impl<X, Y, I> RefUnwindSafe for Grid<X, Y, I> where
    I: RefUnwindSafe,
    X: RefUnwindSafe,
    Y: RefUnwindSafe

impl<X, Y, I> Send for Grid<X, Y, I> where
    I: Send,
    X: Send,
    Y: Send

impl<X, Y, I> Sync for Grid<X, Y, I> where
    I: Sync,
    X: Sync,
    Y: Sync

impl<X, Y, I> Unpin for Grid<X, Y, I> where
    I: Unpin,
    X: Unpin,
    Y: Unpin

impl<X, Y, I> UnwindSafe for Grid<X, Y, I> where
    I: UnwindSafe,
    X: UnwindSafe,
    Y: UnwindSafe

Blanket Implementations

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> 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<W> Sizeable for W where
    W: Widget
[src]

fn get_x_dimension(&Self, &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) -> 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.