TreeNodeCollection
struct · ferroui-diagnostics · v0.5.0
struct TreeNodeCollection
The children of a TreeNode: a read-only list of nodes that is filled
the first time it is used (its count, an item, an enumeration or a
subscription to its changes), and then follows the tree it shows.
The kinds of the original (the collections of the logical and visual
trees, of a group of top levels, of an application, and the empty one)
derive from it; here they implement TreeNodeCollectionImpl, which the
collection holds.
Members
new
fn new(owner: Weak<TreeNode>, kind: Box<dyn TreeNodeCollectionImpl>) -> Rc<Self>
TreeNodeCollection(TreeNode owner): a collection of the children of
owner, of the kind kind.
empty
fn empty() -> Rc<TreeNodeCollection>
static readonly internal TreeNodeCollection Empty: the collection of
the nodes without children (one per thread).
get
fn get(self: &Self, index: usize) -> Rc<TreeNode>
this[int index]: the node at index.
Panics
Panics when index is out of range.
count
fn count(self: &Self) -> usize
Count: the number of nodes.
owner
fn owner(self: &Self) -> Option<Rc<TreeNode>>
Owner: the node whose children the collection holds; None for the
empty collection, and once the node is gone.
dispose
fn dispose(self: &Self)
Dispose(): the override of the kind of the collection.
base_dispose
fn base_dispose(self: &Self)
The base implementation of Dispose(): disposes the nodes, if the
collection was ever filled.
is_initialized
fn is_initialized(self: &Self) -> bool
Whether the collection was filled: whether its nodes exist. A collection is filled the first time it is used (its count, an item, an enumeration or a subscription to its changes); the tree pages ask for the children of a node when its row is shown or expanded.
to_vec
fn to_vec(self: &Self) -> Vec<Rc<TreeNode>>
GetEnumerator(): the nodes, as they are now.
contains
fn contains(self: &Self, node: &Rc<TreeNode>) -> bool
IList.Contains(object).
index_of
fn index_of(self: &Self, node: &Rc<TreeNode>) -> i32
IList.IndexOf(object): the index of node, or -1.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyAnyValueClassDefaultsErasedDestructorIntoEitherTreeModelPartialEqINotifyCollectionChangedINotifyPropertyChangedIFerroReadOnlyList<Rc<TreeNode>>IItemsListModelCollection<TreeNode>MarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.