Skip to main content

NodeEditorFrame

Struct NodeEditorFrame 

Source
pub struct NodeEditorFrame<'ui> { /* private fields */ }
Expand description

RAII token for an active node-editor frame.

Implementations§

Source§

impl<'ui> NodeEditorFrame<'ui>

Source

pub fn end(self)

Source§

impl<'ui> NodeEditorFrame<'ui>

Source

pub fn set_node_position(&self, node: NodeId, position: [f32; 2])

Source

pub fn node_position(&self, node: NodeId) -> [f32; 2]

Source

pub fn node_size(&self, node: NodeId) -> [f32; 2]

Source

pub fn set_node_z_position(&self, node: NodeId, z: f32)

Source

pub fn node_z_position(&self, node: NodeId) -> f32

Source

pub fn restore_node_state(&self, node: NodeId)

Source

pub fn center_node_on_screen(&self, node: NodeId)

Source

pub fn navigate_to_content(&self, duration: f32)

Source

pub fn navigate_to_selection(&self, zoom_in: bool, duration: f32)

Source

pub fn is_active(&self) -> bool

Source

pub fn has_selection_changed(&self) -> bool

Source

pub fn selected_object_count(&self) -> usize

Source

pub fn selected_nodes(&self) -> Vec<NodeId>

Source

pub fn is_node_selected(&self, node: NodeId) -> bool

Source

pub fn clear_selection(&self)

Source

pub fn select_node(&self, node: NodeId)

Source

pub fn add_node_to_selection(&self, node: NodeId)

Source

pub fn deselect_node(&self, node: NodeId)

Source

pub fn delete_node(&self, node: NodeId) -> bool

Source

pub fn hovered_node(&self) -> Option<NodeId>

Source

pub fn hovered_pin(&self) -> Option<PinId>

Source

pub fn double_clicked_node(&self) -> Option<NodeId>

Source

pub fn double_clicked_pin(&self) -> Option<PinId>

Source

pub fn show_node_context_menu(&self) -> Option<NodeId>

Source

pub fn show_pin_context_menu(&self) -> Option<PinId>

Source

pub fn show_background_context_menu(&self) -> bool

Source

pub fn set_shortcuts_enabled(&self, enabled: bool)

Source

pub fn shortcuts_enabled(&self) -> bool

Source

pub fn current_zoom(&self) -> f32

Source

pub fn is_background_clicked(&self) -> bool

Source

pub fn is_background_double_clicked(&self) -> bool

Source

pub fn background_click_button(&self) -> Option<MouseButton>

Source

pub fn background_double_click_button(&self) -> Option<MouseButton>

Source

pub fn screen_size(&self) -> [f32; 2]

Source

pub fn screen_to_canvas(&self, pos: [f32; 2]) -> [f32; 2]

Source

pub fn canvas_to_screen(&self, pos: [f32; 2]) -> [f32; 2]

Source

pub fn node_count(&self) -> usize

Source

pub fn ordered_node_ids(&self) -> Vec<NodeId>

Source§

impl<'ui> NodeEditorFrame<'ui>

Source

pub fn begin_create<'a>( &'a self, color: [f32; 4], thickness: f32, ) -> Option<CreateSession<'a>>

Source

pub fn begin_delete<'a>(&'a self) -> Option<DeleteSession<'a>>

Source

pub fn begin_shortcut<'a>(&'a self) -> Option<ShortcutSession<'a>>

Source§

impl<'ui> NodeEditorFrame<'ui>

Source

pub fn begin_node<'a>(&'a self, node: NodeId) -> NodeToken<'a>

Source

pub fn node<R>(&self, node: NodeId, f: impl FnOnce(&NodeToken<'_>) -> R) -> R

Source

pub fn begin_group_hint<'a>( &'a self, node: NodeId, ) -> Option<GroupHintToken<'a>>

Source

pub fn node_background_draw_list(&self, node: NodeId) -> DrawListMut<'_>

Source

pub fn style(&self) -> NodeEditorStyle

Source

pub fn group(&self, size: [f32; 2])

Source

pub fn set_group_size(&self, node: NodeId, size: [f32; 2])

Source

pub fn flow(&self, link: LinkId, direction: FlowDirection)

Source

pub fn push_style_color<'a>( &'a self, color: StyleColor, value: [f32; 4], ) -> StyleColorToken<'a>

Source

pub fn push_style_var_float<'a>( &'a self, var: StyleVar, value: f32, ) -> StyleVarToken<'a>

Source

pub fn push_style_var_vec2<'a>( &'a self, var: StyleVar, value: [f32; 2], ) -> StyleVarToken<'a>

Source

pub fn push_style_var_vec4<'a>( &'a self, var: StyleVar, value: [f32; 4], ) -> StyleVarToken<'a>

Source

pub fn suspend<'a>(&'a self) -> SuspensionToken<'a>

Source

pub fn is_suspended(&self) -> bool

Trait Implementations§

Source§

impl Drop for NodeEditorFrame<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more