pub struct ActionMenuWidget<'a, const MAX_ITEMS: usize = 8> {
pub title: Option<&'a str>,
pub items: Vec<ActionMenuItem<'a>, MAX_ITEMS>,
pub selected_index: usize,
pub background_color: Rgb565,
pub text_color: Rgb565,
pub selected_bg_color: Rgb565,
pub selected_text_color: Rgb565,
pub accent_color: Rgb565,
}Expand description
Cascading Hierarchical Action Menu widget.
Fields§
§title: Option<&'a str>§items: Vec<ActionMenuItem<'a>, MAX_ITEMS>§selected_index: usize§background_color: Rgb565§text_color: Rgb565§selected_bg_color: Rgb565§selected_text_color: Rgb565§accent_color: Rgb565Implementations§
Source§impl<'a, const MAX_ITEMS: usize> ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> ActionMenuWidget<'a, MAX_ITEMS>
Trait Implementations§
Source§impl<'a, const MAX_ITEMS: usize> Clone for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> Clone for ActionMenuWidget<'a, MAX_ITEMS>
Source§fn clone(&self) -> ActionMenuWidget<'a, MAX_ITEMS>
fn clone(&self) -> ActionMenuWidget<'a, MAX_ITEMS>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, const MAX_ITEMS: usize> Debug for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> Debug for ActionMenuWidget<'a, MAX_ITEMS>
Source§impl<'a, const MAX_ITEMS: usize> PartialEq for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> PartialEq for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> StructuralPartialEq for ActionMenuWidget<'a, MAX_ITEMS>
Source§impl<'a, const MAX_ITEMS: usize> Widget for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> Widget for ActionMenuWidget<'a, MAX_ITEMS>
fn render_widget_bounds(&self, _bounds: Rect, _style: &Style)
fn get_property(&self, key: PropertyKey) -> Option<PropertyValue<'_>>
fn handle_widget_event( &mut self, _event: &UiEvent, _ctx: &mut EventContext, ) -> EventPolicy
fn set_property<'a>( &mut self, _key: PropertyKey, _val: PropertyValue<'a>, ) -> Result<(), PropertyError>
Auto Trait Implementations§
impl<'a, const MAX_ITEMS: usize> Freeze for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> RefUnwindSafe for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> Send for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> Sync for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> Unpin for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> UnsafeUnpin for ActionMenuWidget<'a, MAX_ITEMS>
impl<'a, const MAX_ITEMS: usize> UnwindSafe for ActionMenuWidget<'a, MAX_ITEMS>
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.