pub struct NodeGraphStore { /* private fields */ }Expand description
Minimal B-layer store.
This is intentionally headless-safe and does not depend on fret-ui.
Implementations§
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn apply_auto_pan(
&mut self,
request: AutoPanRequest,
) -> Option<AutoPanOutcome>
pub fn apply_auto_pan( &mut self, request: AutoPanRequest, ) -> Option<AutoPanOutcome>
Applies one auto-pan frame through normal viewport view-state publication.
Sourcepub fn apply_selection_auto_pan(
&mut self,
request: SelectionAutoPanRequest,
) -> Option<AutoPanOutcome>
pub fn apply_selection_auto_pan( &mut self, request: SelectionAutoPanRequest, ) -> Option<AutoPanOutcome>
Applies one selection-drag auto-pan frame through normal viewport publication.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn binding_query(&self) -> BindingQueryResult
pub fn binding_query(&self) -> BindingQueryResult
Reads renderer-neutral binding facts for the current store state.
Sourcepub fn binding_query_with_options(
&self,
options: BindingQueryOptions,
) -> BindingQueryResult
pub fn binding_query_with_options( &self, options: BindingQueryOptions, ) -> BindingQueryResult
Reads renderer-neutral binding facts with explicit geometry options.
Sourcepub fn layout_context_with_binding_pins(&self) -> LayoutContext
pub fn layout_context_with_binding_pins(&self) -> LayoutContext
Builds layout context and pins nodes with resolvable binding geometry.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn plan_connect_edge(&self, request: ConnectEdgeRequest) -> ConnectPlan
pub fn plan_connect_edge(&self, request: ConnectEdgeRequest) -> ConnectPlan
Plans connecting two existing ports against the resolved interaction policy.
Sourcepub fn apply_connect_edge(
&mut self,
request: ConnectEdgeRequest,
) -> Result<Option<DispatchOutcome>, ConnectEdgeError>
pub fn apply_connect_edge( &mut self, request: ConnectEdgeRequest, ) -> Result<Option<DispatchOutcome>, ConnectEdgeError>
Commits a connect request through normal store dispatch.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn plan_reconnect_edge(&self, request: ReconnectEdgeRequest) -> ConnectPlan
pub fn plan_reconnect_edge(&self, request: ReconnectEdgeRequest) -> ConnectPlan
Plans reconnecting one endpoint of an existing edge against the resolved interaction policy.
Sourcepub fn apply_reconnect_edge(
&mut self,
request: ReconnectEdgeRequest,
) -> Result<Option<DispatchOutcome>, ReconnectEdgeError>
pub fn apply_reconnect_edge( &mut self, request: ReconnectEdgeRequest, ) -> Result<Option<DispatchOutcome>, ReconnectEdgeError>
Commits a reconnect request through normal store dispatch.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn plan_create_node_from_schema(
&self,
registry: &NodeRegistry,
request: CreateNodeRequest,
) -> Result<NodeInstantiation, NodeInstantiationError>
pub fn plan_create_node_from_schema( &self, registry: &NodeRegistry, request: CreateNodeRequest, ) -> Result<NodeInstantiation, NodeInstantiationError>
Instantiates a schema node without mutating the store.
Sourcepub fn apply_create_node_from_schema(
&mut self,
registry: &NodeRegistry,
request: CreateNodeRequest,
) -> Result<CreateNodeOutcome, CreateNodeError>
pub fn apply_create_node_from_schema( &mut self, registry: &NodeRegistry, request: CreateNodeRequest, ) -> Result<CreateNodeOutcome, CreateNodeError>
Instantiates and commits a schema node through the normal store dispatch path.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn plan_delete_selection(&self) -> DeletePlan
pub fn plan_delete_selection(&self) -> DeletePlan
Plans deletion for the store’s current node/edge selection.
Sourcepub fn plan_delete_selection_for_key(&self, key: KeyCode) -> Option<DeletePlan>
pub fn plan_delete_selection_for_key(&self, key: KeyCode) -> Option<DeletePlan>
Plans deletion for the current selection when the configured delete key matches.
Sourcepub fn plan_delete_elements(&self, elements: &DeleteElements) -> DeletePlan
pub fn plan_delete_elements(&self, elements: &DeleteElements) -> DeletePlan
Plans deletion for explicit node/edge ids through the store’s resolved interaction policy.
Sourcepub fn prepare_delete_selection(
&self,
) -> Result<Option<PreDeleteRequest>, DeleteSelectionError>
pub fn prepare_delete_selection( &self, ) -> Result<Option<PreDeleteRequest>, DeleteSelectionError>
Prepares the current selection for an adapter-owned async pre-delete hook.
Sourcepub fn prepare_delete_selection_for_key(
&self,
key: KeyCode,
) -> Result<Option<PreDeleteRequest>, DeleteSelectionError>
pub fn prepare_delete_selection_for_key( &self, key: KeyCode, ) -> Result<Option<PreDeleteRequest>, DeleteSelectionError>
Prepares a key-gated selection delete for an adapter-owned async pre-delete hook.
Sourcepub fn apply_delete_selection(
&mut self,
) -> Result<Option<DispatchOutcome>, DeleteSelectionError>
pub fn apply_delete_selection( &mut self, ) -> Result<Option<DispatchOutcome>, DeleteSelectionError>
Commits deletion for the current node/edge selection through normal store dispatch.
Sourcepub fn apply_delete_selection_for_key(
&mut self,
key: KeyCode,
) -> Result<Option<DispatchOutcome>, DeleteSelectionError>
pub fn apply_delete_selection_for_key( &mut self, key: KeyCode, ) -> Result<Option<DispatchOutcome>, DeleteSelectionError>
Commits deletion for the current selection when the configured delete key matches.
Sourcepub fn apply_pre_delete_resolution(
&mut self,
request: &PreDeleteRequest,
resolution: PreDeleteResolution,
) -> Result<Option<DispatchOutcome>, DeleteSelectionError>
pub fn apply_pre_delete_resolution( &mut self, request: &PreDeleteRequest, resolution: PreDeleteResolution, ) -> Result<Option<DispatchOutcome>, DeleteSelectionError>
Applies an adapter-owned pre-delete hook result through normal delete policy and dispatch.
Sourcepub fn apply_delete_elements(
&mut self,
elements: DeleteElements,
) -> Result<Option<DispatchOutcome>, DeleteSelectionError>
pub fn apply_delete_elements( &mut self, elements: DeleteElements, ) -> Result<Option<DispatchOutcome>, DeleteSelectionError>
Commits explicit node/edge ids through normal delete policy and store dispatch.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn plan_node_drag(&self, request: NodeDragRequest) -> Option<NodeDragPlan>
pub fn plan_node_drag(&self, request: NodeDragRequest) -> Option<NodeDragPlan>
Plans a node drag update against the store’s current selection and interaction state.
Sourcepub fn plan_node_nudge(
&self,
request: NodeNudgeRequest,
) -> Option<NodeNudgePlan>
pub fn plan_node_nudge( &self, request: NodeNudgeRequest, ) -> Option<NodeNudgePlan>
Plans a keyboard nudge update against the store’s current selection and interaction state.
Sourcepub fn apply_node_drag(
&mut self,
request: NodeDragRequest,
) -> Result<Option<DispatchOutcome>, DispatchError>
pub fn apply_node_drag( &mut self, request: NodeDragRequest, ) -> Result<Option<DispatchOutcome>, DispatchError>
Commits a node drag update through the normal store dispatch path.
This records normal graph history for the committed update. Higher-level drag sessions that need preview/final-commit semantics should build on top of the planning API.
Sourcepub fn apply_node_nudge(
&mut self,
request: NodeNudgeRequest,
) -> Result<Option<DispatchOutcome>, DispatchError>
pub fn apply_node_nudge( &mut self, request: NodeNudgeRequest, ) -> Result<Option<DispatchOutcome>, DispatchError>
Commits a keyboard nudge update through the normal store dispatch path.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn resolve_pointer_session_claim(
&self,
input: PointerSessionClaimInput,
) -> PointerSessionClaimOutcome
pub fn resolve_pointer_session_claim( &self, input: PointerSessionClaimInput, ) -> PointerSessionClaimOutcome
Resolves which high-level session should own a normalized pointer drag.
Sourcepub fn apply_node_drag_session(
&mut self,
session: NodeDragSession,
) -> Result<NodeDragSessionOutcome, DispatchError>
pub fn apply_node_drag_session( &mut self, session: NodeDragSession, ) -> Result<NodeDragSessionOutcome, DispatchError>
Applies a full node-drag gesture session through gesture events and normal store dispatch.
Sourcepub fn apply_connect_edge_session(
&mut self,
session: ConnectEdgeSession,
) -> Result<ConnectSessionOutcome, ConnectEdgeError>
pub fn apply_connect_edge_session( &mut self, session: ConnectEdgeSession, ) -> Result<ConnectSessionOutcome, ConnectEdgeError>
Applies a full connect gesture session through gesture events and normal store dispatch.
Sourcepub fn apply_viewport_drag_pan_session(
&mut self,
session: ViewportDragPanSession,
) -> Result<ViewportGestureSessionOutcome, ViewportGestureRejection>
pub fn apply_viewport_drag_pan_session( &mut self, session: ViewportDragPanSession, ) -> Result<ViewportGestureSessionOutcome, ViewportGestureRejection>
Applies a full viewport drag-pan gesture session through gesture events and view-state.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn apply_keyboard_intent(
&mut self,
intent: KeyboardIntent,
) -> Result<Option<KeyboardActionOutcome>, KeyboardActionError>
pub fn apply_keyboard_intent( &mut self, intent: KeyboardIntent, ) -> Result<Option<KeyboardActionOutcome>, KeyboardActionError>
Applies a normalized keyboard intent through the store’s headless runtime helpers.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn layout_context(&self) -> LayoutContext
pub fn layout_context(&self) -> LayoutContext
Builds a layout context from non-persisted runtime facts already known by this store.
Sourcepub fn plan_layout(
&self,
request: &LayoutEngineRequest,
registry: &LayoutEngineRegistry,
) -> Result<LayoutResult, LayoutError>
pub fn plan_layout( &self, request: &LayoutEngineRequest, registry: &LayoutEngineRegistry, ) -> Result<LayoutResult, LayoutError>
Runs a selected layout engine for the current graph without mutating the store.
Sourcepub fn layout_transaction(
&self,
request: &LayoutEngineRequest,
registry: &LayoutEngineRegistry,
) -> Result<GraphTransaction, LayoutError>
pub fn layout_transaction( &self, request: &LayoutEngineRequest, registry: &LayoutEngineRegistry, ) -> Result<GraphTransaction, LayoutError>
Runs a selected layout engine and returns the transaction that would move changed nodes.
Sourcepub fn apply_layout(
&mut self,
request: &LayoutEngineRequest,
registry: &LayoutEngineRegistry,
) -> Result<LayoutApplyOutcome, LayoutApplyError>
pub fn apply_layout( &mut self, request: &LayoutEngineRequest, registry: &LayoutEngineRegistry, ) -> Result<LayoutApplyOutcome, LayoutApplyError>
Runs a selected layout engine and commits the resulting transaction through normal dispatch.
Sourcepub fn plan_dugong_layout(
&self,
request: &LayoutRequest,
) -> Result<LayoutResult, LayoutError>
pub fn plan_dugong_layout( &self, request: &LayoutRequest, ) -> Result<LayoutResult, LayoutError>
Runs dugong layout for the current graph without mutating the store.
Sourcepub fn dugong_layout_transaction(
&self,
request: &LayoutRequest,
) -> Result<GraphTransaction, LayoutError>
pub fn dugong_layout_transaction( &self, request: &LayoutRequest, ) -> Result<GraphTransaction, LayoutError>
Runs dugong layout and returns the transaction that would move changed nodes.
Sourcepub fn apply_dugong_layout(
&mut self,
request: &LayoutRequest,
) -> Result<DugongLayoutApplyOutcome, DugongLayoutApplyError>
pub fn apply_dugong_layout( &mut self, request: &LayoutRequest, ) -> Result<DugongLayoutApplyOutcome, DugongLayoutApplyError>
Runs dugong layout and commits the resulting transaction through normal store dispatch.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn report_node_measurement(
&mut self,
measurement: NodeMeasurement,
) -> Result<NodeMeasurementOutcome, NodeMeasurementError>
pub fn report_node_measurement( &mut self, measurement: NodeMeasurement, ) -> Result<NodeMeasurementOutcome, NodeMeasurementError>
Applies non-persisted renderer measurements for one node.
Sourcepub fn clear_node_measurement(&mut self, node: NodeId) -> NodeMeasurementOutcome
pub fn clear_node_measurement(&mut self, node: NodeId) -> NodeMeasurementOutcome
Clears non-persisted measurements for one node.
Sourcepub fn node_measurement(&self, node: NodeId) -> Option<NodeMeasurement>
pub fn node_measurement(&self, node: NodeId) -> Option<NodeMeasurement>
Reads the current non-persisted measurement facts for one node.
Sourcepub fn layout_facts_query(
&self,
viewport_size: CanvasSize,
) -> LayoutFactsQueryResult
pub fn layout_facts_query( &self, viewport_size: CanvasSize, ) -> LayoutFactsQueryResult
Reads the adapter-facing layout facts for the current store state.
Sourcepub fn connection_target_candidates_from_layout_facts(
&self,
) -> Vec<ConnectionTargetCandidate>
pub fn connection_target_candidates_from_layout_facts( &self, ) -> Vec<ConnectionTargetCandidate>
Builds renderer-neutral connection target candidates from reported handle measurements.
Sourcepub fn resolve_connection_target_from_layout_facts(
&self,
pointer: CanvasPoint,
from: ConnectionHandleRef,
) -> ResolvedConnectionTarget
pub fn resolve_connection_target_from_layout_facts( &self, pointer: CanvasPoint, from: ConnectionHandleRef, ) -> ResolvedConnectionTarget
Resolves a connection target using the handle inventory previously reported by adapters.
Sourcepub fn edge_position_from_layout_facts(
&self,
edge: EdgeId,
) -> Option<EdgePosition>
pub fn edge_position_from_layout_facts( &self, edge: EdgeId, ) -> Option<EdgePosition>
Resolves edge endpoint geometry from graph endpoints plus reported measurement facts.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn group_render_order(&self) -> Vec<GroupId>
pub fn group_render_order(&self) -> Vec<GroupId>
Resolves the current group render order using the store’s view-state and editor config.
Sourcepub fn node_render_order(&self) -> Vec<NodeId>
pub fn node_render_order(&self) -> Vec<NodeId>
Resolves the current node render order using the store’s view-state and editor config.
Sourcepub fn edge_render_order(&self) -> Vec<EdgeId>
pub fn edge_render_order(&self) -> Vec<EdgeId>
Resolves the current edge render order using the store’s view-state and editor config.
Sourcepub fn rendering_query(&self, viewport_size: CanvasSize) -> RenderingQueryResult
pub fn rendering_query(&self, viewport_size: CanvasSize) -> RenderingQueryResult
Resolves all renderer-facing order and visibility lists for the current store state.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn plan_node_resize(
&self,
request: NodeResizeRequest,
) -> Option<NodeResizePlan>
pub fn plan_node_resize( &self, request: NodeResizeRequest, ) -> Option<NodeResizePlan>
Plans a node resize update against the store’s current graph.
Sourcepub fn apply_node_resize(
&mut self,
request: NodeResizeRequest,
) -> Result<Option<DispatchOutcome>, DispatchError>
pub fn apply_node_resize( &mut self, request: NodeResizeRequest, ) -> Result<Option<DispatchOutcome>, DispatchError>
Commits a node resize update through the normal store dispatch path.
Sourcepub fn plan_node_pointer_resize(
&self,
request: NodePointerResizeRequest,
) -> Option<NodeResizePlan>
pub fn plan_node_pointer_resize( &self, request: NodePointerResizeRequest, ) -> Option<NodeResizePlan>
Plans a pointer-driven node resize update against the store’s current graph.
Sourcepub fn apply_node_pointer_resize(
&mut self,
request: NodePointerResizeRequest,
) -> Result<Option<DispatchOutcome>, DispatchError>
pub fn apply_node_pointer_resize( &mut self, request: NodePointerResizeRequest, ) -> Result<Option<DispatchOutcome>, DispatchError>
Commits a pointer-driven node resize update through the normal store dispatch path.
Sourcepub fn start_node_resize_session(&mut self, session: NodeResizeSession)
pub fn start_node_resize_session(&mut self, session: NodeResizeSession)
Emits the start event for a headless pointer-driven node resize session.
Sourcepub fn apply_node_resize_session_update(
&mut self,
session: NodeResizeSession,
request: NodeResizeSessionUpdateRequest,
) -> Result<Option<NodeResizeSessionUpdateOutcome>, DispatchError>
pub fn apply_node_resize_session_update( &mut self, session: NodeResizeSession, request: NodeResizeSessionUpdateRequest, ) -> Result<Option<NodeResizeSessionUpdateOutcome>, DispatchError>
Commits one pointer-driven session update and emits the derived resize update event.
Sourcepub fn finish_node_resize_session(
&mut self,
session: NodeResizeSession,
pointer: CanvasPoint,
outcome: NodeResizeEndOutcome,
)
pub fn finish_node_resize_session( &mut self, session: NodeResizeSession, pointer: CanvasPoint, outcome: NodeResizeEndOutcome, )
Emits the end event for a headless pointer-driven node resize session.
Sourcepub fn apply_node_resize_session(
&mut self,
session: NodeResizeSession,
request: NodeResizeSessionUpdateRequest,
) -> Result<NodeResizeSessionOutcome, DispatchError>
pub fn apply_node_resize_session( &mut self, session: NodeResizeSession, request: NodeResizeSessionUpdateRequest, ) -> Result<NodeResizeSessionOutcome, DispatchError>
Runs a one-update pointer resize session through start, commit/update, and end events.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn apply_node_pointer_down(
&mut self,
input: NodePointerDownInput,
) -> NodePointerDownDecision
pub fn apply_node_pointer_down( &mut self, input: NodePointerDownInput, ) -> NodePointerDownDecision
Applies the selection portion of a node pointer-down decision.
Sourcepub fn apply_node_drag_start_selection(
&mut self,
input: NodeDragStartSelectionInput,
) -> NodeDragStartSelectionAction
pub fn apply_node_drag_start_selection( &mut self, input: NodeDragStartSelectionInput, ) -> NodeDragStartSelectionAction
Applies XyFlow-compatible selection behavior for a node-drag start.
Sourcepub fn resolve_node_pointer_down(
&self,
input: NodePointerDownInput,
) -> NodePointerDownDecision
pub fn resolve_node_pointer_down( &self, input: NodePointerDownInput, ) -> NodePointerDownDecision
Resolves the node pointer-down decision against current graph, selection, and interaction.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn apply_selection_box(
&mut self,
input: SelectionBoxInput,
) -> SelectionBoxResult
pub fn apply_selection_box( &mut self, input: SelectionBoxInput, ) -> SelectionBoxResult
Applies a canvas-space marquee selection box to the store view-state.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn dispatch_transaction(
&mut self,
tx: &GraphTransaction,
) -> Result<DispatchOutcome, DispatchError>
pub fn dispatch_transaction( &mut self, tx: &GraphTransaction, ) -> Result<DispatchOutcome, DispatchError>
Applies a transaction and records it in history.
This mirrors the UI loop contract: the store applies edits to a scratch graph first and only commits on success (so rejected profile validations do not partially mutate state).
Sourcepub fn dispatch_transaction_with_profile(
&mut self,
tx: &GraphTransaction,
profile: &mut dyn GraphProfile,
) -> Result<DispatchOutcome, ApplyPipelineError>
pub fn dispatch_transaction_with_profile( &mut self, tx: &GraphTransaction, profile: &mut dyn GraphProfile, ) -> Result<DispatchOutcome, ApplyPipelineError>
Dispatches a transaction using an externally-owned profile pipeline.
This is intended for UI integration where the profile is owned by the presenter layer.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn emit_gesture(&mut self, event: NodeGraphGestureEvent)
pub fn emit_gesture(&mut self, event: NodeGraphGestureEvent)
Emits a transient gesture event for adapter layers that own pointer/keyboard gestures.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn undo(&mut self) -> Result<Option<DispatchOutcome>, DispatchError>
pub fn undo(&mut self) -> Result<Option<DispatchOutcome>, DispatchError>
Undoes the last committed transaction.
Sourcepub fn undo_with_profile(
&mut self,
profile: &mut dyn GraphProfile,
) -> Result<Option<DispatchOutcome>, ApplyPipelineError>
pub fn undo_with_profile( &mut self, profile: &mut dyn GraphProfile, ) -> Result<Option<DispatchOutcome>, ApplyPipelineError>
Undoes the last committed transaction using an externally-owned profile pipeline.
Sourcepub fn redo(&mut self) -> Result<Option<DispatchOutcome>, DispatchError>
pub fn redo(&mut self) -> Result<Option<DispatchOutcome>, DispatchError>
Redoes the last undone transaction.
Sourcepub fn redo_with_profile(
&mut self,
profile: &mut dyn GraphProfile,
) -> Result<Option<DispatchOutcome>, ApplyPipelineError>
pub fn redo_with_profile( &mut self, profile: &mut dyn GraphProfile, ) -> Result<Option<DispatchOutcome>, ApplyPipelineError>
Redoes the last undone transaction using an externally-owned profile pipeline.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn subscribe(
&mut self,
f: impl for<'a> FnMut(NodeGraphStoreEvent<'a>) + 'static,
) -> SubscriptionToken
pub fn subscribe( &mut self, f: impl for<'a> FnMut(NodeGraphStoreEvent<'a>) + 'static, ) -> SubscriptionToken
Subscribes to store events (graph commits + view-state changes).
This is the minimal B-layer equivalent of XyFlow’s store subscriptions.
Sourcepub fn subscribe_selector<T>(
&mut self,
selector: impl for<'a> Fn(NodeGraphStoreSnapshot<'a>) -> T + 'static,
on_change: impl FnMut(&T) + 'static,
) -> SubscriptionTokenwhere
T: PartialEq + 'static,
pub fn subscribe_selector<T>(
&mut self,
selector: impl for<'a> Fn(NodeGraphStoreSnapshot<'a>) -> T + 'static,
on_change: impl FnMut(&T) + 'static,
) -> SubscriptionTokenwhere
T: PartialEq + 'static,
Subscribes to a derived projection of store state and only fires when the derived value
changes (by PartialEq).
This is the B-layer “selector subscription” pattern used by XyFlow.
Sourcepub fn subscribe_selector_diff<T>(
&mut self,
selector: impl for<'a> Fn(NodeGraphStoreSnapshot<'a>) -> T + 'static,
on_change: impl FnMut(&T, &T) + 'static,
) -> SubscriptionTokenwhere
T: PartialEq + 'static,
pub fn subscribe_selector_diff<T>(
&mut self,
selector: impl for<'a> Fn(NodeGraphStoreSnapshot<'a>) -> T + 'static,
on_change: impl FnMut(&T, &T) + 'static,
) -> SubscriptionTokenwhere
T: PartialEq + 'static,
Subscribes to a derived projection and receives both the previous and next values.
Sourcepub fn unsubscribe(&mut self, token: SubscriptionToken) -> bool
pub fn unsubscribe(&mut self, token: SubscriptionToken) -> bool
Removes a subscription.
Source§impl NodeGraphStore
impl NodeGraphStore
pub fn interaction(&self) -> &NodeGraphInteractionConfig
pub fn runtime_tuning(&self) -> &NodeGraphRuntimeTuning
pub fn editor_config(&self) -> NodeGraphEditorConfig
pub fn resolved_interaction_state(&self) -> NodeGraphInteractionState
pub fn replace_editor_config(&mut self, editor_config: NodeGraphEditorConfig)
pub fn update_editor_config( &mut self, f: impl FnOnce(&mut NodeGraphEditorConfig), )
Source§impl NodeGraphStore
impl NodeGraphStore
pub fn graph(&self) -> &Graph
pub fn graph_revision(&self) -> u64
pub fn layout_facts_revision(&self) -> u64
pub fn lookups(&self) -> &NodeGraphLookups
Sourcepub fn replace_graph(&mut self, graph: Graph)
pub fn replace_graph(&mut self, graph: Graph)
Replaces the entire graph document.
This is a controlled-mode helper: callers that own graph state can swap the document without going through transactions (e.g. loading a file, switching tabs).
This emits a document replacement event, not a graph commit. Selection is sanitized against the new graph.
Sourcepub fn replace_document(
&mut self,
graph: Graph,
view_state: NodeGraphViewState,
editor_config: NodeGraphEditorConfig,
)
pub fn replace_document( &mut self, graph: Graph, view_state: NodeGraphViewState, editor_config: NodeGraphEditorConfig, )
Replaces the entire document snapshot in one atomic store update.
This is the full document reset path: graph, view state, editor config, lookups, revision,
and undo/redo history are updated together, then one DocumentReplaced event is emitted.
Source§impl NodeGraphStore
impl NodeGraphStore
pub fn view_state(&self) -> &NodeGraphViewState
Sourcepub fn replace_view_state(&mut self, view_state: NodeGraphViewState)
pub fn replace_view_state(&mut self, view_state: NodeGraphViewState)
Replaces the full view-state payload.
This is the controlled-mode counterpart of set_viewport/set_selection.
Sourcepub fn update_view_state(&mut self, f: impl FnOnce(&mut NodeGraphViewState))
pub fn update_view_state(&mut self, f: impl FnOnce(&mut NodeGraphViewState))
Mutates view-state in place and emits derived ViewChange events.
Sourcepub fn set_viewport(&mut self, pan: CanvasPoint, zoom: f32)
pub fn set_viewport(&mut self, pan: CanvasPoint, zoom: f32)
Sets the viewport (pan/zoom) and notifies subscribers.
Sourcepub fn apply_viewport_pan(
&mut self,
request: ViewportPanRequest,
) -> Option<ViewportTransform>
pub fn apply_viewport_pan( &mut self, request: ViewportPanRequest, ) -> Option<ViewportTransform>
Applies a normalized drag-pan request through normal view-state publication.
Sourcepub fn apply_viewport_pan_constrained(
&mut self,
request: ViewportPanRequest,
viewport_size: CanvasSize,
) -> Option<ViewportTransform>
pub fn apply_viewport_pan_constrained( &mut self, request: ViewportPanRequest, viewport_size: CanvasSize, ) -> Option<ViewportTransform>
Applies a drag-pan request while honoring configured translate extents.
Sourcepub fn apply_viewport_zoom(
&mut self,
request: ViewportZoomRequest,
) -> Option<ViewportTransform>
pub fn apply_viewport_zoom( &mut self, request: ViewportZoomRequest, ) -> Option<ViewportTransform>
Applies a normalized anchored zoom request through normal view-state publication.
Sourcepub fn apply_viewport_zoom_constrained(
&mut self,
request: ViewportZoomRequest,
viewport_size: CanvasSize,
) -> Option<ViewportTransform>
pub fn apply_viewport_zoom_constrained( &mut self, request: ViewportZoomRequest, viewport_size: CanvasSize, ) -> Option<ViewportTransform>
Applies an anchored zoom request while honoring configured translate extents.
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn new(
graph: Graph,
view_state: NodeGraphViewState,
editor_config: NodeGraphEditorConfig,
) -> Self
pub fn new( graph: Graph, view_state: NodeGraphViewState, editor_config: NodeGraphEditorConfig, ) -> Self
Creates a store with an explicit editor configuration payload.
Sourcepub fn with_profile(
graph: Graph,
view_state: NodeGraphViewState,
editor_config: NodeGraphEditorConfig,
profile: Box<dyn GraphProfile>,
) -> Self
pub fn with_profile( graph: Graph, view_state: NodeGraphViewState, editor_config: NodeGraphEditorConfig, profile: Box<dyn GraphProfile>, ) -> Self
Creates a store with a profile pipeline (apply -> concretize -> validate).
pub fn with_middleware(self, middleware: impl NodeGraphStoreMiddleware) -> Self
Source§impl NodeGraphStore
impl NodeGraphStore
Sourcepub fn dispatch_changes(
&mut self,
changes: &NodeGraphChanges,
) -> Result<DispatchOutcome, DispatchChangesError>
pub fn dispatch_changes( &mut self, changes: &NodeGraphChanges, ) -> Result<DispatchOutcome, DispatchChangesError>
Applies XyFlow-style changes by converting them to a reversible transaction.