pub struct TreeNodeTrailingAction {
pub icon: IconId,
pub tooltip: Option<String>,
}Expand description
Icon and optional tooltip metadata for a selected row’s trailing action.
§Examples
use ailloli_ui_core::IconId;
use ailloli_ui_widgets::controls::TreeNodeTrailingAction;
let action = TreeNodeTrailingAction::new(IconId::Close).tooltip("Remove");
assert_eq!(action.tooltip.as_deref(), Some("Remove"));Fields§
§icon: IconIdPainted action icon.
tooltip: Option<String>Optional presentation tooltip; the tree itself does not display it.
Implementations§
Source§impl TreeNodeTrailingAction
impl TreeNodeTrailingAction
Sourcepub fn new(icon: IconId) -> Self
pub fn new(icon: IconId) -> Self
Creates action metadata without a tooltip.
§Examples
use ailloli_ui_core::IconId;
use ailloli_ui_widgets::controls::TreeNodeTrailingAction;
assert!(TreeNodeTrailingAction::new(IconId::Close).tooltip.is_none());Sourcepub fn tooltip(self, tooltip: impl Into<String>) -> Self
pub fn tooltip(self, tooltip: impl Into<String>) -> Self
Sets tooltip metadata, replacing any previous value.
§Examples
use ailloli_ui_core::IconId;
use ailloli_ui_widgets::controls::TreeNodeTrailingAction;
let action = TreeNodeTrailingAction::new(IconId::Close).tooltip("Delete");
assert_eq!(action.tooltip.as_deref(), Some("Delete"));Trait Implementations§
Source§impl Clone for TreeNodeTrailingAction
impl Clone for TreeNodeTrailingAction
Source§fn clone(&self) -> TreeNodeTrailingAction
fn clone(&self) -> TreeNodeTrailingAction
Returns a copy 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 TreeNodeTrailingAction
impl Debug for TreeNodeTrailingAction
Source§impl PartialEq for TreeNodeTrailingAction
impl PartialEq for TreeNodeTrailingAction
impl Eq for TreeNodeTrailingAction
impl StructuralPartialEq for TreeNodeTrailingAction
Auto Trait Implementations§
impl Freeze for TreeNodeTrailingAction
impl RefUnwindSafe for TreeNodeTrailingAction
impl Send for TreeNodeTrailingAction
impl Sync for TreeNodeTrailingAction
impl Unpin for TreeNodeTrailingAction
impl UnwindSafe for TreeNodeTrailingAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.