MyGUI_MouseButton.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_MOUSE_BUTTON_H_
#define MYGUI_MOUSE_BUTTON_H_
#include "MyGUI_Prerequest.h"
namespace MyGUI
{
struct MYGUI_EXPORT MouseButton
{
enum Enum
{
None = -1,
Left = 0,
Right,
Middle,
Button0 = 0,
Button1,
Button2,
Button3,
Button4,
Button5,
Button6,
Button7,
MAX
};
MouseButton(Enum _value = None) :
mValue(_value)
{
}
friend bool operator==(MouseButton const& a, MouseButton const& b)
{
return a.mValue == b.mValue;
}
friend bool operator!=(MouseButton const& a, MouseButton const& b)
{
return a.mValue != b.mValue;
}
int getValue() const
{
return mValue;
}
private:
Enum mValue;
};
} // namespace MyGUI
#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