pub struct ButtonScope { /* private fields */ }Expand description
A Button and its builder.
Implementations§
Source§impl ButtonScope
impl ButtonScope
pub fn enabled(self, enabled: bool) -> Self
pub fn variant(self, variant: ButtonVariant) -> Self
Sourcepub fn kind(self, kind: ButtonKind) -> Self
pub fn kind(self, kind: ButtonKind) -> Self
What the button is, apart from how loud it is: ButtonKind::ActionKey is one key of
a dense grid, drawn in the design system’s own calculator-key shape.
Sourcepub fn color(self, paint: Paint) -> Self
pub fn color(self, paint: Paint) -> Self
The label’s colour, for the rare button whose meaning is not its variant’s.
Sourcepub fn color_if(self, paint: Option<Paint>) -> Self
pub fn color_if(self, paint: Option<Paint>) -> Self
The same, when there may be no colour of its own.
pub fn on_click(self, handler: impl FnMut() + 'static) -> Self
Trait Implementations§
Source§impl Drop for ButtonScope
impl Drop for ButtonScope
Auto Trait Implementations§
impl !RefUnwindSafe for ButtonScope
impl !Send for ButtonScope
impl !Sync for ButtonScope
impl !UnwindSafe for ButtonScope
impl Freeze for ButtonScope
impl Unpin for ButtonScope
impl UnsafeUnpin for ButtonScope
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