pub trait NodeGraphViewCallbacks: 'static {
// Provided methods
fn on_view_change(&mut self, _changes: &[ViewChange]) { ... }
fn on_viewport_change(&mut self, _pan: CanvasPoint, _zoom: f32) { ... }
fn on_selection_change(&mut self, _sel: SelectionChange) { ... }
}Expand description
Headless/store view callbacks for B-layer consumers.
Use this layer for app-owned viewport/selection synchronization. These hooks are derived from
ViewChange and remain headless-safe.
Ordering guarantees (per ViewChanged store event):
on_view_changeon_viewport_change/on_selection_changefor each derivedViewChange
Provided Methods§
fn on_view_change(&mut self, _changes: &[ViewChange])
fn on_viewport_change(&mut self, _pan: CanvasPoint, _zoom: f32)
fn on_selection_change(&mut self, _sel: SelectionChange)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".