pub struct FabMenuItem { /* private fields */ }Expand description
An individually labeled FAB menu action. Supply a stable id for each item.
Implementations§
Source§impl FabMenuItem
impl FabMenuItem
Sourcepub fn new(
id: impl Into<SharedString>,
label: impl Into<SharedString>,
icon: IconName,
) -> FabMenuItem
pub fn new( id: impl Into<SharedString>, label: impl Into<SharedString>, icon: IconName, ) -> FabMenuItem
Creates a FAB menu item with a stable id, accessible label, and Material icon.
Sourcepub fn custom(
id: impl Into<SharedString>,
label: impl Into<SharedString>,
content: impl IntoElement,
) -> FabMenuItem
pub fn custom( id: impl Into<SharedString>, label: impl Into<SharedString>, content: impl IntoElement, ) -> FabMenuItem
Uses arbitrary decorative content while retaining the supplied action name.
Sourcepub fn icon(self, icon: impl IntoElement) -> FabMenuItem
pub fn icon(self, icon: impl IntoElement) -> FabMenuItem
Sets a custom icon element for this menu item.
Sourcepub fn content(self, content: impl IntoElement) -> FabMenuItem
pub fn content(self, content: impl IntoElement) -> FabMenuItem
Replaces the item’s visible label. Its accessible name remains the same.
Sourcepub fn colors(self, colors: FabMenuItemColors) -> FabMenuItem
pub fn colors(self, colors: FabMenuItemColors) -> FabMenuItem
Overrides the container and content colors for this menu item.
Sourcepub fn disabled(self, disabled: bool) -> FabMenuItem
pub fn disabled(self, disabled: bool) -> FabMenuItem
Disables activation and keyboard focus navigation on this menu item when true.
Sourcepub fn on_activate(
self,
invoke: impl Fn(&mut Window, &mut App) + 'static,
) -> FabMenuItem
pub fn on_activate( self, invoke: impl Fn(&mut Window, &mut App) + 'static, ) -> FabMenuItem
Registers a callback invoked when this menu item is activated.
Auto Trait Implementations§
impl !RefUnwindSafe for FabMenuItem
impl !Send for FabMenuItem
impl !Sync for FabMenuItem
impl !UnwindSafe for FabMenuItem
impl Forget for FabMenuItem
impl Freeze for FabMenuItem
impl Move for FabMenuItem
impl Unpin for FabMenuItem
impl UnsafeUnpin for FabMenuItem
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more