pub struct PredefinedMenuItem<R: Runtime>(/* private fields */);Available on
desktop only.Expand description
A predefined (native) menu item which has a predefined behavior by the OS or by this crate.
Implementations§
Source§impl<R: Runtime> PredefinedMenuItem<R>
impl<R: Runtime> PredefinedMenuItem<R>
Sourcepub fn select_all<M: Manager<R>>(
manager: &M,
text: Option<&str>,
) -> Result<Self>
pub fn select_all<M: Manager<R>>( manager: &M, text: Option<&str>, ) -> Result<Self>
SelectAll menu item
Sourcepub fn about<M: Manager<R>>(
manager: &M,
text: Option<&str>,
metadata: Option<AboutMetadata<'_>>,
) -> Result<Self>
pub fn about<M: Manager<R>>( manager: &M, text: Option<&str>, metadata: Option<AboutMetadata<'_>>, ) -> Result<Self>
About app menu item
Sourcepub fn set_text<S: AsRef<str>>(&self, text: S) -> Result<()>
pub fn set_text<S: AsRef<str>>(&self, text: S) -> Result<()>
Set the text for this menu item. text could optionally contain
an & before a character to assign this character as the mnemonic
for this menu item. To display a & without assigning a mnemenonic, use &&.
Sourcepub fn app_handle(&self) -> &AppHandle<R>
pub fn app_handle(&self) -> &AppHandle<R>
The application handle associated with this type.
Trait Implementations§
Source§impl<R: Runtime> Clone for PredefinedMenuItem<R>
impl<R: Runtime> Clone for PredefinedMenuItem<R>
Source§impl<R: Runtime> IsMenuItem<R> for PredefinedMenuItem<R>
impl<R: Runtime> IsMenuItem<R> for PredefinedMenuItem<R>
Auto Trait Implementations§
impl<R> Freeze for PredefinedMenuItem<R>
impl<R> !RefUnwindSafe for PredefinedMenuItem<R>
impl<R> Send for PredefinedMenuItem<R>
impl<R> Sync for PredefinedMenuItem<R>
impl<R> Unpin for PredefinedMenuItem<R>
impl<R> UnsafeUnpin for PredefinedMenuItem<R>
impl<R> !UnwindSafe for PredefinedMenuItem<R>
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