pub trait INSMenuItem: PNSObject {
Show 15 methods
// Provided methods
fn p_is_enabled(&self) -> bool { ... }
fn p_set_enabled(&mut self, enabled: bool) { ... }
fn p_is_hidden(&self) -> bool { ... }
fn p_set_hidden(&mut self, hidden: bool) { ... }
fn p_is_hidden_or_has_hidden_ancestor(&self) -> bool { ... }
fn p_target(&self) -> id { ... }
fn p_set_target(&mut self, target: id) { ... }
fn p_action(&self) -> Sel { ... }
fn p_set_action(&mut self, action: Sel) { ... }
fn p_title(&self) -> NSString { ... }
fn p_set_title(&mut self, title: NSString) { ... }
fn p_submenu(&self) -> NSMenu { ... }
fn p_set_submenu(&mut self, submenu: NSMenu) { ... }
fn p_has_submenu(&self) -> bool { ... }
fn p_parent_item(&self) -> Option<NSMenuItem> { ... }
}Expand description
A trait containing all the methods for NSMenuItem
Provided Methods§
Sourcefn p_is_enabled(&self) -> bool
fn p_is_enabled(&self) -> bool
A Boolean value that indicates whether the menu item is enabled.
Sourcefn p_set_enabled(&mut self, enabled: bool)
fn p_set_enabled(&mut self, enabled: bool)
Sets whether the menu item is enabled.
A Boolean value that indicates whether the menu item is hidden.
Sets whether the menu item is hidden.
A Boolean value that indicates whether the menu item or any of its superitems is hidden.
Sourcefn p_set_target(&mut self, target: id)
fn p_set_target(&mut self, target: id)
Sets the menu item’s target.
Sourcefn p_set_action(&mut self, action: Sel)
fn p_set_action(&mut self, action: Sel)
Sets the menu item’s action-method selector.
Sourcefn p_set_title(&mut self, title: NSString)
fn p_set_title(&mut self, title: NSString)
Sets the menu item’s title.
The submenu of the menu item.
Sets the submenu of the menu item.
A Boolean value that indicates whether the menu item has a submenu.
Sourcefn p_parent_item(&self) -> Option<NSMenuItem>
fn p_parent_item(&self) -> Option<NSMenuItem>
The menu item whose submenu contains the receiver.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".