[][src]Enum dev_menu::MenuItem

pub enum MenuItem<T> {
    ActionItem(ActionMenuItem<T>),
    SliderItem(SliderMenuItem<T>),
}

A single menu item instance

Variants

ActionItem(ActionMenuItem<T>)SliderItem(SliderMenuItem<T>)

Methods

impl<T> MenuItem<T>[src]

pub fn draw<R, F>(
    &self,
    settings: &T,
    debug_renderer: &mut DebugRenderer<R, F>,
    position: [i32; 2],
    selected: bool
) where
    R: Resources,
    F: Factory<R>, 
[src]

pub fn event<E: GenericEvent>(&mut self, e: &E, settings: &mut T)[src]

pub fn action_item(text: &str, action: Box<dyn Fn(&mut T)>) -> MenuItem<T>[src]

pub fn slider_item(
    label: &str,
    range: [f32; 2],
    step_size: f32,
    value_getter: Box<dyn Fn(&T) -> f32>,
    value_setter: Box<dyn Fn(&mut T, f32)>
) -> MenuItem<T>
[src]

Auto Trait Implementations

impl<T> !Send for MenuItem<T>

impl<T> !Sync for MenuItem<T>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.