pub struct EdgeCreator { /* private fields */ }Expand description
Interactive edge creator for handling edge creation workflow
Implementations§
Source§impl EdgeCreator
impl EdgeCreator
Sourcepub fn is_creating_edge(&self) -> bool
pub fn is_creating_edge(&self) -> bool
Check if currently creating an edge
Sourcepub fn get_preview_edge(&self) -> Option<&PreviewEdge>
pub fn get_preview_edge(&self) -> Option<&PreviewEdge>
Get the current preview edge
Sourcepub fn start_edge_creation<N, E>(
&mut self,
graph: &Graph<N, E>,
source_node: &str,
source_handle: &str,
start_position: Position,
) -> Result<()>
pub fn start_edge_creation<N, E>( &mut self, graph: &Graph<N, E>, source_node: &str, source_handle: &str, start_position: Position, ) -> Result<()>
Start edge creation from a source handle
Sourcepub fn update_edge_preview(&mut self, end_position: Position)
pub fn update_edge_preview(&mut self, end_position: Position)
Update the preview edge end position
Sourcepub fn complete_edge_creation<N, E>(
&mut self,
graph: &mut Graph<N, E>,
target_node: &str,
target_handle: Option<&str>,
_end_position: Position,
) -> Result<()>
pub fn complete_edge_creation<N, E>( &mut self, graph: &mut Graph<N, E>, target_node: &str, target_handle: Option<&str>, _end_position: Position, ) -> Result<()>
Complete edge creation to a target node/handle
Sourcepub fn cancel_edge_creation(&mut self)
pub fn cancel_edge_creation(&mut self)
Cancel edge creation
Sourcepub fn get_drop_target<N, E>(
&self,
graph: &Graph<N, E>,
position: Position,
tolerance: f64,
) -> Option<(NodeId, Option<String>)>
pub fn get_drop_target<N, E>( &self, graph: &Graph<N, E>, position: Position, tolerance: f64, ) -> Option<(NodeId, Option<String>)>
Get potential drop target at given position
Sourcepub fn get_connection_feedback<N, E>(
&self,
_graph: &Graph<N, E>,
target_node: &str,
_target_handle: Option<&str>,
) -> ConnectionFeedback
pub fn get_connection_feedback<N, E>( &self, _graph: &Graph<N, E>, target_node: &str, _target_handle: Option<&str>, ) -> ConnectionFeedback
Get connection feedback for validation
Trait Implementations§
Source§impl Debug for EdgeCreator
impl Debug for EdgeCreator
Auto Trait Implementations§
impl Freeze for EdgeCreator
impl RefUnwindSafe for EdgeCreator
impl Send for EdgeCreator
impl Sync for EdgeCreator
impl Unpin for EdgeCreator
impl UnwindSafe for EdgeCreator
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