[][src]Struct druid::MouseEvent

pub struct MouseEvent {
    pub pos: Point,
    pub window_pos: Point,
    pub mods: KeyModifiers,
    pub count: u32,
    pub button: MouseButton,
}

The state of the mouse for a click, mouse-up, or move event.

In druid, unlike in druid_shell, we treat the widget's coordinate space and the window's coordinate space separately.

Fields

pos: Point

The position of the mouse in the coordinate space of the receiver.

window_pos: Point

The position of the mouse in the coordinate space of the window.

mods: KeyModifiers

Keyboard modifiers at the time of the mouse event.

count: u32

The number of mouse clicks associated with this event. This will always be 0 for a mouse-up event.

button: MouseButton

The currently pressed button in the case of a move or click event, or the released button in the case of a mouse-up event.

Trait Implementations

impl Clone for MouseEvent[src]

impl Debug for MouseEvent[src]

impl From<MouseEvent> for MouseEvent[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.