pub enum MenuRole {
Show 15 variants
Cut,
Copy,
Paste,
SelectAll,
Undo,
Redo,
Delete,
About,
Quit,
Preferences,
Minimize,
CloseWindow,
Fullscreen,
NewWindow,
CheckForUpdates,
}Expand description
A standard/system command. The backend supplies the native item, a selector on AppKit/UIKit
(cut:/copy:/paste:…) or a stock action on GTK/Qt/XAML, so it targets the focused
control, gets the platform’s default label + shortcut, and enables/disables itself
automatically. This is how default items (Edit ▸ Cut/Copy/Paste, the app’s Quit/About) are
accommodated without the app re-implementing them.
Variants§
Cut
Copy
Paste
SelectAll
Undo
Redo
Delete
About
The app’s About command (docs/settings.md). With an About registered through
day::register_about the item lowers to that dispatch action (a Day-rendered About
window, or the toolkit’s own About dialog where one exists); without one AppKit shows
its stock Info.plist panel and the other desktops show the label alone.
Quit
Preferences
Minimize
CloseWindow
Fullscreen
NewWindow
File ▸ New Window (docs/windows.md): opens another window through the builder the
app registered with day::register_new_window. No platform has a native selector
for it, so the item lowers to the registered dispatch action (disabled when none).
CheckForUpdates
Check for Updates… (docs/settings.md): placed directly under About in the macOS App
menu (the Sparkle convention) and in Help elsewhere. Lowers to the action an updater
registered with day::register_check_for_updates; absent from the bar when none did.
Trait Implementations§
impl Copy for MenuRole
impl Eq for MenuRole
impl StructuralPartialEq for MenuRole
Auto Trait Implementations§
impl Freeze for MenuRole
impl RefUnwindSafe for MenuRole
impl Send for MenuRole
impl Sync for MenuRole
impl Unpin for MenuRole
impl UnsafeUnpin for MenuRole
impl UnwindSafe for MenuRole
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more