pub struct RibbonItem { /* private fields */ }Expand description
A command in a ribbon group: a button, a toggle, or a button with a menu.
Implementations§
Source§impl RibbonItem
impl RibbonItem
A command button (large by default).
Sourcepub fn toggle(
label: impl Into<String>,
icon: IconName,
value: Binding<bool>,
) -> Self
pub fn toggle( label: impl Into<String>, icon: IconName, value: Binding<bool>, ) -> Self
A button that stays pressed while value is true (Bold, Ruler…).
Sourcepub fn on_click(self, handler: impl Fn() + 'static) -> Self
pub fn on_click(self, handler: impl Fn() + 'static) -> Self
Runs handler when the item is clicked.
Adds a drop-down item; a button with items opens a menu.
Appends a separator to the drop-down menu.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RibbonItem
impl !Send for RibbonItem
impl !Sync for RibbonItem
impl !UnwindSafe for RibbonItem
impl Freeze for RibbonItem
impl Unpin for RibbonItem
impl UnsafeUnpin for RibbonItem
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