pub struct TreeNodeCollection { /* private fields */ }Expand description
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.
Implementations§
Source§impl TreeNodeCollection
impl TreeNodeCollection
Sourcepub fn new(
owner: Weak<TreeNode>,
kind: Box<dyn TreeNodeCollectionImpl>,
) -> Rc<Self>
pub 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.
Sourcepub fn empty() -> Rc<TreeNodeCollection>
pub fn empty() -> Rc<TreeNodeCollection>
static readonly internal TreeNodeCollection Empty: the collection of
the nodes without children (one per thread).
Sourcepub fn owner(&self) -> Option<Rc<TreeNode>>
pub fn owner(&self) -> Option<Rc<TreeNode>>
Owner: the node whose children the collection holds; None for the
empty collection, and once the node is gone.
Sourcepub fn base_dispose(&self)
pub fn base_dispose(&self)
The base implementation of Dispose(): disposes the nodes, if the
collection was ever filled.
Sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&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.
Trait Implementations§
Source§impl IFerroReadOnlyList<Rc<TreeNode>> for TreeNodeCollection
impl IFerroReadOnlyList<Rc<TreeNode>> for TreeNodeCollection
Source§fn snapshot(&self) -> Rc<Vec<Rc<TreeNode>>>
fn snapshot(&self) -> Rc<Vec<Rc<TreeNode>>>
Source§fn add_collection_changed(
&self,
handler: Rc<CollectionChangedHandler<Rc<TreeNode>>>,
) -> u64
fn add_collection_changed( &self, handler: Rc<CollectionChangedHandler<Rc<TreeNode>>>, ) -> u64
remove_collection_changed.Source§fn remove_collection_changed(&self, token: u64) -> bool
fn remove_collection_changed(&self, token: u64) -> bool
Source§impl IItemsList for TreeNodeCollection
The collection as the items of an items control (the untyped IList of
the original, which the tree view reads).
impl IItemsList for TreeNodeCollection
The collection as the items of an items control (the untyped IList of
the original, which the tree view reads).
Source§fn get_at(&self, index: usize) -> Option<BoxedValue>
fn get_at(&self, index: usize) -> Option<BoxedValue>
index. Panics if out of range.Source§fn index_of(&self, item: &Option<BoxedValue>) -> i32
fn index_of(&self, item: &Option<BoxedValue>) -> i32
item, or -1.Source§fn is_notifying(&self) -> bool
fn is_notifying(&self) -> bool
Source§fn add_collection_changed(
&self,
handler: Rc<ItemsChangedHandler>,
) -> Option<u64>
fn add_collection_changed( &self, handler: Rc<ItemsChangedHandler>, ) -> Option<u64>
remove_collection_changed, or
None if the list does not notify.Source§fn remove_collection_changed(&self, token: u64)
fn remove_collection_changed(&self, token: u64)
Source§fn key_index_mapping(&self) -> Option<&dyn IKeyIndexMapping>
fn key_index_mapping(&self) -> Option<&dyn IKeyIndexMapping>
IKeyIndexMapping); None by default. An index is
never a key: a list without keys has none.Source§impl INotifyCollectionChanged for TreeNodeCollection
impl INotifyCollectionChanged for TreeNodeCollection
Source§fn collection_changed(&self) -> &Event<CollectionChange>
fn collection_changed(&self) -> &Event<CollectionChange>
CollectionChanged: subscribing fills the collection.
Source§impl INotifyPropertyChanged for TreeNodeCollection
impl INotifyPropertyChanged for TreeNodeCollection
Source§fn property_changed(&self) -> &Event<str>
fn property_changed(&self) -> &Event<str>
PropertyChanged: subscribing fills the collection.
Source§fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>
fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>
INotifyPropertyChanging, when it also raises the event of a property
that is about to change; None by default. Read moreSource§impl MarkupTyped for TreeNodeCollection
impl MarkupTyped for TreeNodeCollection
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Source§impl ModelCollection<TreeNode> for TreeNodeCollection
impl ModelCollection<TreeNode> for TreeNodeCollection
Source§fn index_of(&self, model: &Rc<TreeNode>) -> Option<usize>
fn index_of(&self, model: &Rc<TreeNode>) -> Option<usize>
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>
fn add_collection_changed( &self, handler: Rc<ModelsChangedHandler<TreeNode>>, ) -> Option<u64>
None when it does not raise any (a
collection that is not INotifyCollectionChanged).Source§fn remove_collection_changed(&self, token: u64)
fn remove_collection_changed(&self, token: u64)
add_collection_changed.Source§fn is_notifying(&self) -> bool
fn is_notifying(&self) -> bool
Source§fn as_mutable(&self) -> Option<&dyn MutableModelCollection<M>>
fn as_mutable(&self) -> Option<&dyn MutableModelCollection<M>>
IList that is not read only), for the moves of
drag and drop.Auto Trait Implementations§
impl !Freeze for TreeNodeCollection
impl !RefUnwindSafe for TreeNodeCollection
impl !Send for TreeNodeCollection
impl !Sync for TreeNodeCollection
impl !UnwindSafe for TreeNodeCollection
impl Unpin for TreeNodeCollection
impl UnsafeUnpin for TreeNodeCollection
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more