pub struct MenuItem {
pub id: String,
pub label: String,
pub value: String,
pub accelerator: String,
pub name: String,
pub state: MenuItemState,
pub menu_item_type: MenuItemType,
pub submenu: Option<Menu>,
/* private fields */
}
Fields§
§id: String
§label: String
§value: String
§accelerator: String
§name: String
§state: MenuItemState
Implementations§
source§impl MenuItem
impl MenuItem
pub fn new( hwnd: HWND, id: &str, label: &str, value: &str, accelerator: &str, name: &str, state: MenuItemState, menu_item_type: MenuItemType, submenu: Option<Menu>, ) -> Self
pub fn disabled(&self) -> bool
pub fn set_disabled(&self, disabled: bool)
pub fn set_label(&self, label: &str)
source§impl MenuItem
impl MenuItem
pub fn new_check_item( id: &str, label: &str, value: &str, accelerator: Option<&str>, checked: bool, disabled: Option<bool>, ) -> Self
pub fn new_radio_item( id: &str, label: &str, value: &str, name: &str, accelerator: Option<&str>, checked: bool, disabled: Option<bool>, ) -> Self
pub fn checked(&self) -> bool
pub fn set_checked(&self, checked: bool)
source§impl MenuItem
impl MenuItem
pub fn new_separator() -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MenuItem
impl RefUnwindSafe for MenuItem
impl Send for MenuItem
impl Sync for MenuItem
impl Unpin for MenuItem
impl UnwindSafe for MenuItem
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more