Struct minifb::UnixMenuItem

source ·
pub struct UnixMenuItem {
    pub sub_menu: Option<Box<UnixMenu>>,
    pub handle: MenuItemHandle,
    pub id: usize,
    pub label: String,
    pub enabled: bool,
    pub key: Key,
    pub modifier: usize,
}
Expand description

Used for on Unix (Linux, FreeBSD, etc) as menus aren’t supported in a native where there. This structure holds info for each item in a #UnixMenu

Fields

sub_menu: Option<Box<UnixMenu>>

Set to a menu if there is a Item is a sub_menu otherwise None

handle: MenuItemHandle

Handle of the MenuItem

id: usize

Id of the item (set by the user from the outside and should be reported back when pressed)

label: String

Name of the item

enabled: bool

Set to true if enabled otherwise false

key: Key

Shortcut key

modifier: usize

Modifier for the key (Shift, Ctrl, etc)

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.