MyGUI
3.2.1
|
00001 /* 00002 * This source file is part of MyGUI. For the latest info, see http://mygui.info/ 00003 * Distributed under the MIT License 00004 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) 00005 */ 00006 00007 #ifndef __MYGUI_MOUSE_BUTTON_H__ 00008 #define __MYGUI_MOUSE_BUTTON_H__ 00009 00010 #include "MyGUI_Prerequest.h" 00011 00012 namespace MyGUI 00013 { 00014 00015 struct MYGUI_EXPORT MouseButton 00016 { 00017 enum Enum 00018 { 00019 None = -1, 00020 00021 Left = 0, 00022 Right, 00023 Middle, 00024 00025 Button0 = 0, 00026 Button1, 00027 Button2, 00028 Button3, 00029 Button4, 00030 Button5, 00031 Button6, 00032 Button7, 00033 MAX 00034 }; 00035 00036 MouseButton(Enum _value = None) : 00037 mValue(_value) 00038 { 00039 } 00040 00041 friend bool operator == (MouseButton const& a, MouseButton const& b) 00042 { 00043 return a.mValue == b.mValue; 00044 } 00045 00046 friend bool operator != (MouseButton const& a, MouseButton const& b) 00047 { 00048 return a.mValue != b.mValue; 00049 } 00050 00051 int getValue() const 00052 { 00053 return mValue; 00054 } 00055 00056 private: 00057 Enum mValue; 00058 }; 00059 00060 } // namespace MyGUI 00061 00062 #endif // __MYGUI_MOUSE_BUTTON_H__