Skip to main content

TreeNode

Struct TreeNode 

Source
pub struct TreeNode { /* private fields */ }
Expand description

A node of a tree of the developer tools: an object of the inspected application, its type, name and classes, whether it is expanded in the tree view, and its children.

Implementations§

Source§

impl TreeNode

Source

pub fn font_weight(&self) -> FontWeight

The weight of the font of the node in the tree: bold for a root.

Source

pub fn children(&self) -> Rc<TreeNodeCollection>

The children of the node.

Source

pub fn classes(&self) -> String

The classes of the element, in parentheses, or empty when it has none.

Source

pub fn element_name(&self) -> Option<String>

The name of the element.

Source

pub fn visual(&self) -> Ref<FerroObject>

The object of the node.

Source

pub fn is_expanded(&self) -> bool

Source

pub fn set_is_expanded(&self, value: bool)

Source

pub fn parent(&self) -> Option<Rc<TreeNode>>

The parent node; None for a root, and once the parent is gone (the nodes hold their parents weakly).

Source

pub fn type_(&self) -> String

The Type property: the name of the type of the object, or the name the node was created with.

Source

pub fn kind(&self) -> TreeNodeKind

The class of the node: LogicalTreeNode or VisualTreeNode.

Source

pub fn is_in_template(&self) -> bool

VisualTreeNode.IsInTemplate: whether the element is part of a template (it has a templated parent). false for a node of the logical tree.

Source

pub fn is_visual_only(&self) -> bool

Whether the node is a part of a template in the combined tree, which the tree shows greyed out (an addition of the port).

Source

pub fn dispose(&self)

Dispose(): ends the subscription to the classes and disposes the children.

Trait Implementations§

Source§

impl INotifyPropertyChanged for TreeNode

Source§

fn property_changed(&self) -> &Event<str>

The event raised when a property value changes.
Source§

fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>

The object as INotifyPropertyChanging, when it also raises the event of a property that is about to change; None by default. Read more
Source§

impl MarkupTyped for TreeNode

Source§

const MARKUP: &'static MarkupType

The markup metadata of the type.
Source§

impl ModelCollection<TreeNode> for TreeNodeCollection

Source§

fn count(&self) -> usize

The number of models.
Source§

fn get(&self, index: usize) -> Rc<TreeNode>

The model at index.
Source§

fn index_of(&self, model: &Rc<TreeNode>) -> Option<usize>

The index of model, compared by identity (the reference’s IList.IndexOf of a reference type that does not override Equals).
Source§

fn add_collection_changed( &self, handler: Rc<ModelsChangedHandler<TreeNode>>, ) -> Option<u64>

Subscribes to the changes of the collection; None when it does not raise any (a collection that is not INotifyCollectionChanged).
Source§

fn remove_collection_changed(&self, token: u64)

Removes a subscription of add_collection_changed.
Source§

fn is_notifying(&self) -> bool

Whether the collection raises change notifications.
Source§

fn to_vec(&self) -> Vec<Rc<TreeNode>>

The models, in order.
Source§

fn as_mutable(&self) -> Option<&dyn MutableModelCollection<M>>

The mutable list behind the collection (IList that is not read only), for the moves of drag and drop.
Source§

impl PartialEq for TreeNode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyValue for T
where T: PartialEq + 'static,

Source§

fn any_value_as_any(&self) -> &(dyn Any + 'static)

Source§

fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool

Source§

fn any_value_type_name(&self) -> &'static str

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> TreeModel for T
where T: PartialEq + 'static,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.