Enum rg3d_ui::menu::MenuItemContent[][src]

pub enum MenuItemContent<'a, 'b, M: MessageData, C: Control<M, C>> {
    Text {
        text: &'a str,
        shortcut: &'b str,
        icon: Handle<UINode<M, C>>,
    },
    Node(Handle<UINode<M, C>>),
}

Variants

Text

Quick-n-dirty way of building elements. It can cover most of use cases - it builds classic menu item:


| | | | |icon| text |shortcut| |||______|

Fields of Text

text: &'a strshortcut: &'b stricon: Handle<UINode<M, C>>
Node(Handle<UINode<M, C>>)

Allows to put any node into menu item. It allows to customize menu item how needed - i.e. put image in it, or other user control.

Implementations

impl<'a, 'b, M: MessageData, C: Control<M, C>> MenuItemContent<'a, 'b, M, C>[src]

pub fn text_with_shortcut(text: &'a str, shortcut: &'b str) -> Self[src]

pub fn text(text: &'a str) -> Self[src]

Auto Trait Implementations

impl<'a, 'b, M, C> !RefUnwindSafe for MenuItemContent<'a, 'b, M, C>

impl<'a, 'b, M, C> Send for MenuItemContent<'a, 'b, M, C>

impl<'a, 'b, M, C> Sync for MenuItemContent<'a, 'b, M, C>

impl<'a, 'b, M, C> Unpin for MenuItemContent<'a, 'b, M, C> where
    C: Unpin,
    M: Unpin

impl<'a, 'b, M, C> !UnwindSafe for MenuItemContent<'a, 'b, M, C>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,