pub struct ActButton {
pub act: String,
pub text: Option<String>,
pub icon: Option<Icon>,
pub variant: Option<ButtonVariant>,
pub keys: Vec<String>,
pub title: Option<String>,
pub disabled: Option<Disabled>,
pub busy: Option<bool>,
}Expand description
A button that sends act: in a table’s selection bar (bar, sent with
the picked ids as value), or attached to an input or editor
(buttons; "copy" copies the text).
Fields§
§act: StringThe action a click sends.
text: Option<String>The label (without one the button is icon-only).
icon: Option<Icon>A leading icon.
variant: Option<ButtonVariant>The chrome.
keys: Vec<String>Keycaps after the label.
title: Option<String>The tooltip (and an icon-only button’s accessible name).
disabled: Option<Disabled>Faded and inert; a reason is the tooltip.
busy: Option<bool>A spinner in the icon’s place; inert.
Implementations§
Source§impl ActButton
impl ActButton
Sourcepub fn new(act: impl Into<String>, text: impl Into<String>) -> Self
pub fn new(act: impl Into<String>, text: impl Into<String>) -> Self
A button labeled text sending act.
Sourcepub fn icon_only(act: impl Into<String>, icon: impl Into<Icon>) -> Self
pub fn icon_only(act: impl Into<String>, icon: impl Into<Icon>) -> Self
An icon-only button sending act.
Sourcepub fn variant(self, variant: impl Into<ButtonVariant>) -> Self
pub fn variant(self, variant: impl Into<ButtonVariant>) -> Self
Sets the chrome.
Sourcepub fn keys<K: Into<String>>(self, keys: impl IntoIterator<Item = K>) -> Self
pub fn keys<K: Into<String>>(self, keys: impl IntoIterator<Item = K>) -> Self
Sets the keycaps.
Trait Implementations§
impl Eq for ActButton
impl StructuralPartialEq for ActButton
Auto Trait Implementations§
impl Freeze for ActButton
impl RefUnwindSafe for ActButton
impl Send for ActButton
impl Sync for ActButton
impl Unpin for ActButton
impl UnsafeUnpin for ActButton
impl UnwindSafe for ActButton
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.