[−][src]Struct iced_native::overlay::menu::Menu
A list of selectable options.
Implementations
impl<'a, T, Renderer> Menu<'a, T, Renderer> where
T: ToString + Clone,
Renderer: Renderer + 'a,
[src]
T: ToString + Clone,
Renderer: Renderer + 'a,
pub fn new(
state: &'a mut State,
options: &'a [T],
hovered_option: &'a mut Option<usize>,
last_selection: &'a mut Option<T>
) -> Self
[src]
state: &'a mut State,
options: &'a [T],
hovered_option: &'a mut Option<usize>,
last_selection: &'a mut Option<T>
) -> Self
Creates a new Menu
with the given State
, a list of options, and
the message to produced when an option is selected.
pub fn width(self, width: u16) -> Self
[src]
Sets the width of the Menu
.
pub fn padding(self, padding: u16) -> Self
[src]
Sets the padding of the Menu
.
pub fn text_size(self, text_size: u16) -> Self
[src]
Sets the text size of the Menu
.
pub fn font(self, font: Renderer::Font) -> Self
[src]
Sets the font of the Menu
.
pub fn style(self, style: impl Into<<Renderer as Renderer>::Style>) -> Self
[src]
Sets the style of the Menu
.
pub fn overlay<Message: 'a>(
self,
position: Point,
target_height: f32
) -> Element<'a, Message, Renderer>
[src]
self,
position: Point,
target_height: f32
) -> Element<'a, Message, Renderer>
Auto Trait Implementations
impl<'a, T, Renderer> RefUnwindSafe for Menu<'a, T, Renderer> where
T: RefUnwindSafe,
<Renderer as Renderer>::Font: RefUnwindSafe,
<Renderer as Renderer>::Style: RefUnwindSafe,
T: RefUnwindSafe,
<Renderer as Renderer>::Font: RefUnwindSafe,
<Renderer as Renderer>::Style: RefUnwindSafe,
impl<'a, T, Renderer> Send for Menu<'a, T, Renderer> where
T: Send + Sync,
<Renderer as Renderer>::Font: Send,
<Renderer as Renderer>::Style: Send,
T: Send + Sync,
<Renderer as Renderer>::Font: Send,
<Renderer as Renderer>::Style: Send,
impl<'a, T, Renderer> Sync for Menu<'a, T, Renderer> where
T: Sync,
<Renderer as Renderer>::Font: Sync,
<Renderer as Renderer>::Style: Sync,
T: Sync,
<Renderer as Renderer>::Font: Sync,
<Renderer as Renderer>::Style: Sync,
impl<'a, T, Renderer> Unpin for Menu<'a, T, Renderer> where
<Renderer as Renderer>::Font: Unpin,
<Renderer as Renderer>::Style: Unpin,
<Renderer as Renderer>::Font: Unpin,
<Renderer as Renderer>::Style: Unpin,
impl<'a, T, Renderer> !UnwindSafe for Menu<'a, T, Renderer>
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,