pub struct GraphView {
pub scene: Scene,
pub layout: Layout,
pub empty_hint: String,
pub title: String,
}Expand description
Fields§
§scene: Scene§layout: Layout§empty_hint: String§title: StringImplementations§
Source§impl GraphView
impl GraphView
pub fn new(scene: Scene) -> Self
pub fn empty_hint(self, hint: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
pub fn show(&self, ui: &mut Ui)
Sourcepub fn label_counts(&self) -> BTreeMap<String, usize>
pub fn label_counts(&self) -> BTreeMap<String, usize>
Per-label node counts (for the introspection).
Trait Implementations§
Source§impl Facet for GraphView
impl Facet for GraphView
fn title(&self) -> &str
fn ui(&mut self, ui: &mut Ui)
fn state_json(&self) -> Value
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 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 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 GraphView
impl RefUnwindSafe for GraphView
impl Send for GraphView
impl Sync for GraphView
impl Unpin for GraphView
impl UnsafeUnpin for GraphView
impl UnwindSafe for GraphView
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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