pub struct MouseEvent<'h, W: ?Sized = dyn Widget> {
pub handle: &'h Handle<W>,
pub points: Option<TwoPointsPlace>,
pub coord: Coord,
pub kind: MouseEventKind,
pub modifiers: KeyMod,
}Expand description
A mouse event, representing a click, drag, hover, etc.
Fields§
§handle: &'h Handle<W>The Handle where the event took place.
points: Option<TwoPointsPlace>The position on the Text where the mouse was.
coord: CoordThee coordinate on screen where the mouse was.
kind: MouseEventKindWhat the mouse did.
modifiers: KeyModModifiers that were pressed during this mouse event.
Trait Implementations§
Source§impl<'h, W: Clone + ?Sized> Clone for MouseEvent<'h, W>
impl<'h, W: Clone + ?Sized> Clone for MouseEvent<'h, W>
Source§fn clone(&self) -> MouseEvent<'h, W>
fn clone(&self) -> MouseEvent<'h, W>
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<W: 'static + ?Sized> PartialEq<MouseEvent<'_, W>> for OnMouseEvent<W>
impl<W: 'static + ?Sized> PartialEq<MouseEvent<'_, W>> for OnMouseEvent<W>
impl<'h, W: Copy + ?Sized> Copy for MouseEvent<'h, W>
impl<'h, W: ?Sized> StructuralPartialEq for MouseEvent<'h, W>
Auto Trait Implementations§
impl<'h, W> Freeze for MouseEvent<'h, W>where
W: ?Sized,
impl<'h, W = dyn Widget> !RefUnwindSafe for MouseEvent<'h, W>
impl<'h, W> Send for MouseEvent<'h, W>where
W: ?Sized,
impl<'h, W> Sync for MouseEvent<'h, W>where
W: ?Sized,
impl<'h, W> Unpin for MouseEvent<'h, W>where
W: ?Sized,
impl<'h, W> UnsafeUnpin for MouseEvent<'h, W>where
W: ?Sized,
impl<'h, W = dyn Widget> !UnwindSafe for MouseEvent<'h, W>
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