Struct druid::widget::MouseEvent

source ·
pub struct MouseEvent {
    pub x: f32,
    pub y: f32,
    pub mods: u32,
    pub which: MouseButton,
    pub count: u32,
}

Fields

x: f32

X coordinate in px units, relative to top left of widget.

y: f32

Y coordinate in px units, relative to top left of widget.

mods: u32

The modifiers, which have the same interpretation as the raw WM message.

TODO: rationalize this with mouse mods.

which: MouseButton

Which mouse button was pressed.

count: u32

Count of multiple clicks, is 0 for mouse up event.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.