Struct node_engine::graph::NodeGraph
source · pub struct NodeGraph { /* private fields */ }Implementations§
source§impl NodeGraph
impl NodeGraph
pub fn new() -> Self
pub fn add_group(&mut self, group: NodeGroup) -> NodeGroupId
pub fn remove_group(&mut self, group_id: NodeGroupId, delete_nodes: bool)
pub fn resize_group(&mut self, group_id: NodeGroupId)
sourcepub fn changed_counter(&self) -> usize
pub fn changed_counter(&self) -> usize
Returns the changed counter to detect when the graph needs to be recompiled.
pub fn add(&mut self, node: Node) -> NodeId
pub fn remove(&mut self, id: NodeId) -> Option<Node>
pub fn contains(&self, id: NodeId) -> bool
pub fn get_input_id<I: Into<InputKey>>( &self, id: NodeId, idx: I ) -> Result<InputId>
pub fn get_node_input<I: Into<InputKey>>( &self, id: NodeId, idx: I ) -> Result<Input>
pub fn set_node_input<I: Into<InputKey>>( &mut self, id: NodeId, key: I, value: Input ) -> Result<Option<OutputId>>
pub fn set_input( &mut self, input_id: InputId, value: Input ) -> Result<Option<OutputId>>
pub fn disconnect(&mut self, input: InputId) -> Result<()>
pub fn connect( &mut self, input: InputId, output: OutputId, dt: DataType ) -> Result<()>
pub fn get(&self, id: NodeId) -> Result<&Node>
pub fn get_mut(&mut self, id: NodeId) -> Result<&mut Node>
pub fn set_output(&mut self, output: Option<NodeId>)
pub fn output(&self) -> Option<NodeId>
source§impl NodeGraph
impl NodeGraph
sourcepub fn has_selected(&self) -> bool
pub fn has_selected(&self) -> bool
Returns true if there are selected nodes.
sourcepub fn hover_connection(&self) -> Option<InputId>
pub fn hover_connection(&self) -> Option<InputId>
Is the pointer hover a connection.
pub fn open_node_finder(&mut self, ui: &Ui)
pub fn group_selected_nodes(&mut self) -> Option<NodeGroupId>
pub fn select_node(&mut self, id: NodeId, select: bool)
pub fn show(&mut self, ui: &mut Ui)
pub fn show_details(&mut self, ui: &mut Ui)
pub fn details_ui(&mut self, ui: &mut Ui)
pub fn show_graph(&mut self, ui: &mut Ui)
pub fn graph_ui(&mut self, ui: &mut Ui)
Trait Implementations§
source§impl<'de> Deserialize<'de> for NodeGraph
impl<'de> Deserialize<'de> for NodeGraph
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for NodeGraph
impl Send for NodeGraph
impl Sync for NodeGraph
impl Unpin for NodeGraph
impl !UnwindSafe for NodeGraph
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