MyGUI: MyGUI_MouseButton.h Source File

MyGUI 3.4.3

MyGUI_MouseButton.h
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#ifndef MYGUI_MOUSE_BUTTON_H_
8#define MYGUI_MOUSE_BUTTON_H_
9
10#include "MyGUI_Prerequest.h"
11
12namespace MyGUI
13{
14
15 struct MYGUI_EXPORT MouseButton
16 {
17 enum Enum
18 {
19 None = -1,
20
21 Left = 0,
22 Right,
23 Middle,
24
25 Button0 = 0,
26 Button1,
27 Button2,
28 Button3,
29 Button4,
30 Button5,
31 Button6,
32 Button7,
33 MAX
34 };
35
36 MouseButton(Enum _value = None) :
37 mValue(_value)
38 {
39 }
40
41 friend bool operator==(MouseButton const& a, MouseButton const& b)
42 {
43 return a.mValue == b.mValue;
44 }
45
46 friend bool operator!=(MouseButton const& a, MouseButton const& b)
47 {
48 return a.mValue != b.mValue;
49 }
50
51 int getValue() const
52 {
53 return mValue;
54 }
55
56 private:
57 Enum mValue;
58 };
59
60} // namespace MyGUI
61
62#endif // MYGUI_MOUSE_BUTTON_H_
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::MouseButton::operator!=
friend bool operator!=(MouseButton const &a, MouseButton const &b)
Definition MyGUI_MouseButton.h:46
MyGUI::MouseButton::Enum
Enum
Definition MyGUI_MouseButton.h:18
MyGUI::MouseButton::Middle
@ Middle
Definition MyGUI_MouseButton.h:23
MyGUI::MouseButton::Button5
@ Button5
Definition MyGUI_MouseButton.h:30
MyGUI::MouseButton::Button0
@ Button0
Definition MyGUI_MouseButton.h:25
MyGUI::MouseButton::Button6
@ Button6
Definition MyGUI_MouseButton.h:31
MyGUI::MouseButton::Button1
@ Button1
Definition MyGUI_MouseButton.h:26
MyGUI::MouseButton::Button2
@ Button2
Definition MyGUI_MouseButton.h:27
MyGUI::MouseButton::Right
@ Right
Definition MyGUI_MouseButton.h:22
MyGUI::MouseButton::Left
@ Left
Definition MyGUI_MouseButton.h:21
MyGUI::MouseButton::Button3
@ Button3
Definition MyGUI_MouseButton.h:28
MyGUI::MouseButton::None
@ None
Definition MyGUI_MouseButton.h:19
MyGUI::MouseButton::MAX
@ MAX
Definition MyGUI_MouseButton.h:33
MyGUI::MouseButton::Button4
@ Button4
Definition MyGUI_MouseButton.h:29
MyGUI::MouseButton::Button7
@ Button7
Definition MyGUI_MouseButton.h:32
MyGUI::MouseButton::operator==
friend bool operator==(MouseButton const &a, MouseButton const &b)
Definition MyGUI_MouseButton.h:41
MyGUI::MouseButton::MouseButton
MouseButton(Enum _value=None)
Definition MyGUI_MouseButton.h:36
MyGUI::MouseButton::getValue
int getValue() const
Definition MyGUI_MouseButton.h:51