pub struct TreeItem { /* private fields */ }Implementations§
Source§impl TreeItem
impl TreeItem
pub fn new(label: impl Into<String>) -> Self
pub fn key(self, key: u64) -> Self
pub fn detail(self, detail: impl Into<String>) -> Self
pub fn expanded(self, expanded: bool) -> Self
Sourcepub fn enabled(self, enabled: bool) -> Self
pub fn enabled(self, enabled: bool) -> Self
Whether the item can be chosen. Items are enabled unless set otherwise.
Sourcepub fn activate_with_child(self, activate_with_child: bool) -> Self
pub fn activate_with_child(self, activate_with_child: bool) -> Self
Let otherwise unhandled pointer presses on custom content activate the owning tree row. Interactive descendants still receive the event first.
Sourcepub fn child<W>(self, content: W) -> Selfwhere
W: Widget + 'static,
pub fn child<W>(self, content: W) -> Selfwhere
W: Widget + 'static,
Replace the built-in label/detail presentation with arbitrary retained widget content while preserving this item’s hierarchy and disclosure.
pub fn item(self, child: TreeItem) -> Self
pub fn items<I>(self, children: I) -> Selfwhere
I: IntoIterator<Item = TreeItem>,
pub fn label(&self) -> &str
pub fn has_content(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TreeItem
impl !RefUnwindSafe for TreeItem
impl !Send for TreeItem
impl !Sync for TreeItem
impl !UnwindSafe for TreeItem
impl Forget for TreeItem
impl Move for TreeItem
impl Unpin for TreeItem
impl UnsafeUnpin for TreeItem
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