Skip to main content

NodeGraphViewCallbacks

Trait NodeGraphViewCallbacks 

Source
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):

  1. on_view_change
  2. on_viewport_change / on_selection_change for each derived ViewChange

Provided Methods§

Source

fn on_view_change(&mut self, _changes: &[ViewChange])

Source

fn on_viewport_change(&mut self, _pan: CanvasPoint, _zoom: f32)

Source

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".

Implementors§