pub struct TreeizeWidget { /* private fields */ }Implementations§
Source§impl TreeizeWidget
impl TreeizeWidget
Sourcepub fn get_selected_nodes(self, ui: &Ui) -> Vec<NodeId>
pub fn get_selected_nodes(self, ui: &Ui) -> Vec<NodeId>
Returns list of nodes selected in the UI for the TreeizeWidget with same id.
Use same Ui instance that was used in TreeizeWidget::show.
Sourcepub fn get_selected_nodes_at(self, ui_id: Id, ctx: &Context) -> Vec<NodeId>
pub fn get_selected_nodes_at(self, ui_id: Id, ctx: &Context) -> Vec<NodeId>
Returns list of nodes selected in the UI for the TreeizeWidget with same id.
ui_id must be the Id of the Ui instance that was used in TreeizeWidget::show.
Source§impl TreeizeWidget
impl TreeizeWidget
Sourcepub fn new() -> Self
pub fn new() -> Self
Returns new TreeizeWidget with default parameters.
Sourcepub const fn id(self, id: Id) -> Self
pub const fn id(self, id: Id) -> Self
Assign an explicit and globally unique Id.
Use this if you want to persist the state of the widget when it changes position in the widget hierarchy.
Prefer using TreeizeWidget::id_salt otherwise.
Sourcepub fn id_salt(self, id_salt: impl Hash) -> Self
pub fn id_salt(self, id_salt: impl Hash) -> Self
Assign a source for the unique Id
It must be locally unique for the current Ui hierarchy position.
Ignored if TreeizeWidget::id was set.
Sourcepub const fn style(self, style: TreeizeStyle) -> Self
pub const fn style(self, style: TreeizeStyle) -> Self
Set style parameters for the Treeize widget.
Trait Implementations§
Source§impl Clone for TreeizeWidget
impl Clone for TreeizeWidget
Source§fn clone(&self) -> TreeizeWidget
fn clone(&self) -> TreeizeWidget
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TreeizeWidget
impl Debug for TreeizeWidget
Source§impl Default for TreeizeWidget
impl Default for TreeizeWidget
impl Copy for TreeizeWidget
Auto Trait Implementations§
impl Freeze for TreeizeWidget
impl RefUnwindSafe for TreeizeWidget
impl Send for TreeizeWidget
impl Sync for TreeizeWidget
impl Unpin for TreeizeWidget
impl UnwindSafe for TreeizeWidget
Blanket Implementations§
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
Mutably borrows from an owned value. Read more