[−][src]Struct imgui::MenuItem
Builder for a menu item.
Methods
impl<'a> MenuItem<'a>
[src]
pub fn new(label: &ImStr) -> MenuItem
[src]
Construct a new menu item builder.
pub fn shortcut(self, shortcut: &'a ImStr) -> Self
[src]
Sets the menu item shortcut.
Shortcuts are displayed for convenience only and are not automatically handled.
pub fn selected(self, selected: bool) -> Self
[src]
Sets the selected state of the menu item.
Default: false
pub fn enabled(self, enabled: bool) -> Self
[src]
Enables/disables the menu item.
Default: enabled
pub fn build(self, _: &Ui) -> bool
[src]
Builds the menu item.
Returns true if the menu item is activated.
impl<'a> MenuItem<'a>
[src]
pub fn build_with_ref(self, ui: &Ui, selected: &mut bool) -> bool
[src]
Builds the menu item using a mutable reference to selected state.
Trait Implementations
impl<'a> Clone for MenuItem<'a>
[src]
impl<'a> Copy for MenuItem<'a>
[src]
impl<'a> Debug for MenuItem<'a>
[src]
Auto Trait Implementations
impl<'a> Send for MenuItem<'a>
impl<'a> Unpin for MenuItem<'a>
impl<'a> Sync for MenuItem<'a>
impl<'a> RefUnwindSafe for MenuItem<'a>
impl<'a> UnwindSafe for MenuItem<'a>
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,