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
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
sourceimpl Clone for UnixMenuItem
impl Clone for UnixMenuItem
sourcefn clone(&self) -> UnixMenuItem
fn clone(&self) -> UnixMenuItem
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for UnixMenuItem
impl Send for UnixMenuItem
impl Sync for UnixMenuItem
impl Unpin for UnixMenuItem
impl UnwindSafe for UnixMenuItem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more