pub struct MenuItemOptions { /* private fields */ }
Implementations§
Source§impl MenuItemOptions
impl MenuItemOptions
pub fn new_with_values( accelerator_works_when_hidden: Option<bool>, accelerator: Option<Accelerator>, after_group_containing: Option<Array>, after: Option<Array>, before_group_containing: Option<Array>, before: Option<Array>, checked: Option<bool>, click: Option<Function>, enabled: Option<bool>, icon: Option<NativeImage>, id: Option<JsString>, kind: Option<JsString>, label: Option<JsString>, register_accelerator: Option<bool>, role: Option<JsString>, sub_label: Option<JsString>, submenu: Option<Menu>, tool_tip: Option<JsString>, visible: Option<bool>, ) -> MenuItemOptions
pub fn new() -> MenuItemOptions
pub fn accelerator(&self) -> Option<Accelerator>
pub fn set_accelerator(&mut self, value: Option<Accelerator>)
pub fn after_group_containing(&self) -> Option<Array>
pub fn set_after_group_containing(&mut self, value: Option<Array>)
pub fn after(&self) -> Option<Array>
pub fn set_after(&mut self, value: Option<Array>)
pub fn before_group_containing(&self) -> Option<Array>
pub fn set_before_group_containing(&mut self, value: Option<Array>)
pub fn before(&self) -> Option<Array>
pub fn set_before(&mut self, value: Option<Array>)
pub fn checked(&self) -> Option<bool>
pub fn set_checked(&mut self, value: Option<bool>)
pub fn click(&self) -> Option<Function>
pub fn set_click(&mut self, value: Option<Function>)
pub fn enabled(&self) -> Option<bool>
pub fn set_enabled(&mut self, value: Option<bool>)
pub fn icon(&self) -> Option<NativeImage>
pub fn set_icon(&mut self, value: Option<NativeImage>)
pub fn id(&self) -> Option<JsString>
pub fn set_id(&mut self, value: Option<JsString>)
pub fn kind(&self) -> Option<JsString>
pub fn set_kind(&mut self, value: Option<JsString>)
pub fn label(&self) -> Option<JsString>
pub fn set_label(&mut self, value: Option<JsString>)
pub fn register_accelerator(&self) -> Option<bool>
pub fn set_register_accelerator(&mut self, value: Option<bool>)
pub fn role(&self) -> Option<JsString>
pub fn set_role(&mut self, value: Option<JsString>)
pub fn sub_label(&self) -> Option<JsString>
pub fn set_sub_label(&mut self, value: Option<JsString>)
pub fn tool_tip(&self) -> Option<JsString>
pub fn set_tool_tip(&mut self, value: Option<JsString>)
pub fn visible(&self) -> Option<bool>
pub fn set_visible(&mut self, value: Option<bool>)
Trait Implementations§
Source§impl Clone for MenuItemOptions
impl Clone for MenuItemOptions
Source§fn clone(&self) -> MenuItemOptions
fn clone(&self) -> MenuItemOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MenuItemOptions
impl Debug for MenuItemOptions
Source§impl Default for MenuItemOptions
impl Default for MenuItemOptions
Source§fn default() -> MenuItemOptions
fn default() -> MenuItemOptions
Returns the “default value” for a type. Read more
Source§impl From<MenuItemOptions> for JsValue
impl From<MenuItemOptions> for JsValue
Source§fn from(value: MenuItemOptions) -> Self
fn from(value: MenuItemOptions) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for MenuItemOptions
impl FromWasmAbi for MenuItemOptions
Source§impl IntoWasmAbi for MenuItemOptions
impl IntoWasmAbi for MenuItemOptions
Source§impl LongRefFromWasmAbi for MenuItemOptions
impl LongRefFromWasmAbi for MenuItemOptions
Source§impl OptionFromWasmAbi for MenuItemOptions
impl OptionFromWasmAbi for MenuItemOptions
Source§impl OptionIntoWasmAbi for MenuItemOptions
impl OptionIntoWasmAbi for MenuItemOptions
Source§impl PartialEq for MenuItemOptions
impl PartialEq for MenuItemOptions
Source§impl RefFromWasmAbi for MenuItemOptions
impl RefFromWasmAbi for MenuItemOptions
Source§type Anchor = RcRef<MenuItemOptions>
type Anchor = RcRef<MenuItemOptions>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for MenuItemOptions
impl RefMutFromWasmAbi for MenuItemOptions
Source§impl TryFromJsValue for MenuItemOptions
impl TryFromJsValue for MenuItemOptions
Source§impl VectorFromWasmAbi for MenuItemOptions
impl VectorFromWasmAbi for MenuItemOptions
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[MenuItemOptions]>
Source§impl VectorIntoJsValue for MenuItemOptions
impl VectorIntoJsValue for MenuItemOptions
fn vector_into_jsvalue(vector: Box<[MenuItemOptions]>) -> JsValue
Source§impl VectorIntoWasmAbi for MenuItemOptions
impl VectorIntoWasmAbi for MenuItemOptions
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[MenuItemOptions]>) -> Self::Abi
Source§impl WasmDescribeVector for MenuItemOptions
impl WasmDescribeVector for MenuItemOptions
impl Eq for MenuItemOptions
impl StructuralPartialEq for MenuItemOptions
impl SupportsConstructor for MenuItemOptions
impl SupportsInstanceProperty for MenuItemOptions
impl SupportsStaticProperty for MenuItemOptions
Auto Trait Implementations§
impl Freeze for MenuItemOptions
impl RefUnwindSafe for MenuItemOptions
impl !Send for MenuItemOptions
impl !Sync for MenuItemOptions
impl Unpin for MenuItemOptions
impl UnwindSafe for MenuItemOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.