#[non_exhaustive]pub enum TrayIconEvent {
Click {
id: TrayIconId,
position: PhysicalPosition<f64>,
rect: Rect,
button: MouseButton,
button_state: MouseButtonState,
},
DoubleClick {
id: TrayIconId,
position: PhysicalPosition<f64>,
rect: Rect,
button: MouseButton,
},
Enter {
id: TrayIconId,
position: PhysicalPosition<f64>,
rect: Rect,
},
Move {
id: TrayIconId,
position: PhysicalPosition<f64>,
rect: Rect,
},
Leave {
id: TrayIconId,
position: PhysicalPosition<f64>,
rect: Rect,
},
}
desktop
and crate feature tray-icon
only.Expand description
Describes a tray icon event.
§Platform-specific:
- Linux: Unsupported. The event is not emmited even though the icon is shown and will still show a context menu on right click.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Click
A click happened on the tray icon.
Fields
id: TrayIconId
Id of the tray icon which triggered this event.
position: PhysicalPosition<f64>
Physical Position of this event.
Mouse button that triggered this event.
Mouse button state when this event was triggered.
DoubleClick
A double click happened on the tray icon. Windows Only
Fields
id: TrayIconId
Id of the tray icon which triggered this event.
position: PhysicalPosition<f64>
Physical Position of this event.
Mouse button that triggered this event.
Enter
The mouse entered the tray icon region.
Fields
id: TrayIconId
Id of the tray icon which triggered this event.
position: PhysicalPosition<f64>
Physical Position of this event.
Move
The mouse moved over the tray icon region.
Fields
id: TrayIconId
Id of the tray icon which triggered this event.
position: PhysicalPosition<f64>
Physical Position of this event.
Leave
The mouse left the tray icon region.
Fields
id: TrayIconId
Id of the tray icon which triggered this event.
position: PhysicalPosition<f64>
Physical Position of this event.
Implementations§
source§impl TrayIconEvent
impl TrayIconEvent
sourcepub fn id(&self) -> &TrayIconId
pub fn id(&self) -> &TrayIconId
Get the id of the tray icon that triggered this event.
Trait Implementations§
source§impl Clone for TrayIconEvent
impl Clone for TrayIconEvent
source§fn clone(&self) -> TrayIconEvent
fn clone(&self) -> TrayIconEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TrayIconEvent
impl Debug for TrayIconEvent
source§impl From<TrayIconEvent> for TrayIconEvent
impl From<TrayIconEvent> for TrayIconEvent
source§fn from(value: TrayIconEvent) -> Self
fn from(value: TrayIconEvent) -> Self
Auto Trait Implementations§
impl Freeze for TrayIconEvent
impl RefUnwindSafe for TrayIconEvent
impl Send for TrayIconEvent
impl Sync for TrayIconEvent
impl Unpin for TrayIconEvent
impl UnwindSafe for TrayIconEvent
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)