[][src]Struct conrod_core::widget::graph::node::Node

pub struct Node<W> {
    pub common: CommonBuilder,
    pub style: Style,
    pub widget: W,
    pub inputs: usize,
    pub outputs: usize,
}

A widget that acts as a convenience container for some Node's unique widgets.

Fields

common: CommonBuilder

Data necessary and common for all widget builder types.

style: Style

Unique styling for the Node.

widget: W

The widget wrapped by this node container.

inputs: usize

The number of input sockets on the node.

outputs: usize

The number of output sockets on the node.

Implementations

impl<W> Node<W>[src]

pub fn new(widget: W) -> Self[src]

Begin building a new Node widget.

pub fn inputs(self, inputs: usize) -> Self[src]

Specify the number of input sockets for the node.

pub fn outputs(self, outputs: usize) -> Self[src]

Specify the number of output sockets for the node.

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

Specify the color for the node's inner rectangle.

pub fn border_thickness(self, thickness: Scalar) -> Self[src]

The thickness of the border around the inner widget.

This must always be a positive value in order for sockets to remain visible.

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

Specify the color for the node's border.

pub fn border_radius(self, radius: Scalar) -> Self[src]

Specify the radius for the node's border.

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

Specify the color for the node's sockets.

pub fn input_socket_layout(self, layout: SocketLayout) -> Self[src]

Specify the layout of the input sockets.

pub fn output_socket_layout(self, layout: SocketLayout) -> Self[src]

Specify the layout of the input sockets.

Trait Implementations

impl<W: Clone> Clone for Node<W>[src]

impl<W> Common for Node<W>[src]

impl<W: Debug> Debug for Node<W>[src]

impl<W> Widget for Node<W> where
    W: Widget
[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 = Event<W::Event>

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

Auto Trait Implementations

impl<W> RefUnwindSafe for Node<W> where
    W: RefUnwindSafe

impl<W> Send for Node<W> where
    W: Send

impl<W> Sync for Node<W> where
    W: Sync

impl<W> Unpin for Node<W> where
    W: Unpin

impl<W> UnwindSafe for Node<W> where
    W: 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.