Skip to main content

NodeEditor

Struct NodeEditor 

Source
pub struct NodeEditor(/* private fields */);

Implementations§

Source§

impl NodeEditor

Source

pub fn new() -> Result<Self, PlatformError>

Source

pub fn invoke_apply_zoom_with_adjustment( &self, arg_0: f32, arg_1: Coord, arg_2: Coord, arg_3: f32, arg_4: f32, )

Source

pub fn get_background_color(&self) -> Brush

Source

pub fn set_background_color(&self, value: Brush)

Source

pub fn get_bezier_min_offset(&self) -> f32

Source

pub fn set_bezier_min_offset(&self, value: f32)

Source

pub fn invoke_box_selection_committed( &self, arg_0: Coord, arg_1: Coord, arg_2: Coord, arg_3: Coord, arg_4: bool, )

Source

pub fn on_box_selection_committed( &self, f: impl FnMut(Coord, Coord, Coord, Coord, bool) + 'static, )

Source

pub fn get_box_selection_modifier(&self) -> BoxSelectionModifier

Source

pub fn set_box_selection_modifier(&self, value: BoxSelectionModifier)

Source

pub fn get_box_selection_on_empty(&self) -> bool

Source

pub fn set_box_selection_on_empty(&self, value: bool)

Source

pub fn invoke_cancel_interactions(&self)

Source

pub fn invoke_clear_selection(&self)

Source

pub fn invoke_compute_minimap_nodes_path( &self, arg_0: i32, arg_1: f32, arg_2: f32, arg_3: f32, ) -> SharedString

Source

pub fn on_compute_minimap_nodes_path( &self, f: impl FnMut(i32, f32, f32, f32) -> SharedString + 'static, )

Source

pub fn invoke_context_menu_dragged(&self, arg_0: Coord, arg_1: Coord)

Source

pub fn on_context_menu_dragged(&self, f: impl FnMut(Coord, Coord) + 'static)

Source

pub fn invoke_context_menu_released(&self, arg_0: Coord, arg_1: Coord)

Source

pub fn on_context_menu_released(&self, f: impl FnMut(Coord, Coord) + 'static)

Source

pub fn invoke_context_menu_requested(&self)

Source

pub fn on_context_menu_requested(&self, f: impl FnMut() + 'static)

Source

pub fn get_context_menu_x(&self) -> Coord

Source

pub fn get_context_menu_y(&self) -> Coord

Source

pub fn get_edge_fade_left(&self) -> Brush

Source

pub fn set_edge_fade_left(&self, value: Brush)

Source

pub fn get_edge_fade_left_width(&self) -> Coord

Source

pub fn set_edge_fade_left_width(&self, value: Coord)

Source

pub fn get_edge_fade_right(&self) -> Brush

Source

pub fn set_edge_fade_right(&self, value: Brush)

Source

pub fn get_edge_fade_right_width(&self) -> Coord

Source

pub fn set_edge_fade_right_width(&self, value: Coord)

Source

pub fn get_geometry_version(&self) -> i32

Source

pub fn set_geometry_version(&self, value: i32)

Source

pub fn get_graph_max_x(&self) -> Coord

Source

pub fn set_graph_max_x(&self, value: Coord)

Source

pub fn get_graph_max_y(&self) -> Coord

Source

pub fn set_graph_max_y(&self, value: Coord)

Source

pub fn get_graph_min_x(&self) -> Coord

Source

pub fn set_graph_min_x(&self, value: Coord)

Source

pub fn get_graph_min_y(&self) -> Coord

Source

pub fn set_graph_min_y(&self, value: Coord)

Source

pub fn get_grid_color(&self) -> Color

Source

pub fn set_grid_color(&self, value: Color)

Source

pub fn get_grid_commands(&self) -> SharedString

Source

pub fn set_grid_commands(&self, value: SharedString)

Source

pub fn get_grid_spacing(&self) -> Coord

Source

pub fn set_grid_spacing(&self, value: Coord)

Source

pub fn invoke_group_selected(&self, arg_0: i32, arg_1: bool)

Source

pub fn on_group_selected(&self, f: impl FnMut(i32, bool) + 'static)

Source

pub fn get_groups(&self) -> ModelRc<GroupData>

Source

pub fn set_groups(&self, value: ModelRc<GroupData>)

Source

pub fn get_hovered_node_id(&self) -> i32

Source

pub fn get_is_selecting(&self) -> bool

Source

pub fn get_lod_full_threshold(&self) -> f32

Source

pub fn set_lod_full_threshold(&self, value: f32)

Source

pub fn get_lod_simplified_threshold(&self) -> f32

Source

pub fn set_lod_simplified_threshold(&self, value: f32)

Source

pub fn get_max_zoom(&self) -> f32

Source

pub fn set_max_zoom(&self, value: f32)

Source

pub fn get_min_node_height(&self) -> Coord

Source

pub fn set_min_node_height(&self, value: Coord)

Source

pub fn get_min_node_width(&self) -> Coord

Source

pub fn set_min_node_width(&self, value: Coord)

Source

pub fn get_min_zoom(&self) -> f32

Source

pub fn set_min_zoom(&self, value: f32)

Source

pub fn get_minimap_enabled(&self) -> bool

Source

pub fn set_minimap_enabled(&self, value: bool)

Source

pub fn get_minimap_margin(&self) -> Coord

Source

pub fn set_minimap_margin(&self, value: Coord)

Source

pub fn get_minimap_nodes(&self) -> ModelRc<MinimapNode>

Source

pub fn set_minimap_nodes(&self, value: ModelRc<MinimapNode>)

Source

pub fn get_minimap_nodes_path(&self) -> SharedString

Source

pub fn set_minimap_nodes_path(&self, value: SharedString)

Source

pub fn get_minimap_path_version(&self) -> i32

Source

pub fn set_minimap_path_version(&self, value: i32)

Source

pub fn get_minimap_position(&self) -> MinimapPosition

Source

pub fn set_minimap_position(&self, value: MinimapPosition)

Source

pub fn get_minimap_size_height(&self) -> Coord

Source

pub fn set_minimap_size_height(&self, value: Coord)

Source

pub fn get_minimap_size_width(&self) -> Coord

Source

pub fn set_minimap_size_width(&self, value: Coord)

Source

pub fn invoke_node_hovered(&self)

Source

pub fn on_node_hovered(&self, f: impl FnMut() + 'static)

Source

pub fn invoke_node_selected(&self, arg_0: i32, arg_1: bool)

Source

pub fn on_node_selected(&self, f: impl FnMut(i32, bool) + 'static)

Source

pub fn get_pan_x(&self) -> Coord

Source

pub fn set_pan_x(&self, value: Coord)

Source

pub fn get_pan_y(&self) -> Coord

Source

pub fn set_pan_y(&self, value: Coord)

Source

pub fn get_pin_hit_radius(&self) -> Coord

Source

pub fn set_pin_hit_radius(&self, value: Coord)

Source

pub fn get_pinch_zoom_enabled(&self) -> bool

Source

pub fn set_pinch_zoom_enabled(&self, value: bool)

Source

pub fn invoke_report_node_rect( &self, arg_0: i32, arg_1: Coord, arg_2: Coord, arg_3: Coord, arg_4: Coord, )

Source

pub fn invoke_report_pin_position( &self, arg_0: i32, arg_1: i32, arg_2: i32, arg_3: Coord, arg_4: Coord, )

Source

pub fn get_scroll_zoom_sensitivity(&self) -> f32

Source

pub fn set_scroll_zoom_sensitivity(&self, value: f32)

Source

pub fn invoke_select_group(&self, arg_0: i32, arg_1: bool)

Source

pub fn invoke_select_node(&self, arg_0: i32, arg_1: bool)

Source

pub fn invoke_selection_cleared(&self)

Source

pub fn on_selection_cleared(&self, f: impl FnMut() + 'static)

Source

pub fn get_selection_height(&self) -> Coord

Source

pub fn get_selection_width(&self) -> Coord

Source

pub fn get_selection_x(&self) -> Coord

Source

pub fn get_selection_y(&self) -> Coord

Source

pub fn get_world_content_size(&self) -> Coord

Source

pub fn set_world_content_size(&self, value: Coord)

Source

pub fn get_zoom(&self) -> f32

Source

pub fn set_zoom(&self, value: f32)

Trait Implementations§

Source§

impl ComponentHandle for NodeEditor

Source§

fn as_weak(&self) -> Weak<Self>

Returns a new weak pointer.
Source§

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

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>

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>

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>

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§

fn window(&self) -> &Window

Returns the Window associated with this component. The window API can be used to control different aspects of the integration into the windowing system, such as the position on the screen.
Source§

impl From<NodeEditor> for VRc<ItemTreeVTable, InnerNodeEditor>

Source§

fn from(value: NodeEditor) -> Self

Converts to this type from the input type.
Source§

impl<'a> Global<'a, NodeEditor> for BoxSelectionGesture<'a>

Source§

type StaticSelf = BoxSelectionGesture<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for DragState<'a>

Source§

type StaticSelf = DragState<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for GeometryVersion<'a>

Source§

type StaticSelf = GeometryVersion<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for GroupSelectionRequest<'a>

Source§

type StaticSelf = GroupSelectionRequest<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for GroupStyleDefaults<'a>

Source§

type StaticSelf = GroupStyleDefaults<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for GroupVisibility<'a>

Source§

type StaticSelf = GroupVisibility<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for HoverState<'a>

Source§

type StaticSelf = HoverState<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for InteractionCancellation<'a>

Source§

type StaticSelf = InteractionCancellation<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for LinkStatus<'a>

Source§

type StaticSelf = LinkStatus<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for LinkStatusColors<'a>

Source§

type StaticSelf = LinkStatusColors<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for LinkColor<'a>

Source§

type StaticSelf = LinkColor<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for LinkCreation<'a>

Source§

type StaticSelf = LinkCreation<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for NodeEditorComputations<'a>

Source§

type StaticSelf = NodeEditorComputations<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for NodeEditorEvents<'a>

Source§

type StaticSelf = NodeEditorEvents<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for NodeEditorGestureConfig<'a>

Source§

type StaticSelf = NodeEditorGestureConfig<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for NodeEditorInternalCallbacks<'a>

Source§

type StaticSelf = NodeEditorInternalCallbacks<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for NodeStyleDefaults<'a>

Source§

type StaticSelf = NodeStyleDefaults<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for PinTypes<'a>

Source§

type StaticSelf = PinTypes<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for SelectionRequest<'a>

Source§

type StaticSelf = SelectionRequest<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl<'a> Global<'a, NodeEditor> for ViewportState<'a>

Source§

type StaticSelf = ViewportState<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a NodeEditor) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl StrongHandle for NodeEditor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.