Struct nannou::ui::widget::graph::NodeWidget [−][src]
pub struct NodeWidget<'a, NI, W> where
NI: 'a + NodeId, { /* fields omitted */ }
Returned when a NodeContext
is assigned a widget.
This intermediary type allows for accessing the widget::Id
before the widget itself is
instantiated.
Methods
impl<'a, NI, W> NodeWidget<'a, NI, W> where
NI: NodeId,
W: 'static + Widget,
[src]
impl<'a, NI, W> NodeWidget<'a, NI, W> where
NI: NodeId,
W: 'static + Widget,
pub fn widget_id(&self, ui: &mut UiCell) -> NodeIndex<u32>
[src]
pub fn widget_id(&self, ui: &mut UiCell) -> NodeIndex<u32>
Retrieve the widget::Id
that will be used to instantiate this node's widget.
pub fn map<M>(self, map: M) -> NodeWidget<'a, NI, W> where
M: FnOnce(W) -> W,
[src]
pub fn map<M>(self, map: M) -> NodeWidget<'a, NI, W> where
M: FnOnce(W) -> W,
Map over the inner widget.
pub fn set(self, ui: &mut UiCell) -> <W as Widget>::Event
[src]
pub fn set(self, ui: &mut UiCell) -> <W as Widget>::Event
Set the given widget for the node at node_id()
.
Methods from Deref<Target = NodeContext<'a, NI>>
pub fn node_id(&self) -> NI
[src]
pub fn node_id(&self) -> NI
The unique identifier associated with this node.
pub fn point(&self) -> [f64; 2]
[src]
pub fn point(&self) -> [f64; 2]
The location of the node.
Trait Implementations
impl<'a, NI, W> Deref for NodeWidget<'a, NI, W> where
NI: NodeId,
[src]
impl<'a, NI, W> Deref for NodeWidget<'a, NI, W> where
NI: NodeId,
type Target = NodeContext<'a, NI>
The resulting type after dereferencing.
fn deref(&self) -> &<NodeWidget<'a, NI, W> as Deref>::Target
[src]
fn deref(&self) -> &<NodeWidget<'a, NI, W> as Deref>::Target
Dereferences the value.
Auto Trait Implementations
impl<'a, NI, W> Send for NodeWidget<'a, NI, W> where
NI: Sync,
W: Send,
impl<'a, NI, W> Send for NodeWidget<'a, NI, W> where
NI: Sync,
W: Send,
impl<'a, NI, W> !Sync for NodeWidget<'a, NI, W>
impl<'a, NI, W> !Sync for NodeWidget<'a, NI, W>