00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __MYGUI_INPUT_DEFINE_H__
00024 #define __MYGUI_INPUT_DEFINE_H__
00025
00026 #include "MyGUI_Prerequest.h"
00027
00028 namespace MyGUI
00029 {
00030
00031 struct MYGUI_EXPORT MouseButton
00032 {
00033 enum Enum
00034 {
00035 Left = 0,
00036 Right,
00037 Middle,
00038
00039 Button0 = 0,
00040 Button1,
00041 Button2,
00042 Button3,
00043 Button4,
00044 Button5,
00045 Button6,
00046 Button7,
00047
00048 None = -1
00049 };
00050
00051 MouseButton(Enum _value = None) : value(_value) { }
00052
00053 friend bool operator == (MouseButton const& a, MouseButton const& b) { return a.value == b.value; }
00054 friend bool operator != (MouseButton const& a, MouseButton const& b) { return a.value != b.value; }
00055
00056 int toValue() const { return (int)value; }
00057
00058 private:
00059 Enum value;
00060 };
00061
00062 struct MYGUI_EXPORT KeyCode
00063 {
00064 enum Enum
00065 {
00066 None = 0x00,
00067 Escape = 0x01,
00068 One = 0x02,
00069 Two = 0x03,
00070 Three = 0x04,
00071 Four = 0x05,
00072 Five = 0x06,
00073 Six = 0x07,
00074 Seven = 0x08,
00075 Eight = 0x09,
00076 Nine = 0x0A,
00077 Zero = 0x0B,
00078 Minus = 0x0C,
00079 Equals = 0x0D,
00080 Backspace = 0x0E,
00081 Tab = 0x0F,
00082 Q = 0x10,
00083 W = 0x11,
00084 E = 0x12,
00085 R = 0x13,
00086 T = 0x14,
00087 Y = 0x15,
00088 U = 0x16,
00089 I = 0x17,
00090 O = 0x18,
00091 P = 0x19,
00092 LeftBracket = 0x1A,
00093 RightBracket = 0x1B,
00094 Return = 0x1C,
00095 LeftControl = 0x1D,
00096 A = 0x1E,
00097 S = 0x1F,
00098 D = 0x20,
00099 F = 0x21,
00100 G = 0x22,
00101 H = 0x23,
00102 J = 0x24,
00103 K = 0x25,
00104 L = 0x26,
00105 Semicolon = 0x27,
00106 Apostrophe = 0x28,
00107 Grave = 0x29,
00108 LeftShift = 0x2A,
00109 Backslash = 0x2B,
00110 Z = 0x2C,
00111 X = 0x2D,
00112 C = 0x2E,
00113 V = 0x2F,
00114 B = 0x30,
00115 N = 0x31,
00116 M = 0x32,
00117 Comma = 0x33,
00118 Period = 0x34,
00119 Slash = 0x35,
00120 RightShift = 0x36,
00121 Multiply = 0x37,
00122 LeftAlt = 0x38,
00123 Space = 0x39,
00124 Capital = 0x3A,
00125 F1 = 0x3B,
00126 F2 = 0x3C,
00127 F3 = 0x3D,
00128 F4 = 0x3E,
00129 F5 = 0x3F,
00130 F6 = 0x40,
00131 F7 = 0x41,
00132 F8 = 0x42,
00133 F9 = 0x43,
00134 F10 = 0x44,
00135 NumLock = 0x45,
00136 ScrollLock = 0x46,
00137 Numpad7 = 0x47,
00138 Numpad8 = 0x48,
00139 Numpad9 = 0x49,
00140 Subtract = 0x4A,
00141 Numpad4 = 0x4B,
00142 Numpad5 = 0x4C,
00143 Numpad6 = 0x4D,
00144 Add = 0x4E,
00145 Numpad1 = 0x4F,
00146 Numpad2 = 0x50,
00147 Numpad3 = 0x51,
00148 Numpad0 = 0x52,
00149 Decimal = 0x53,
00150 OEM_102 = 0x56,
00151 F11 = 0x57,
00152 F12 = 0x58,
00153 F13 = 0x64,
00154 F14 = 0x65,
00155 F15 = 0x66,
00156 Kana = 0x70,
00157 ABNT_C1 = 0x73,
00158 Convert = 0x79,
00159 NoConvert = 0x7B,
00160 Yen = 0x7D,
00161 ABNT_C2 = 0x7E,
00162 NumpadEquals = 0x8D,
00163 PrevTrack = 0x90,
00164 At = 0x91,
00165 Colon = 0x92,
00166 Underline = 0x93,
00167 Kanji = 0x94,
00168 Stop = 0x95,
00169 AX = 0x96,
00170 Unlabeled = 0x97,
00171 NextTrack = 0x99,
00172 NumpadEnter = 0x9C,
00173 RightControl = 0x9D,
00174 Mute = 0xA0,
00175 Calculator = 0xA1,
00176 PlayPause = 0xA2,
00177 MediaStop = 0xA4,
00178 VolumeDown = 0xAE,
00179 VolumeUp = 0xB0,
00180 WebHome = 0xB2,
00181 NumpadComma = 0xB3,
00182 Divide = 0xB5,
00183 SysRq = 0xB7,
00184 RightAlt = 0xB8,
00185 Pause = 0xC5,
00186 Home = 0xC7,
00187 ArrowUp = 0xC8,
00188 PageUp = 0xC9,
00189 ArrowLeft = 0xCB,
00190 ArrowRight = 0xCD,
00191 End = 0xCF,
00192 ArrowDown = 0xD0,
00193 PageDown = 0xD1,
00194 Insert = 0xD2,
00195 Delete = 0xD3,
00196 LeftWindows = 0xDB,
00197 RightWindow = 0xDC,
00198 RightWindows = 0xDC,
00199 AppMenu = 0xDD,
00200 Power = 0xDE,
00201 Sleep = 0xDF,
00202 Wake = 0xE3,
00203 WebSearch = 0xE5,
00204 WebFavorites = 0xE6,
00205 WebRefresh = 0xE7,
00206 WebStop = 0xE8,
00207 WebForward = 0xE9,
00208 WebBack = 0xEA,
00209 MyComputer = 0xEB,
00210 Mail = 0xEC,
00211 MediaSelect = 0xED
00212 };
00213
00214 KeyCode(Enum _value = None) : value(_value) { }
00215
00216 friend bool operator == (KeyCode const& a, KeyCode const& b) { return a.value == b.value; }
00217 friend bool operator != (KeyCode const& a, KeyCode const& b) { return a.value != b.value; }
00218
00219 int toValue() const { return (int)value; }
00220
00221 private:
00222 Enum value;
00223 };
00224
00225 }
00226
00227 #endif // __MYGUI_INPUT_DEFINE_H__