pub struct ButtonGroupScope { /* private fields */ }Expand description
Scope passed to ButtonGroup’s content closure.
Implementations§
Source§impl ButtonGroupScope
impl ButtonGroupScope
Sourcepub fn clickable_item(
&mut self,
on_click: impl Fn() + 'static,
label: String,
icon: Option<View>,
)
pub fn clickable_item( &mut self, on_click: impl Fn() + 'static, label: String, icon: Option<View>, )
Add a clickable item (rendered as a [Button] internally).
Sourcepub fn toggleable_item(
&mut self,
checked: bool,
on_checked_change: impl Fn(bool) + 'static,
label: String,
icon: Option<View>,
)
pub fn toggleable_item( &mut self, checked: bool, on_checked_change: impl Fn(bool) + 'static, label: String, icon: Option<View>, )
Add a toggleable item (rendered as a [ToggleButton] internally).
Sourcepub fn custom_item(
&mut self,
button_group_content: impl FnOnce() -> View + 'static,
menu_content: Option<impl FnOnce(&mut ButtonGroupMenuState) -> View + 'static>,
)
pub fn custom_item( &mut self, button_group_content: impl FnOnce() -> View + 'static, menu_content: Option<impl FnOnce(&mut ButtonGroupMenuState) -> View + 'static>, )
Add a custom item with a button group composable and an optional overflow menu content.
Auto Trait Implementations§
impl !RefUnwindSafe for ButtonGroupScope
impl !Send for ButtonGroupScope
impl !Sync for ButtonGroupScope
impl !UnwindSafe for ButtonGroupScope
impl Freeze for ButtonGroupScope
impl Unpin for ButtonGroupScope
impl UnsafeUnpin for ButtonGroupScope
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