FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    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.

    Source

    empty

    fn empty() -> Rc<TreeNodeCollection>
    

    static readonly internal TreeNodeCollection Empty: the collection of the nodes without children (one per thread).

    Source

    get

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

    this[int index]: the node at index.

    Panics

    Panics when index is out of range.

    Source

    count

    fn count(self: &Self) -> usize
    

    Count: the number of nodes.

    Source

    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.

    Source

    dispose

    fn dispose(self: &Self)
    

    Dispose(): the override of the kind of the collection.

    Source

    base_dispose

    fn base_dispose(self: &Self)
    

    The base implementation of Dispose(): disposes the nodes, if the collection was ever filled.

    Source

    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.

    Source

    to_vec

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

    GetEnumerator(): the nodes, as they are now.

    Source

    contains

    fn contains(self: &Self, node: &Rc<TreeNode>) -> bool
    

    IList.Contains(object).

    Source

    index_of

    fn index_of(self: &Self, node: &Rc<TreeNode>) -> i32
    

    IList.IndexOf(object): the index of node, or -1.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.