Skip to main content

Crate slint_tree_view

Crate slint_tree_view 

Source

Re-exports§

pub use tree_view::ActivationMode;
pub use tree_view::TreeItem;
pub use tree_view::TreeView;
pub use tree_view::TreeViewStyle;

Modules§

tree_view
Generated Slint types live under this submodule so the consumer’s slint-compiler can find them at slint_tree_view::tree_view::* (the path advertised by rust_module("tree_view") in build.rs).

Constants§

NO_PARENT
Sentinel for an item with no parent (top-level). Used as the parent-internal-id of root items.

Functions§

index_of_id
Find the index of the first item with the given internal-id, or None. Hosts need this constantly when handling TreeView callbacks (which report ids) against their own Vec<TreeItem>.
index_of_id_model
Same lookup against a Slint ModelRc<TreeItem> (what TreeView’s get_model() returns). The linear walk is fine for typical trees (≤ a few thousand items); for huge trees the host should maintain its own HashMap<i32, usize> side index.