docs
Docs
C++ API
C API
Search API
Ctrl K
1.4
2.0
latest
1.4
Ultralight C++ API
1.4.0
Toggle main menu visibility
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
9
#include <
Ultralight/Defines.h
>
10
11
namespace
ultralight
{
12
13
///
14
/// Mouse event representing a change in mouse state.
15
///
16
/// @see View::FireMouseEvent
17
///
18
class
MouseEvent
{
19
public
:
20
///
21
/// The various MouseEvent types.
22
///
23
enum
Type
{
24
///
25
/// Mouse moved type
26
///
27
kType_MouseMoved
,
28
29
///
30
/// Mouse button pressed type
31
///
32
kType_MouseDown
,
33
34
///
35
/// Mouse button released type
36
///
37
kType_MouseUp
,
38
};
39
40
///
41
/// The various mouse button types.
42
///
43
enum
Button
{
44
kButton_None
= 0,
45
kButton_Left
,
46
kButton_Middle
,
47
kButton_Right
,
48
};
49
50
///
51
/// The type of this MouseEvent
52
///
53
Type
type
;
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
///
68
Button
button
;
69
};
70
71
}
// namespace ultralight
Defines.h
ultralight::MouseEvent
Mouse event representing a change in mouse state.
Definition
MouseEvent.h:18
ultralight::MouseEvent::Button
Button
The various mouse button types.
Definition
MouseEvent.h:43
ultralight::MouseEvent::kButton_None
@ kButton_None
Definition
MouseEvent.h:44
ultralight::MouseEvent::kButton_Middle
@ kButton_Middle
Definition
MouseEvent.h:46
ultralight::MouseEvent::kButton_Left
@ kButton_Left
Definition
MouseEvent.h:45
ultralight::MouseEvent::kButton_Right
@ kButton_Right
Definition
MouseEvent.h:47
ultralight::MouseEvent::y
int y
The current y-position of the mouse, relative to the View.
Definition
MouseEvent.h:63
ultralight::MouseEvent::Type
Type
The various MouseEvent types.
Definition
MouseEvent.h:23
ultralight::MouseEvent::kType_MouseMoved
@ kType_MouseMoved
Mouse moved type.
Definition
MouseEvent.h:27
ultralight::MouseEvent::kType_MouseDown
@ kType_MouseDown
Mouse button pressed type.
Definition
MouseEvent.h:32
ultralight::MouseEvent::kType_MouseUp
@ kType_MouseUp
Mouse button released type.
Definition
MouseEvent.h:37
ultralight::MouseEvent::x
int x
The current x-position of the mouse, relative to the View.
Definition
MouseEvent.h:58
ultralight::MouseEvent::button
Button button
The mouse button that was pressed/released, if any.
Definition
MouseEvent.h:68
ultralight::MouseEvent::type
Type type
The type of this MouseEvent.
Definition
MouseEvent.h:53
ultralight
Definition
Bitmap.h:14
Ultralight
MouseEvent.h
Docs
C++ API
C API
Version
1.4
2.0
latest
1.4