pub struct SystemTray { /* private fields */ }Expand description
Keeps the app running beside the clock when its window is closed. Give it to
AppIdentity::close_to_tray.
The menu has two items: one opens the window again, in the state it was left,
and the other really closes the app. Where the system shows no such icon, such as
plain GNOME, closing the window closes the app as usual. Needs the tray feature.
use ravenrs_platform_native::SystemTray;
let tray = SystemTray::new("Notes").open("Open Notes").quit("Quit");Implementations§
Source§impl SystemTray
impl SystemTray
Sourcepub fn new(name: impl Into<String>) -> SystemTray
pub fn new(name: impl Into<String>) -> SystemTray
An icon for the app called name, which is also its tooltip.
Sourcepub fn open(self, label: impl Into<String>) -> SystemTray
pub fn open(self, label: impl Into<String>) -> SystemTray
Sets the words of the item that opens the window again.
Sourcepub fn quit(self, label: impl Into<String>) -> SystemTray
pub fn quit(self, label: impl Into<String>) -> SystemTray
Sets the words of the item that closes the app.
Trait Implementations§
Source§impl Clone for SystemTray
impl Clone for SystemTray
Source§fn clone(&self) -> SystemTray
fn clone(&self) -> SystemTray
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SystemTray
impl RefUnwindSafe for SystemTray
impl Send for SystemTray
impl Sync for SystemTray
impl Unpin for SystemTray
impl UnsafeUnpin for SystemTray
impl UnwindSafe for SystemTray
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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