pub struct EdgesCtx { /* private fields */ }Expand description
A context to assist with the instantiation of edge widgets.
Implementations§
Source§impl EdgesCtx
impl EdgesCtx
Sourcepub fn input(&self, ui: &Ui, node: NodeId, input: usize) -> Option<(Pos2, Vec2)>
pub fn input(&self, ui: &Ui, node: NodeId, input: usize) -> Option<(Pos2, Vec2)>
Retrieves the position and normal of the specified input for the given node.
Returns None if either the node or input do not exist.
Sourcepub fn output(
&self,
ui: &Ui,
node: NodeId,
output: usize,
) -> Option<(Pos2, Vec2)>
pub fn output( &self, ui: &Ui, node: NodeId, output: usize, ) -> Option<(Pos2, Vec2)>
Retrieves the position and normal of the specified output for the given node.
Returns None if either the node or output do not exist.
Sourcepub fn in_progress(&self, ui: &Ui) -> Option<EdgeInProgress>
pub fn in_progress(&self, ui: &Ui) -> Option<EdgeInProgress>
If the user is in the progress of creating an edge, this returns the relevant info.
Sourcepub fn graph_rect(&self) -> Rect
pub fn graph_rect(&self) -> Rect
The full rect occuppied by the graph widget.
Auto Trait Implementations§
impl Freeze for EdgesCtx
impl RefUnwindSafe for EdgesCtx
impl Send for EdgesCtx
impl Sync for EdgesCtx
impl Unpin for EdgesCtx
impl UnwindSafe for EdgesCtx
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more