Nui
Loading...
Searching...
No Matches
mouse_event.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Nui::WebApi
6{
12 class MouseEvent : public UiEvent
13 {
14 public:
15 explicit MouseEvent(Nui::val event);
16
21 bool altKey() const;
22
28 int button() const;
29
35 int buttons() const;
36
41 double clientX() const;
42
47 double clientY() const;
48
53 double x() const;
54
59 double y() const;
60
64 double movementX() const;
65
69 double movementY() const;
70
75 double offsetX() const;
76
80 double offsetY() const;
81
85 double pageX() const;
86
90 double pageY() const;
91
96 double screenX() const;
97
102 double screenY() const;
103
107 bool ctrlKey() const;
108
112 bool shiftKey() const;
113
118 bool metaKey() const;
119
125 std::optional<Nui::val> relatedTarget() const;
126 };
127}
A mouse event class.
Definition mouse_event.hpp:13
bool shiftKey() const
Returns a boolean value that is true if the Shift key was active when the key event was generated.
Definition mouse_event.cpp:73
bool altKey() const
Returns a boolean value that is true if the Alt (Option or ⌥ on macOS) key was active when the key ev...
Definition mouse_event.cpp:9
double movementY() const
The Y coordinate of the mouse pointer relative to the position of the last mousemove event.
Definition mouse_event.cpp:41
double pageY() const
The Y coordinate of the mouse pointer relative to the whole document.
Definition mouse_event.cpp:57
int button() const
The button number that was pressed or released (if applicable) when the mouse event was fired.
Definition mouse_event.cpp:13
bool metaKey() const
Returns a boolean value that is true if the Meta key (on Mac keyboards, the ⌘ Command key; on Windows...
Definition mouse_event.cpp:77
double clientX() const
The X coordinate of the mouse pointer in viewport coordinates.
Definition mouse_event.cpp:21
double offsetY() const
The Y coordinate of the mouse pointer relative to the position of the padding edge of the target node...
Definition mouse_event.cpp:49
double pageX() const
The X coordinate of the mouse pointer relative to the whole document.
Definition mouse_event.cpp:53
double x() const
The X coordinate of the mouse pointer in viewport coordinates.
Definition mouse_event.cpp:29
double screenX() const
The X coordinate of the mouse pointer in screen coordinates.
Definition mouse_event.cpp:61
double clientY() const
The Y coordinate of the mouse pointer in viewport coordinates.
Definition mouse_event.cpp:25
std::optional< Nui::val > relatedTarget() const
The secondary target for the event, if there is one.
Definition mouse_event.cpp:81
int buttons() const
The buttons being pressed (if any) when the mouse event was fired.
Definition mouse_event.cpp:17
bool ctrlKey() const
Returns a boolean value that is true if the Ctrl key was active when the key event was generated.
Definition mouse_event.cpp:69
double offsetX() const
The X coordinate of the mouse pointer relative to the position of the padding edge of the target node...
Definition mouse_event.cpp:45
double y() const
The Y coordinate of the mouse pointer in viewport coordinates.
Definition mouse_event.cpp:33
double screenY() const
The Y coordinate of the mouse pointer in screen coordinates.
Definition mouse_event.cpp:65
double movementX() const
The X coordinate of the mouse pointer relative to the position of the last mousemove event.
Definition mouse_event.cpp:37
The UIEvent interface represents simple user interface events.
Definition ui_event.hpp:14
Definition abort_controller.hpp:8
emscripten::val val
Definition val.hpp:5