1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use super::*;
#[derive(Clone, Copy, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct MouseWheelEvent {
pub delta: i16,
pub horizontal: bool,
pub modifiers: ControlKeyState,
pub position: Vector2<u16>,
}
impl MouseWheelEvent {
pub fn new() -> MouseWheelEvent {
MouseWheelEvent {
delta: 0,
horizontal: false,
modifiers: ControlKeyState::default(),
position: Vector2::new(0, 0),
}
}
}
impl Into<InputEvent> for MouseWheelEvent {
fn into(self) -> InputEvent {
InputEvent::MouseWheel(self)
}
}