pub struct DepGraphView {
pub title: String,
pub nodes: Vec<DepNode>,
pub edges: Vec<DepEdge>,
pub selected: Option<usize>,
}Expand description
The layered dep-graph viewer. Implements Facet.
Fields§
§title: String§nodes: Vec<DepNode>§edges: Vec<DepEdge>§selected: Option<usize>Implementations§
Source§impl DepGraphView
impl DepGraphView
pub fn new(nodes: Vec<DepNode>, edges: Vec<DepEdge>) -> Self
pub fn with_title(self, t: impl Into<String>) -> Self
Sourcepub fn columns(&self) -> Vec<usize>
pub fn columns(&self) -> Vec<usize>
Column index per node — toposort, deps first (left). Longest-path layering so a dependent sits right of all its deps. Cycle → best effort.
pub fn show(&mut self, ui: &mut Ui)
Trait Implementations§
Source§impl Facet for DepGraphView
impl Facet for DepGraphView
Source§fn caps(&self) -> FacetCaps
fn caps(&self) -> FacetCaps
Boxes/arrows/labels are painted from the active [Theme]; a node can be
click-selected (drives the drill-down panel); the layered canvas takes the
host’s available_size.
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
The current selection as JSON (also folded into
state_json by
convention). Null when nothing/none selectable.Source§fn set_scale(&mut self, _scale: f32)
fn set_scale(&mut self, _scale: f32)
Set the uniform scale; clamp internally. Default no-op (not scalable).
Source§fn copy(&mut self) -> Option<String>
fn copy(&mut self) -> Option<String>
Clipboard hooks — see clipboard.rs. Defaults: nothing to give/take.
Returns the text to place on the clipboard (None = nothing copyable now).
Source§fn cut(&mut self) -> Option<String>
fn cut(&mut self) -> Option<String>
Like
copy, but also removes the selection. Default delegates to copy.Source§fn as_any_mut(&mut self) -> Option<&mut (dyn Any + 'static)>
fn as_any_mut(&mut self) -> Option<&mut (dyn Any + 'static)>
Optional downcast handle for hosts that need typed access to a specific
facet living inside a
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).Auto Trait Implementations§
impl Freeze for DepGraphView
impl RefUnwindSafe for DepGraphView
impl Send for DepGraphView
impl Sync for DepGraphView
impl Unpin for DepGraphView
impl UnsafeUnpin for DepGraphView
impl UnwindSafe for DepGraphView
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
Mutably borrows from an owned value. Read more