[][src]Struct nannou::ui::prelude::widget::graph::Graph

pub struct 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
{ pub common: CommonBuilder, pub style: Style, pub nodes: N, pub edges: E, pub layout: &'a Layout<<N as Iterator>::Item>, }

A widget used for visualising and manipulating Graph types.

Fields

common: CommonBuilder

Data necessary and common for all widget builder types.

style: Style

Unique styling for the Graph.

nodes: N

All nodes within the graph that the widget is to represent.

edges: E

All edges within the graph.

layout: &'a Layout<<N as Iterator>::Item>

The position of each node within the graph.

Implementations

impl<'a, N, E> 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
[src]

pub fn new<NI, EI>(
    nodes: NI,
    edges: EI,
    layout: &'a Layout<<NI as IntoIterator>::Item>
) -> Graph<'a, N, E> where
    EI: IntoIterator<IntoIter = E, Item = (NodeSocket<<N as Iterator>::Item>, NodeSocket<<N as Iterator>::Item>)>,
    NI: IntoIterator<IntoIter = N, Item = <N as Iterator>::Item>, 
[src]

Begin building a new Graph widget.

pub fn background_color(self, color: Color) -> Graph<'a, N, E>[src]

Color the Graph's rectangular area with the given color.

Trait Implementations

impl<'a, N, E> Clone for Graph<'a, N, E> where
    E: Clone + Iterator<Item = (NodeSocket<<N as Iterator>::Item>, NodeSocket<<N as Iterator>::Item>)>,
    N: Clone + Iterator,
    <N as Iterator>::Item: NodeId,
    <N as Iterator>::Item: Clone
[src]

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
[src]

impl<'a, N, E> Debug for Graph<'a, N, E> where
    E: Debug + Iterator<Item = (NodeSocket<<N as Iterator>::Item>, NodeSocket<<N as Iterator>::Item>)>,
    N: Debug + Iterator,
    <N as Iterator>::Item: NodeId,
    <N as Iterator>::Item: Debug
[src]

impl<'a, N, E> Widget 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
[src]

type State = State<<N as Iterator>::Item>

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 = SessionEvents<<N as Iterator>::Item>

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

Auto Trait Implementations

impl<'a, N, E> RefUnwindSafe for Graph<'a, N, E> where
    E: RefUnwindSafe,
    N: RefUnwindSafe,
    <N as Iterator>::Item: RefUnwindSafe

impl<'a, N, E> Send for Graph<'a, N, E> where
    E: Send,
    N: Send,
    <N as Iterator>::Item: Sync

impl<'a, N, E> Sync for Graph<'a, N, E> where
    E: Sync,
    N: Sync,
    <N as Iterator>::Item: Sync

impl<'a, N, E> Unpin for Graph<'a, N, E> where
    E: Unpin,
    N: Unpin

impl<'a, N, E> UnwindSafe for Graph<'a, N, E> where
    E: UnwindSafe,
    N: UnwindSafe,
    <N as Iterator>::Item: RefUnwindSafe

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<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>,