Sparkle 0.0.1
Loading...
Searching...
No Matches
spk_mouse_event.hpp
1#pragma once
2
3#include "structure/system/event/spk_ievent.hpp"
4
5#include "structure/system/device/spk_mouse.hpp"
6
7namespace spk
8{
13 struct MousePressEvent : public IEvent
14 {
17
19 const Mouse &mouse;
20 };
21
25 struct MouseReleaseEvent : public IEvent
26 {
29
31 const Mouse &mouse;
32 };
33
38 {
41
43 const Mouse &mouse;
44 };
45
49 struct MouseMotionEvent : public IEvent
50 {
52 spk::Vector2Int position;
53
55 const Mouse &mouse;
56 };
57
61 struct MouseWheelEvent : public IEvent
62 {
64 float wheel;
65
67 const Mouse &mouse;
68 };
69
73 using MouseEvent = std::variant<
79}
Base event metadata shared by all system events.
Definition spk_ievent.hpp:13
Mouse button double-click event.
Definition spk_mouse_event.hpp:38
const Mouse & mouse
Snapshot of mouse state at double-click time.
Definition spk_mouse_event.hpp:43
Mouse::Button button
Mouse button that triggered the double click.
Definition spk_mouse_event.hpp:40
Captures mouse state at a given instant (buttons, position, wheel).
Definition spk_mouse.hpp:17
Button
Mouse buttons tracked by the input system.
Definition spk_mouse.hpp:22
Mouse move event carrying current position.
Definition spk_mouse_event.hpp:50
spk::Vector2Int position
Current cursor position in window coordinates.
Definition spk_mouse_event.hpp:52
const Mouse & mouse
Snapshot of mouse state at motion time.
Definition spk_mouse_event.hpp:55
Mouse button press event.
Definition spk_mouse_event.hpp:14
const Mouse & mouse
Snapshot of mouse state at press time.
Definition spk_mouse_event.hpp:19
Mouse::Button button
Mouse button that was pressed.
Definition spk_mouse_event.hpp:16
Mouse button release event.
Definition spk_mouse_event.hpp:26
const Mouse & mouse
Snapshot of mouse state at release time.
Definition spk_mouse_event.hpp:31
Mouse::Button button
Mouse button that was released.
Definition spk_mouse_event.hpp:28
Mouse wheel scroll event.
Definition spk_mouse_event.hpp:62
float wheel
Wheel delta expressed in scroll units.
Definition spk_mouse_event.hpp:64
const Mouse & mouse
Snapshot of mouse state at scroll time.
Definition spk_mouse_event.hpp:67