pub struct DecoratedGraphView { /* private fields */ }Expand description
An interactive, decorated pan/zoom graph pane Facet.
Implementations§
Source§impl DecoratedGraphView
impl DecoratedGraphView
Sourcepub fn with_model(self, model: GraphModel) -> Self
pub fn with_model(self, model: GraphModel) -> Self
Set the graph model (nodes already laid out in world space + edges).
Sourcepub fn with_decorations(self, decorations: Decorations) -> Self
pub fn with_decorations(self, decorations: Decorations) -> Self
Set the decorations overlay (rings/badges + emphasis edges).
Sourcepub fn set_title(&mut self, title: impl Into<String>)
pub fn set_title(&mut self, title: impl Into<String>)
Re-title (the deck keys facets off Facet::title).
Sourcepub fn select(&mut self, id: Option<String>)
pub fn select(&mut self, id: Option<String>)
Select a node by id (lights its downstream subtree), or None to clear.
Sourcepub fn lit_set(&self) -> BTreeSet<String>
pub fn lit_set(&self) -> BTreeSet<String>
The downstream-lit set for the current selection (empty when none).
Sourcepub fn local() -> Self
pub fn local() -> Self
Discovery-contract local() — a realistic 4-node DAG (a → b, a → c,
b → d, c → d) decorated with a green coverage ring on a, an amber badge
on b, and an emphasis “cut” edge d → a (dashed, labelled), so the pane
paints real chips, rings, a badge, and an overlay edge with no host.
Trait Implementations§
Source§impl Facet for DecoratedGraphView
impl Facet for DecoratedGraphView
Source§fn caps(&self) -> FacetCaps
fn caps(&self) -> FacetCaps
Themed (chips/rings follow the palette) + resizable + selectable (a node drill-in) + navigable (pan/drag + scroll-zoom + fit).
fn title(&self) -> &str
fn ui(&mut self, ui: &mut Ui)
fn state_json(&self) -> Value
Source§fn selection_json(&self) -> Value
fn selection_json(&self) -> Value
state_json by
convention). Null when nothing/none selectable.Source§fn as_any_mut(&mut self) -> Option<&mut dyn Any>
fn as_any_mut(&mut self) -> Option<&mut dyn Any>
FacetDeck (e.g. a robot-UI driver clicking an
app-level control that must forward to a concrete component’s own API).
Defaulted to None so no existing facet has to change; a component opts in
by returning Some(self).Source§fn set_scale(&mut self, _scale: f32)
fn set_scale(&mut self, _scale: f32)
Source§fn copy(&mut self) -> Option<String>
fn copy(&mut self) -> Option<String>
Source§fn cut(&mut self) -> Option<String>
fn cut(&mut self) -> Option<String>
copy, but also removes the selection. Default delegates to copy.Source§fn kind(&self) -> &'static str
fn kind(&self) -> &'static str
"jobview", "graphpan", "table"). Two
instances with the same kind can exchange portable state; the empty
default "" means opted out of cross-instance clone.Source§fn portable_state(&self) -> Option<Value>
fn portable_state(&self) -> Option<Value>
None = not cloneable. Kept SEPARATE from
state_json (the introspection dump, which may carry
derived / render-only data) so this stays round-trippable through
load_state.Source§fn load_state(&mut self, _state: &Value) -> bool
fn load_state(&mut self, _state: &Value) -> bool
portable_state
on a same-kind sibling. Returns true if accepted. Default false
(opt-in per component).Auto Trait Implementations§
impl Freeze for DecoratedGraphView
impl RefUnwindSafe for DecoratedGraphView
impl Send for DecoratedGraphView
impl Sync for DecoratedGraphView
impl Unpin for DecoratedGraphView
impl UnsafeUnpin for DecoratedGraphView
impl UnwindSafe for DecoratedGraphView
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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