pub struct NodeEditorFrame<'ui> { /* private fields */ }Expand description
RAII token for an active node-editor frame.
Implementations§
Source§impl<'ui> NodeEditorFrame<'ui>
impl<'ui> NodeEditorFrame<'ui>
Source§impl<'ui> NodeEditorFrame<'ui>
impl<'ui> NodeEditorFrame<'ui>
pub fn set_node_position(&self, node: NodeId, position: [f32; 2])
pub fn node_position(&self, node: NodeId) -> [f32; 2]
pub fn node_size(&self, node: NodeId) -> [f32; 2]
pub fn set_node_z_position(&self, node: NodeId, z: f32)
pub fn node_z_position(&self, node: NodeId) -> f32
pub fn restore_node_state(&self, node: NodeId)
pub fn center_node_on_screen(&self, node: NodeId)
pub fn is_active(&self) -> bool
pub fn has_selection_changed(&self) -> bool
pub fn selected_object_count(&self) -> usize
pub fn selected_nodes(&self) -> Vec<NodeId>
pub fn selected_links(&self) -> Vec<LinkId>
pub fn is_node_selected(&self, node: NodeId) -> bool
pub fn is_link_selected(&self, link: LinkId) -> bool
pub fn clear_selection(&self)
pub fn select_node(&self, node: NodeId)
pub fn add_node_to_selection(&self, node: NodeId)
pub fn select_link(&self, link: LinkId)
pub fn add_link_to_selection(&self, link: LinkId)
pub fn deselect_node(&self, node: NodeId)
pub fn deselect_link(&self, link: LinkId)
pub fn delete_node(&self, node: NodeId) -> bool
pub fn delete_link(&self, link: LinkId) -> bool
pub fn node_has_any_links(&self, node: NodeId) -> bool
pub fn pin_has_any_links(&self, pin: PinId) -> bool
pub fn break_node_links(&self, node: NodeId) -> usize
pub fn break_pin_links(&self, pin: PinId) -> usize
pub fn hovered_node(&self) -> Option<NodeId>
pub fn hovered_pin(&self) -> Option<PinId>
pub fn hovered_link(&self) -> Option<LinkId>
pub fn double_clicked_node(&self) -> Option<NodeId>
pub fn double_clicked_pin(&self) -> Option<PinId>
pub fn double_clicked_link(&self) -> Option<LinkId>
pub fn set_shortcuts_enabled(&self, enabled: bool)
pub fn shortcuts_enabled(&self) -> bool
pub fn current_zoom(&self) -> f32
pub fn is_background_clicked(&self) -> bool
pub fn is_background_double_clicked(&self) -> bool
pub fn link_pins(&self, link: LinkId) -> Option<(PinId, PinId)>
pub fn pin_had_any_links(&self, pin: PinId) -> bool
pub fn screen_size(&self) -> [f32; 2]
pub fn screen_to_canvas(&self, pos: [f32; 2]) -> [f32; 2]
pub fn canvas_to_screen(&self, pos: [f32; 2]) -> [f32; 2]
pub fn node_count(&self) -> usize
pub fn ordered_node_ids(&self) -> Vec<NodeId>
Source§impl<'ui> NodeEditorFrame<'ui>
impl<'ui> NodeEditorFrame<'ui>
pub fn begin_create<'a>( &'a self, color: [f32; 4], thickness: f32, ) -> Option<CreateSession<'a>>
pub fn begin_delete<'a>(&'a self) -> Option<DeleteSession<'a>>
pub fn begin_shortcut<'a>(&'a self) -> Option<ShortcutSession<'a>>
Source§impl<'ui> NodeEditorFrame<'ui>
impl<'ui> NodeEditorFrame<'ui>
pub fn begin_node<'a>(&'a self, node: NodeId) -> NodeToken<'a>
pub fn node<R>(&self, node: NodeId, f: impl FnOnce(&NodeToken<'_>) -> R) -> R
pub fn begin_group_hint<'a>( &'a self, node: NodeId, ) -> Option<GroupHintToken<'a>>
pub fn node_background_draw_list(&self, node: NodeId) -> DrawListMut<'_>
pub fn style(&self) -> NodeEditorStyle
pub fn group(&self, size: [f32; 2])
pub fn set_group_size(&self, node: NodeId, size: [f32; 2])
pub fn link(&self, link: LinkId, start_pin: PinId, end_pin: PinId) -> bool
pub fn link_colored( &self, link: LinkId, start_pin: PinId, end_pin: PinId, color: [f32; 4], thickness: f32, ) -> bool
pub fn flow(&self, link: LinkId, direction: FlowDirection)
pub fn push_style_color<'a>( &'a self, color: StyleColor, value: [f32; 4], ) -> StyleColorToken<'a>
pub fn push_style_var_float<'a>( &'a self, var: StyleVar, value: f32, ) -> StyleVarToken<'a>
pub fn push_style_var_vec2<'a>( &'a self, var: StyleVar, value: [f32; 2], ) -> StyleVarToken<'a>
pub fn push_style_var_vec4<'a>( &'a self, var: StyleVar, value: [f32; 4], ) -> StyleVarToken<'a>
pub fn suspend<'a>(&'a self) -> SuspensionToken<'a>
pub fn is_suspended(&self) -> bool
Trait Implementations§
Source§impl Drop for NodeEditorFrame<'_>
impl Drop for NodeEditorFrame<'_>
Auto Trait Implementations§
impl<'ui> !Freeze for NodeEditorFrame<'ui>
impl<'ui> !RefUnwindSafe for NodeEditorFrame<'ui>
impl<'ui> !Send for NodeEditorFrame<'ui>
impl<'ui> !Sync for NodeEditorFrame<'ui>
impl<'ui> Unpin for NodeEditorFrame<'ui>
impl<'ui> UnsafeUnpin for NodeEditorFrame<'ui>
impl<'ui> !UnwindSafe for NodeEditorFrame<'ui>
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