pub struct ButtonBuilder<'a> { /* private fields */ }Expand description
Chainable button. Terminal call is ButtonBuilder::build.
Implementations§
Source§impl<'a> ButtonBuilder<'a>
impl<'a> ButtonBuilder<'a>
Source§impl<'a> ButtonBuilder<'a>
impl<'a> ButtonBuilder<'a>
Sourcepub fn active(self, on: bool) -> Self
pub fn active(self, on: bool) -> Self
Drawn as active (accent fill) when not hovered or pressed.
Sourcepub fn active_border(self, b: Option<bool>) -> Self
pub fn active_border(self, b: Option<bool>) -> Self
Per-instance active-border override.
Sourcepub fn hover_chevron(self, c: HoverChevronSpec) -> Self
pub fn hover_chevron(self, c: HoverChevronSpec) -> Self
Hover-revealed trailing chevron.
Sourcepub fn settings(self, s: ButtonSettings) -> Self
pub fn settings(self, s: ButtonSettings) -> Self
Full settings. Wins over the token-derived default.
Sourcepub fn on_click(self, f: impl FnOnce() + 'a) -> Self
pub fn on_click(self, f: impl FnOnce() + 'a) -> Self
Invoked when this id was clicked and the button is not disabled.
Sourcepub fn bind_count(self, n: &'a mut u32) -> Self
pub fn bind_count(self, n: &'a mut u32) -> Self
Incremented on each click (ignored when disabled).
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ButtonBuilder<'a>
impl<'a> !Send for ButtonBuilder<'a>
impl<'a> !Sync for ButtonBuilder<'a>
impl<'a> !UnwindSafe for ButtonBuilder<'a>
impl<'a> Freeze for ButtonBuilder<'a>
impl<'a> Unpin for ButtonBuilder<'a>
impl<'a> UnsafeUnpin for ButtonBuilder<'a>
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