Loading...
Searching...
No Matches
MouseEvent.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * This file is a part of Ultralight. *
3 * *
4 * See <https://ultralig.ht> for licensing and more. *
5 * *
6 * (C) 2024 Ultralight, Inc. *
7 **************************************************************************************************/
8#pragma once
10
11namespace ultralight {
12
13///
14/// Mouse event representing a change in mouse state.
15///
16/// @see View::FireMouseEvent
17///
19public:
20 ///
21 /// The various MouseEvent types.
22 ///
23 enum Type {
24 ///
25 /// Mouse moved type
26 ///
28
29 ///
30 /// Mouse button pressed type
31 ///
33
34 ///
35 /// Mouse button released type
36 ///
38 };
39
40 ///
41 /// The various mouse button types.
42 ///
49
50 ///
51 /// The type of this MouseEvent
52 ///
54
55 ///
56 /// The current x-position of the mouse, relative to the View
57 ///
58 int x;
59
60 ///
61 /// The current y-position of the mouse, relative to the View
62 ///
63 int y;
64
65 ///
66 /// The mouse button that was pressed/released, if any.
67 ///
69};
70
71} // namespace ultralight
Mouse event representing a change in mouse state.
Definition MouseEvent.h:18
Button
The various mouse button types.
Definition MouseEvent.h:43
@ kButton_None
Definition MouseEvent.h:44
@ kButton_Middle
Definition MouseEvent.h:46
@ kButton_Left
Definition MouseEvent.h:45
@ kButton_Right
Definition MouseEvent.h:47
int y
The current y-position of the mouse, relative to the View.
Definition MouseEvent.h:63
Type
The various MouseEvent types.
Definition MouseEvent.h:23
@ kType_MouseMoved
Mouse moved type.
Definition MouseEvent.h:27
@ kType_MouseDown
Mouse button pressed type.
Definition MouseEvent.h:32
@ kType_MouseUp
Mouse button released type.
Definition MouseEvent.h:37
int x
The current x-position of the mouse, relative to the View.
Definition MouseEvent.h:58
Button button
The mouse button that was pressed/released, if any.
Definition MouseEvent.h:68
Type type
The type of this MouseEvent.
Definition MouseEvent.h:53
Definition App.h:14