Struct show_image::event::WindowMouseButtonEvent
source · [−]pub struct WindowMouseButtonEvent {
pub window_id: WindowId,
pub device_id: DeviceId,
pub button: MouseButton,
pub state: ElementState,
pub position: Vec2,
pub prev_position: Vec2,
pub buttons: MouseButtonState,
pub modifiers: ModifiersState,
}
Expand description
A window received mouse input.
Fields
window_id: WindowId
The ID of the window.
device_id: DeviceId
The device that generated the input.
The mouse button that was pressed.
state: ElementState
The new state of the mouse button.
position: Vec2
The current position of the mouse cursor inside the window.
prev_position: Vec2
The position of the mouse cursor before the last movement.
The pressed state of all mouse buttons.
modifiers: ModifiersState
The state of the keyboard modifiers at the time of the event.
Trait Implementations
sourceimpl Clone for WindowMouseButtonEvent
impl Clone for WindowMouseButtonEvent
sourcefn clone(&self) -> WindowMouseButtonEvent
fn clone(&self) -> WindowMouseButtonEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for WindowMouseButtonEvent
impl Debug for WindowMouseButtonEvent
sourceimpl From<WindowMouseButtonEvent> for WindowEvent
impl From<WindowMouseButtonEvent> for WindowEvent
sourcefn from(other: WindowMouseButtonEvent) -> Self
fn from(other: WindowMouseButtonEvent) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for WindowMouseButtonEvent
impl Send for WindowMouseButtonEvent
impl Sync for WindowMouseButtonEvent
impl Unpin for WindowMouseButtonEvent
impl UnwindSafe for WindowMouseButtonEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more