pub struct NodeEditor(/* private fields */);Implementations§
Source§impl NodeEditor
impl NodeEditor
pub fn new() -> Result<Self, PlatformError>
pub fn invoke_apply_zoom_with_adjustment( &self, arg_0: f32, arg_1: Coord, arg_2: Coord, arg_3: f32, arg_4: f32, )
pub fn get_background_color(&self) -> Brush
pub fn set_background_color(&self, value: Brush)
pub fn get_bezier_min_offset(&self) -> f32
pub fn set_bezier_min_offset(&self, value: f32)
pub fn invoke_box_selection_committed( &self, arg_0: Coord, arg_1: Coord, arg_2: Coord, arg_3: Coord, arg_4: bool, )
pub fn on_box_selection_committed( &self, f: impl FnMut(Coord, Coord, Coord, Coord, bool) + 'static, )
pub fn get_box_selection_modifier(&self) -> BoxSelectionModifier
pub fn set_box_selection_modifier(&self, value: BoxSelectionModifier)
pub fn get_box_selection_on_empty(&self) -> bool
pub fn set_box_selection_on_empty(&self, value: bool)
pub fn invoke_cancel_interactions(&self)
pub fn invoke_cancel_link_creation(&self)
pub fn invoke_clear_selection(&self)
pub fn invoke_complete_link_creation(&self)
pub fn invoke_compute_link_at(&self, arg_0: Coord, arg_1: Coord) -> i32
pub fn on_compute_link_at(&self, f: impl FnMut(Coord, Coord) -> i32 + 'static)
pub fn invoke_compute_minimap_nodes_path( &self, arg_0: i32, arg_1: f32, arg_2: f32, arg_3: f32, ) -> SharedString
pub fn on_compute_minimap_nodes_path( &self, f: impl FnMut(i32, f32, f32, f32) -> SharedString + 'static, )
pub fn get_dimmed_link_alpha(&self) -> f32
pub fn set_dimmed_link_alpha(&self, value: f32)
pub fn get_edge_fade_left(&self) -> Brush
pub fn set_edge_fade_left(&self, value: Brush)
pub fn get_edge_fade_left_width(&self) -> Coord
pub fn set_edge_fade_left_width(&self, value: Coord)
pub fn get_edge_fade_right(&self) -> Brush
pub fn set_edge_fade_right(&self, value: Brush)
pub fn get_edge_fade_right_width(&self) -> Coord
pub fn set_edge_fade_right_width(&self, value: Coord)
pub fn get_geometry_version(&self) -> i32
pub fn set_geometry_version(&self, value: i32)
pub fn get_graph_max_x(&self) -> Coord
pub fn set_graph_max_x(&self, value: Coord)
pub fn get_graph_max_y(&self) -> Coord
pub fn set_graph_max_y(&self, value: Coord)
pub fn get_graph_min_x(&self) -> Coord
pub fn set_graph_min_x(&self, value: Coord)
pub fn get_graph_min_y(&self) -> Coord
pub fn set_graph_min_y(&self, value: Coord)
pub fn get_grid_color(&self) -> Color
pub fn set_grid_color(&self, value: Color)
pub fn get_grid_commands(&self) -> SharedString
pub fn set_grid_commands(&self, value: SharedString)
pub fn get_grid_spacing(&self) -> Coord
pub fn set_grid_spacing(&self, value: Coord)
pub fn invoke_group_selected(&self, arg_0: i32, arg_1: bool)
pub fn on_group_selected(&self, f: impl FnMut(i32, bool) + 'static)
pub fn get_groups(&self) -> ModelRc<GroupData>
pub fn set_groups(&self, value: ModelRc<GroupData>)
pub fn get_has_link_selection(&self) -> bool
pub fn set_has_link_selection(&self, value: bool)
pub fn get_hovered_link_id(&self) -> i32
pub fn get_hovered_node_id(&self) -> i32
pub fn get_is_creating_link(&self) -> bool
pub fn get_is_selecting(&self) -> bool
pub fn get_link_accent_colors(&self) -> ModelRc<Color>
pub fn set_link_accent_colors(&self, value: ModelRc<Color>)
pub fn invoke_link_cancelled(&self)
pub fn on_link_cancelled(&self, f: impl FnMut() + 'static)
pub fn invoke_link_dropped(&self, arg_0: i32, arg_1: f32, arg_2: f32)
pub fn on_link_dropped(&self, f: impl FnMut(i32, f32, f32) + 'static)
pub fn get_link_end_x(&self) -> Coord
pub fn set_link_end_x(&self, value: Coord)
pub fn get_link_end_y(&self) -> Coord
pub fn set_link_end_y(&self, value: Coord)
pub fn get_link_hit_samples(&self) -> i32
pub fn set_link_hit_samples(&self, value: i32)
pub fn get_link_hover_distance(&self) -> Coord
pub fn set_link_hover_distance(&self, value: Coord)
pub fn invoke_link_hovered(&self)
pub fn on_link_hovered(&self, f: impl FnMut() + 'static)
pub fn get_link_preview_path_commands(&self) -> SharedString
pub fn set_link_preview_path_commands(&self, value: SharedString)
pub fn invoke_link_requested(&self, arg_0: i32, arg_1: i32)
pub fn on_link_requested(&self, f: impl FnMut(i32, i32) + 'static)
pub fn get_link_start_pin_id(&self) -> i32
pub fn get_link_start_x(&self) -> Coord
pub fn get_link_start_y(&self) -> Coord
pub fn get_links(&self) -> ModelRc<LinkData>
pub fn set_links(&self, value: ModelRc<LinkData>)
pub fn get_lod_full_threshold(&self) -> f32
pub fn set_lod_full_threshold(&self, value: f32)
pub fn get_lod_simplified_threshold(&self) -> f32
pub fn set_lod_simplified_threshold(&self, value: f32)
pub fn get_max_zoom(&self) -> f32
pub fn set_max_zoom(&self, value: f32)
pub fn get_min_node_height(&self) -> Coord
pub fn set_min_node_height(&self, value: Coord)
pub fn get_min_node_width(&self) -> Coord
pub fn set_min_node_width(&self, value: Coord)
pub fn get_min_zoom(&self) -> f32
pub fn set_min_zoom(&self, value: f32)
pub fn get_minimap_enabled(&self) -> bool
pub fn set_minimap_enabled(&self, value: bool)
pub fn get_minimap_margin(&self) -> Coord
pub fn set_minimap_margin(&self, value: Coord)
pub fn get_minimap_nodes(&self) -> ModelRc<MinimapNode>
pub fn set_minimap_nodes(&self, value: ModelRc<MinimapNode>)
pub fn get_minimap_nodes_path(&self) -> SharedString
pub fn set_minimap_nodes_path(&self, value: SharedString)
pub fn get_minimap_path_version(&self) -> i32
pub fn set_minimap_path_version(&self, value: i32)
pub fn get_minimap_position(&self) -> MinimapPosition
pub fn set_minimap_position(&self, value: MinimapPosition)
pub fn get_minimap_size_height(&self) -> Coord
pub fn set_minimap_size_height(&self, value: Coord)
pub fn get_minimap_size_width(&self) -> Coord
pub fn set_minimap_size_width(&self, value: Coord)
pub fn invoke_node_hovered(&self)
pub fn on_node_hovered(&self, f: impl FnMut() + 'static)
pub fn invoke_node_selected(&self, arg_0: i32, arg_1: bool)
pub fn on_node_selected(&self, f: impl FnMut(i32, bool) + 'static)
pub fn get_pan_x(&self) -> Coord
pub fn set_pan_x(&self, value: Coord)
pub fn get_pan_y(&self) -> Coord
pub fn set_pan_y(&self, value: Coord)
pub fn get_pin_hit_radius(&self) -> Coord
pub fn set_pin_hit_radius(&self, value: Coord)
pub fn get_pinch_zoom_enabled(&self) -> bool
pub fn set_pinch_zoom_enabled(&self, value: bool)
pub fn invoke_refresh_links(&self)
pub fn invoke_report_node_rect( &self, arg_0: i32, arg_1: Coord, arg_2: Coord, arg_3: Coord, arg_4: Coord, )
pub fn invoke_report_pin_position( &self, arg_0: i32, arg_1: i32, arg_2: i32, arg_3: Coord, arg_4: Coord, )
pub fn get_scroll_zoom_sensitivity(&self) -> f32
pub fn set_scroll_zoom_sensitivity(&self, value: f32)
pub fn invoke_select_group(&self, arg_0: i32, arg_1: bool)
pub fn invoke_select_link(&self, arg_0: i32, arg_1: bool)
pub fn on_select_link(&self, f: impl FnMut(i32, bool) + 'static)
pub fn invoke_select_node(&self, arg_0: i32, arg_1: bool)
pub fn invoke_selection_cleared(&self)
pub fn on_selection_cleared(&self, f: impl FnMut() + 'static)
pub fn get_selection_height(&self) -> Coord
pub fn get_selection_width(&self) -> Coord
pub fn get_selection_x(&self) -> Coord
pub fn get_selection_y(&self) -> Coord
pub fn invoke_start_link_from_pin(&self, arg_0: i32, arg_1: Coord, arg_2: Coord)
pub fn invoke_update_link_end(&self, arg_0: Coord, arg_1: Coord)
pub fn invoke_update_link_hover(&self, arg_0: i32)
pub fn get_world_content_size(&self) -> Coord
pub fn set_world_content_size(&self, value: Coord)
pub fn get_zoom(&self) -> f32
pub fn set_zoom(&self, value: f32)
Trait Implementations§
Source§impl ComponentHandle for NodeEditor
impl ComponentHandle for NodeEditor
Source§fn clone_strong(&self) -> Self
fn clone_strong(&self) -> Self
Returns a clone of this handle that’s a strong reference.
Source§fn global<'a, T: Global<'a, Self>>(&'a self) -> T
fn global<'a, T: Global<'a, Self>>(&'a self) -> T
This function provides access to instances of global singletons exported in
.slint.
See Global for an example how to export and access globals from .slint markup.Source§fn run(&self) -> Result<(), PlatformError>
fn run(&self) -> Result<(), PlatformError>
This is a convenience function that first calls
Self::show, followed by crate::run_event_loop()
and Self::hide.Source§fn show(&self) -> Result<(), PlatformError>
fn show(&self) -> Result<(), PlatformError>
Convenience function for
crate::Window::show().
This shows the window on the screen and maintains an extra strong reference while
the window is visible. To react to events from the windowing system, such as draw
requests or mouse/touch input, it is still necessary to spin the event loop,
using crate::run_event_loop.Source§fn hide(&self) -> Result<(), PlatformError>
fn hide(&self) -> Result<(), PlatformError>
Convenience function for
crate::Window::hide().
Hides the window, so that it is not visible anymore. The additional strong reference
on the associated component, that was created when show() was called, is dropped.Source§impl From<NodeEditor> for VRc<ItemTreeVTable, InnerNodeEditor>
impl From<NodeEditor> for VRc<ItemTreeVTable, InnerNodeEditor>
Source§fn from(value: NodeEditor) -> Self
fn from(value: NodeEditor) -> Self
Converts to this type from the input type.
Source§impl<'a> Global<'a, NodeEditor> for BoxSelectionGesture<'a>
impl<'a> Global<'a, NodeEditor> for BoxSelectionGesture<'a>
Source§type StaticSelf = BoxSelectionGesture<'static>
type StaticSelf = BoxSelectionGesture<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for DragState<'a>
impl<'a> Global<'a, NodeEditor> for DragState<'a>
Source§type StaticSelf = DragState<'static>
type StaticSelf = DragState<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for GeometryVersion<'a>
impl<'a> Global<'a, NodeEditor> for GeometryVersion<'a>
Source§type StaticSelf = GeometryVersion<'static>
type StaticSelf = GeometryVersion<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for GroupSelectionRequest<'a>
impl<'a> Global<'a, NodeEditor> for GroupSelectionRequest<'a>
Source§type StaticSelf = GroupSelectionRequest<'static>
type StaticSelf = GroupSelectionRequest<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for GroupStyleDefaults<'a>
impl<'a> Global<'a, NodeEditor> for GroupStyleDefaults<'a>
Source§type StaticSelf = GroupStyleDefaults<'static>
type StaticSelf = GroupStyleDefaults<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for GroupVisibility<'a>
impl<'a> Global<'a, NodeEditor> for GroupVisibility<'a>
Source§type StaticSelf = GroupVisibility<'static>
type StaticSelf = GroupVisibility<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for HoverState<'a>
impl<'a> Global<'a, NodeEditor> for HoverState<'a>
Source§type StaticSelf = HoverState<'static>
type StaticSelf = HoverState<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for InteractionCancellation<'a>
impl<'a> Global<'a, NodeEditor> for InteractionCancellation<'a>
Source§type StaticSelf = InteractionCancellation<'static>
type StaticSelf = InteractionCancellation<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for LinkStatus<'a>
impl<'a> Global<'a, NodeEditor> for LinkStatus<'a>
Source§type StaticSelf = LinkStatus<'static>
type StaticSelf = LinkStatus<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for LinkStatusColors<'a>
impl<'a> Global<'a, NodeEditor> for LinkStatusColors<'a>
Source§type StaticSelf = LinkStatusColors<'static>
type StaticSelf = LinkStatusColors<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for LinkColor<'a>
impl<'a> Global<'a, NodeEditor> for LinkColor<'a>
Source§type StaticSelf = LinkColor<'static>
type StaticSelf = LinkColor<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for LinkCreation<'a>
impl<'a> Global<'a, NodeEditor> for LinkCreation<'a>
Source§type StaticSelf = LinkCreation<'static>
type StaticSelf = LinkCreation<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for NodeEditorComputations<'a>
impl<'a> Global<'a, NodeEditor> for NodeEditorComputations<'a>
Source§type StaticSelf = NodeEditorComputations<'static>
type StaticSelf = NodeEditorComputations<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for NodeEditorEvents<'a>
impl<'a> Global<'a, NodeEditor> for NodeEditorEvents<'a>
Source§type StaticSelf = NodeEditorEvents<'static>
type StaticSelf = NodeEditorEvents<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for NodeEditorGestureConfig<'a>
impl<'a> Global<'a, NodeEditor> for NodeEditorGestureConfig<'a>
Source§type StaticSelf = NodeEditorGestureConfig<'static>
type StaticSelf = NodeEditorGestureConfig<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for NodeEditorInternalCallbacks<'a>
impl<'a> Global<'a, NodeEditor> for NodeEditorInternalCallbacks<'a>
Source§type StaticSelf = NodeEditorInternalCallbacks<'static>
type StaticSelf = NodeEditorInternalCallbacks<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for NodeStyleDefaults<'a>
impl<'a> Global<'a, NodeEditor> for NodeStyleDefaults<'a>
Source§type StaticSelf = NodeStyleDefaults<'static>
type StaticSelf = NodeStyleDefaults<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for PinTypes<'a>
impl<'a> Global<'a, NodeEditor> for PinTypes<'a>
Source§type StaticSelf = PinTypes<'static>
type StaticSelf = PinTypes<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for SelectionRequest<'a>
impl<'a> Global<'a, NodeEditor> for SelectionRequest<'a>
Source§type StaticSelf = SelectionRequest<'static>
type StaticSelf = SelectionRequest<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
Source§impl<'a> Global<'a, NodeEditor> for ViewportState<'a>
impl<'a> Global<'a, NodeEditor> for ViewportState<'a>
Source§type StaticSelf = ViewportState<'static>
type StaticSelf = ViewportState<'static>
The
Self type, with a 'static lifetime.Source§fn get(component: &'a NodeEditor) -> Self
fn get(component: &'a NodeEditor) -> Self
Returns a reference to the global.
impl StrongHandle for NodeEditor
Auto Trait Implementations§
impl !RefUnwindSafe for NodeEditor
impl !Send for NodeEditor
impl !Sync for NodeEditor
impl !UnwindSafe for NodeEditor
impl Freeze for NodeEditor
impl Unpin for NodeEditor
impl UnsafeUnpin for NodeEditor
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