Struct winsafe::gui::spec::TreeViewItems
source · pub struct TreeViewItems<'a, T: 'static> { /* private fields */ }
gui
only.Expand description
Exposes item methods of a TreeView
control.
You cannot directly instantiate this object, it is created internally by the control.
Implementations§
source§impl<'a, T> TreeViewItems<'a, T>
impl<'a, T> TreeViewItems<'a, T>
sourcepub fn add_root(
&self,
text: &str,
icon_index: Option<u32>,
data: T
) -> TreeViewItem<'a, T>
pub fn add_root( &self, text: &str, icon_index: Option<u32>, data: T ) -> TreeViewItem<'a, T>
Adds a new root item by sending a
tvm::InsertItem
message, and returns
the newly added item.
sourcepub fn delete_all(&self)
pub fn delete_all(&self)
Deletes all items by sending a
tvm::DeleteItem
message.
sourcepub fn count(&self) -> u32
pub fn count(&self) -> u32
Retrieves the total number of items by sending a
tvm::GetCount
message.
sourcepub fn count_visible(&self) -> u32
pub fn count_visible(&self) -> u32
Retrieves the number of visible items by sending a
tvm::GetVisibleCount
message.
sourcepub fn end_edit_label_now(&self, save: bool)
pub fn end_edit_label_now(&self, save: bool)
Ends the editing of the item’s text by sending a
tvm::EndEditLabelNow
message.
sourcepub fn get(&self, hitem: &HTREEITEM) -> TreeViewItem<'a, T>
pub fn get(&self, hitem: &HTREEITEM) -> TreeViewItem<'a, T>
Retrieves the item of the given handle.
Note: This method is cheap – even if htreeitem
is invalid, an
object will still be returned. However, operations upon this object will
produce no effect.
sourcepub fn iter_selected(&self) -> impl Iterator<Item = TreeViewItem<'a, T>> + 'a
pub fn iter_selected(&self) -> impl Iterator<Item = TreeViewItem<'a, T>> + 'a
Returns an iterator over the selected items.
sourcepub fn iter_root(&self) -> impl Iterator<Item = TreeViewItem<'a, T>> + 'a
pub fn iter_root(&self) -> impl Iterator<Item = TreeViewItem<'a, T>> + 'a
Returns an iterator over the root items.