pub struct NodeEditorProps<N, P, C, T>{
pub config: EditorConfig,
pub connections: Signal<HashMap<C, ConnectionEntry<P, C>>>,
pub on_event: Callback<GraphEvent<N, P, C>>,
pub _marker: PhantomData<T>,
pub menu_items: Option<Signal<Vec<NodeMenuItem>>>,
pub menu_search: Option<RwSignal<String>>,
pub groups: Option<Signal<Vec<GroupBox<N>>>>,
pub on_group_event: Option<Callback<GroupEvent<N>>>,
pub on_ungroup: Option<Callback<String>>,
pub on_select_all: Option<Callback<Vec<N>>>,
pub handle: Option<EditorHandle>,
pub children: Children,
}Expand description
Props for the NodeEditor component.
§Required Props
- config:
impl Into<EditorConfig> - connections: [
impl Into<Signal<HashMap<C, ConnectionEntry<P, C>>>>](Signal<HashMap<C, ConnectionEntry<P, C>>>) - on_event:
Callback<GraphEvent<N, P, C>> - children:
Children
§Optional Props
- _marker:
PhantomData<T> - menu_items:
impl Into<Signal<Vec<NodeMenuItem>>>- Optional node catalog for the creation menu.
If provided, Tab/double-click opens a searchable menu.
Consumer filters this list reactively based on
menu_search.
- Optional node catalog for the creation menu.
If provided, Tab/double-click opens a searchable menu.
Consumer filters this list reactively based on
- menu_search:
RwSignal<String>- Two-way search text for the menu. Consumer reads this to filter menu_items.
- groups:
impl Into<Signal<Vec<crate::group::GroupBox<N>>>>- Optional groups to render as visual overlays behind nodes.
- on_group_event:
impl Into<Callback<crate::group::GroupEvent<N>>>- Callback for group events (rename, add/remove node).
- on_ungroup:
impl Into<Callback<String>>- Optional callback for the group header’s ungroup action.
- on_select_all:
impl Into<Callback<Vec<N>>>- Optional callback for the group header’s select-all action.
- handle:
EditorHandle- Optional consumer-owned handle. Gives code OUTSIDE the editor — a wrapping
drop target, a toolbar, a minimap — access to the live viewport and to
client/canvas coordinate conversion. See
EditorHandle.
- Optional consumer-owned handle. Gives code OUTSIDE the editor — a wrapping
drop target, a toolbar, a minimap — access to the live viewport and to
client/canvas coordinate conversion. See
Fields§
§config: EditorConfig§connections: Signal<HashMap<C, ConnectionEntry<P, C>>>§on_event: Callback<GraphEvent<N, P, C>>§_marker: PhantomData<T>Optional node catalog for the creation menu.
If provided, Tab/double-click opens a searchable menu.
Consumer filters this list reactively based on menu_search.
Two-way search text for the menu. Consumer reads this to filter menu_items.
groups: Option<Signal<Vec<GroupBox<N>>>>Optional groups to render as visual overlays behind nodes.
on_group_event: Option<Callback<GroupEvent<N>>>Callback for group events (rename, add/remove node).
on_ungroup: Option<Callback<String>>Optional callback for the group header’s ungroup action.
on_select_all: Option<Callback<Vec<N>>>Optional callback for the group header’s select-all action.
handle: Option<EditorHandle>Optional consumer-owned handle. Gives code OUTSIDE the editor — a wrapping
drop target, a toolbar, a minimap — access to the live viewport and to
client/canvas coordinate conversion. See EditorHandle.
children: ChildrenImplementations§
Source§impl<N, P, C, T> NodeEditorProps<N, P, C, T>
impl<N, P, C, T> NodeEditorProps<N, P, C, T>
Sourcepub fn builder() -> NodeEditorPropsBuilder<N, P, C, T, ((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> NodeEditorPropsBuilder<N, P, C, T, ((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building NodeEditorProps.
On the builder, call .config(...), .connections(...), .on_event(...), ._marker(...)(optional), .menu_items(...)(optional), .menu_search(...)(optional), .groups(...)(optional), .on_group_event(...)(optional), .on_ungroup(...)(optional), .on_select_all(...)(optional), .handle(...)(optional), .children(...) to set the values of the fields.
Finally, call .build() to create the instance of NodeEditorProps.
Trait Implementations§
Auto Trait Implementations§
impl<N, P, C, T> !RefUnwindSafe for NodeEditorProps<N, P, C, T>
impl<N, P, C, T> !Sync for NodeEditorProps<N, P, C, T>
impl<N, P, C, T> !UnwindSafe for NodeEditorProps<N, P, C, T>
impl<N, P, C, T> Freeze for NodeEditorProps<N, P, C, T>
impl<N, P, C, T> Send for NodeEditorProps<N, P, C, T>
impl<N, P, C, T> Unpin for NodeEditorProps<N, P, C, T>
impl<N, P, C, T> UnsafeUnpin for NodeEditorProps<N, P, C, T>where
Signal<HashMap<C, ConnectionEntry<P, C>>>: UnsafeUnpin,
Callback<GraphEvent<N, P, C>>: UnsafeUnpin,
PhantomData<T>: UnsafeUnpin,
Option<Signal<Vec<GroupBox<N>>>>: UnsafeUnpin,
Option<Callback<GroupEvent<N>>>: UnsafeUnpin,
Option<Callback<Vec<N>>>: UnsafeUnpin,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more