pub struct Menu<T, IT, VG, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,{ /* private fields */ }
Implementations§
Source§impl<T, R, S, C> Menu<T, Programmed, NoItems, R, StaticPosition, S, C>
impl<T, R, S, C> Menu<T, Programmed, NoItems, R, StaticPosition, S, C>
Sourcepub fn build(
title: T,
) -> MenuBuilder<T, Programmed, NoItems, R, StaticPosition, S, C>
pub fn build( title: T, ) -> MenuBuilder<T, Programmed, NoItems, R, StaticPosition, S, C>
Creates a new menu builder with the given title.
Source§impl<T, IT, R, P, S, C> Menu<T, IT, NoItems, R, P, S, C>where
T: AsRef<str>,
S: IndicatorStyle,
IT: InputAdapterSource<R>,
P: SelectionIndicatorController,
C: Theme,
impl<T, IT, R, P, S, C> Menu<T, IT, NoItems, R, P, S, C>where
T: AsRef<str>,
S: IndicatorStyle,
IT: InputAdapterSource<R>,
P: SelectionIndicatorController,
C: Theme,
Sourcepub fn with_style(
title: T,
style: MenuStyle<S, IT, P, R, C>,
) -> MenuBuilder<T, IT, NoItems, R, P, S, C>
pub fn with_style( title: T, style: MenuStyle<S, IT, P, R, C>, ) -> MenuBuilder<T, IT, NoItems, R, P, S, C>
Creates a new menu builder with the given title and style.
Source§impl<T, IT, VG, R, P, S, C> Menu<T, IT, VG, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
VG: MenuItemCollection<R>,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
impl<T, IT, VG, R, P, S, C> Menu<T, IT, VG, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
VG: MenuItemCollection<R>,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
pub fn interact( &mut self, input: <IT::InputAdapter as InputAdapter>::Input, ) -> Option<R>
pub fn state(&self) -> MenuState<IT::InputAdapter, P, S>
Source§impl<T, IT, VG, R, P, S, C> Menu<T, IT, VG, R, P, S, C>where
T: AsRef<str>,
R: Copy,
IT: InputAdapterSource<R>,
VG: MenuItemCollection<R>,
C: Theme,
P: SelectionIndicatorController,
S: IndicatorStyle,
impl<T, IT, VG, R, P, S, C> Menu<T, IT, VG, R, P, S, C>where
T: AsRef<str>,
R: Copy,
IT: InputAdapterSource<R>,
VG: MenuItemCollection<R>,
C: Theme,
P: SelectionIndicatorController,
S: IndicatorStyle,
pub fn selected_value(&self) -> R
Source§impl<T, IT, VG, R, C, P, S> Menu<T, IT, VG, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
VG: ViewGroup + MenuItemCollection<R>,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
impl<T, IT, VG, R, C, P, S> Menu<T, IT, VG, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
VG: ViewGroup + MenuItemCollection<R>,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
pub fn update(&mut self, display: &impl Dimensions)
Trait Implementations§
Source§impl<T, IT, VG, R, C, P, S> Drawable for Menu<T, IT, VG, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
VG: ViewGroup + MenuItemCollection<R>,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
impl<T, IT, VG, R, C, P, S> Drawable for Menu<T, IT, VG, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
VG: ViewGroup + MenuItemCollection<R>,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
Auto Trait Implementations§
impl<T, IT, VG, R, P, S, C> Freeze for Menu<T, IT, VG, R, P, S, C>where
T: Freeze,
VG: Freeze,
C: Freeze,
IT: Freeze,
<<IT as InputAdapterSource<R>>::InputAdapter as InputAdapter>::State: Freeze,
P: Freeze,
S: Freeze,
<P as SelectionIndicatorController>::State: Freeze,
<S as IndicatorStyle>::State: Freeze,
impl<T, IT, VG, R, P, S, C> !RefUnwindSafe for Menu<T, IT, VG, R, P, S, C>
impl<T, IT, VG, R, P, S, C> Send for Menu<T, IT, VG, R, P, S, C>where
T: Send,
VG: Send,
R: Send,
C: Send,
IT: Send,
<<IT as InputAdapterSource<R>>::InputAdapter as InputAdapter>::State: Send,
P: Send,
S: Send,
<P as SelectionIndicatorController>::State: Send,
<S as IndicatorStyle>::State: Send,
impl<T, IT, VG, R, P, S, C> Sync for Menu<T, IT, VG, R, P, S, C>where
T: Sync,
VG: Sync,
R: Sync,
C: Sync,
IT: Sync,
<<IT as InputAdapterSource<R>>::InputAdapter as InputAdapter>::State: Sync,
P: Sync,
S: Sync,
<P as SelectionIndicatorController>::State: Sync,
<S as IndicatorStyle>::State: Sync,
impl<T, IT, VG, R, P, S, C> Unpin for Menu<T, IT, VG, R, P, S, C>where
T: Unpin,
VG: Unpin,
R: Unpin,
C: Unpin,
IT: Unpin,
<<IT as InputAdapterSource<R>>::InputAdapter as InputAdapter>::State: Unpin,
P: Unpin,
S: Unpin,
<P as SelectionIndicatorController>::State: Unpin,
<S as IndicatorStyle>::State: Unpin,
impl<T, IT, VG, R, P, S, C> !UnwindSafe for Menu<T, IT, VG, R, P, S, C>
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> 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.