[][src]Struct conrod_core::widget::graph::Graph

pub struct Graph<'a, N, E> where
    N: Iterator,
    N::Item: NodeId,
    E: Iterator<Item = (NodeSocket<N::Item>, NodeSocket<N::Item>)>, 
{ pub common: CommonBuilder, pub style: Style, pub nodes: N, pub edges: E, pub layout: &'a Layout<N::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::Item>

The position of each node within the graph.

Implementations

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

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

Begin building a new Graph widget.

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

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

Trait Implementations

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

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

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

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

type State = State<N::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::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<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.