pub struct MenuBuilder<T, IT, LL, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
S: IndicatorStyle,
P: SelectionIndicatorController,
C: Theme,{ /* private fields */ }
Implementations§
Source§impl<T, R, S, IT, P, C> MenuBuilder<T, IT, NoItems, R, P, S, C>where
T: AsRef<str>,
S: IndicatorStyle,
IT: InputAdapterSource<R>,
P: SelectionIndicatorController,
C: Theme,
impl<T, R, S, IT, P, C> MenuBuilder<T, IT, NoItems, R, P, S, C>where
T: AsRef<str>,
S: IndicatorStyle,
IT: InputAdapterSource<R>,
P: SelectionIndicatorController,
C: Theme,
Source§impl<T, IT, R, P, S, C> MenuBuilder<T, IT, NoItems, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
impl<T, IT, R, P, S, C> MenuBuilder<T, IT, NoItems, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
Sourcepub fn add_section_title<T2: AsRef<str>>(
self,
title: T2,
) -> MenuBuilder<T, IT, Chain<MenuItem<T2, R, (), false>>, R, P, S, C>
pub fn add_section_title<T2: AsRef<str>>( self, title: T2, ) -> MenuBuilder<T, IT, Chain<MenuItem<T2, R, (), false>>, R, P, S, C>
Append a non-selectable menu item to the menu with the given title.
Sourcepub fn add_item<T2: AsRef<str>, V: SelectValue>(
self,
title: T2,
value: V,
converter: fn(_: V) -> R,
) -> MenuBuilder<T, IT, Chain<MenuItem<T2, R, V, true>>, R, P, S, C>
pub fn add_item<T2: AsRef<str>, V: SelectValue>( self, title: T2, value: V, converter: fn(_: V) -> R, ) -> MenuBuilder<T, IT, Chain<MenuItem<T2, R, V, true>>, R, P, S, C>
Append an interactable menu item to the menu.
The menu item will initially have the given value. Upon interaction, the value will be
updated according to the value type’s next
method. The menu will use the callback
passed in the third argument to convert the value to the global return type.
Append an arbitrary MenuListItem
implementation to the menu.
Append multiple arbitrary MenuListItem
implementations to the menu.
Source§impl<T, IT, CE, R, P, S, C> MenuBuilder<T, IT, CE, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
CE: MenuItemCollection<R> + ChainElement,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
impl<T, IT, CE, R, P, S, C> MenuBuilder<T, IT, CE, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
CE: MenuItemCollection<R> + ChainElement,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
Sourcepub fn add_section_title<T2: AsRef<str>>(
self,
title: T2,
) -> MenuBuilder<T, IT, Link<MenuItem<T2, R, (), false>, CE>, R, P, S, C>
pub fn add_section_title<T2: AsRef<str>>( self, title: T2, ) -> MenuBuilder<T, IT, Link<MenuItem<T2, R, (), false>, CE>, R, P, S, C>
Append a non-selectable menu item to the menu with the given title.
Sourcepub fn add_item<T2: AsRef<str>, V: SelectValue>(
self,
title: T2,
value: V,
converter: fn(_: V) -> R,
) -> MenuBuilder<T, IT, Link<MenuItem<T2, R, V, true>, CE>, R, P, S, C>
pub fn add_item<T2: AsRef<str>, V: SelectValue>( self, title: T2, value: V, converter: fn(_: V) -> R, ) -> MenuBuilder<T, IT, Link<MenuItem<T2, R, V, true>, CE>, R, P, S, C>
Append an interactable menu item to the menu.
The menu item will initially have the given value. Upon interaction, the value will be
updated according to the value type’s next
method. The menu will use the callback
passed in the third argument to convert the value to the global return type.
Append an arbitrary MenuListItem
implementation to the menu.
Append multiple arbitrary MenuListItem
implementations to the menu.
Source§impl<T, IT, VG, R, P, S, C> MenuBuilder<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, P, S, C> MenuBuilder<T, IT, VG, R, P, S, C>where
T: AsRef<str>,
IT: InputAdapterSource<R>,
VG: ViewGroup + MenuItemCollection<R>,
P: SelectionIndicatorController,
S: IndicatorStyle,
C: Theme,
Sourcepub fn build(self) -> Menu<T, IT, VG, R, P, S, C>
pub fn build(self) -> Menu<T, IT, VG, R, P, S, C>
Builds the menu and initializes it to a default state.
Sourcepub fn build_with_state(
self,
state: MenuState<IT::InputAdapter, P, S>,
) -> Menu<T, IT, VG, R, P, S, C>
pub fn build_with_state( self, state: MenuState<IT::InputAdapter, P, S>, ) -> Menu<T, IT, VG, R, P, S, C>
Builds the menu, assigning to it the given state.