00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _CEGUIInputEvent_h_
00027 #define _CEGUIInputEvent_h_
00028
00029 #include "CEGUIBase.h"
00030 #include "CEGUIEventArgs.h"
00031 #include "CEGUIString.h"
00032 #include "CEGUIVector.h"
00033
00034
00035
00036 namespace CEGUI
00037 {
00042 struct CEGUIBASE_API Key
00043 {
00044
00045 enum Scan
00046 {
00047 Escape =0x01,
00048 One =0x02,
00049 Two =0x03,
00050 Three =0x04,
00051 Four =0x05,
00052 Five =0x06,
00053 Six =0x07,
00054 Seven =0x08,
00055 Eight =0x09,
00056 Nine =0x0A,
00057 Zero =0x0B,
00058 Minus =0x0C,
00059 Equals =0x0D,
00060 Backspace =0x0E,
00061 Tab =0x0F,
00062 Q =0x10,
00063 W =0x11,
00064 E =0x12,
00065 R =0x13,
00066 T =0x14,
00067 Y =0x15,
00068 U =0x16,
00069 I =0x17,
00070 O =0x18,
00071 P =0x19,
00072 LeftBracket =0x1A,
00073 RightBracket =0x1B,
00074 Return =0x1C,
00075 LeftControl =0x1D,
00076 A =0x1E,
00077 S =0x1F,
00078 D =0x20,
00079 F =0x21,
00080 G =0x22,
00081 H =0x23,
00082 J =0x24,
00083 K =0x25,
00084 L =0x26,
00085 Semicolon =0x27,
00086 Apostrophe =0x28,
00087 Grave =0x29,
00088 LeftShift =0x2A,
00089 Backslash =0x2B,
00090 Z =0x2C,
00091 X =0x2D,
00092 C =0x2E,
00093 V =0x2F,
00094 B =0x30,
00095 N =0x31,
00096 M =0x32,
00097 Comma =0x33,
00098 Period =0x34,
00099 Slash =0x35,
00100 RightShift =0x36,
00101 Multiply =0x37,
00102 LeftAlt =0x38,
00103 Space =0x39,
00104 Capital =0x3A,
00105 F1 =0x3B,
00106 F2 =0x3C,
00107 F3 =0x3D,
00108 F4 =0x3E,
00109 F5 =0x3F,
00110 F6 =0x40,
00111 F7 =0x41,
00112 F8 =0x42,
00113 F9 =0x43,
00114 F10 =0x44,
00115 NumLock =0x45,
00116 ScrollLock =0x46,
00117 Numpad7 =0x47,
00118 Numpad8 =0x48,
00119 Numpad9 =0x49,
00120 Subtract =0x4A,
00121 Numpad4 =0x4B,
00122 Numpad5 =0x4C,
00123 Numpad6 =0x4D,
00124 Add =0x4E,
00125 Numpad1 =0x4F,
00126 Numpad2 =0x50,
00127 Numpad3 =0x51,
00128 Numpad0 =0x52,
00129 Decimal =0x53,
00130 OEM_102 =0x56,
00131 F11 =0x57,
00132 F12 =0x58,
00133 F13 =0x64,
00134 F14 =0x65,
00135 F15 =0x66,
00136 Kana =0x70,
00137 ABNT_C1 =0x73,
00138 Convert =0x79,
00139 NoConvert =0x7B,
00140 Yen =0x7D,
00141 ABNT_C2 =0x7E,
00142 NumpadEquals =0x8D,
00143 PrevTrack =0x90,
00144 At =0x91,
00145 Colon =0x92,
00146 Underline =0x93,
00147 Kanji =0x94,
00148 Stop =0x95,
00149 AX =0x96,
00150 Unlabeled =0x97,
00151 NextTrack =0x99,
00152 NumpadEnter =0x9C,
00153 RightControl =0x9D,
00154 Mute =0xA0,
00155 Calculator =0xA1,
00156 PlayPause =0xA2,
00157 MediaStop =0xA4,
00158 VolumeDown =0xAE,
00159 VolumeUp =0xB0,
00160 WebHome =0xB2,
00161 NumpadComma =0xB3,
00162 Divide =0xB5,
00163 SysRq =0xB7,
00164 RightAlt =0xB8,
00165 Pause =0xC5,
00166 Home =0xC7,
00167 ArrowUp =0xC8,
00168 PageUp =0xC9,
00169 ArrowLeft =0xCB,
00170 ArrowRight =0xCD,
00171 End =0xCF,
00172 ArrowDown =0xD0,
00173 PageDown =0xD1,
00174 Insert =0xD2,
00175 Delete =0xD3,
00176 LeftWindows =0xDB,
00177 RightWindow =0xDC,
00178 AppMenu =0xDD,
00179 Power =0xDE,
00180 Sleep =0xDF,
00181 Wake =0xE3,
00182 WebSearch =0xE5,
00183 WebFavorites =0xE6,
00184 WebRefresh =0xE7,
00185 WebStop =0xE8,
00186 WebForward =0xE9,
00187 WebBack =0xEA,
00188 MyComputer =0xEB,
00189 Mail =0xEC,
00190 MediaSelect =0xED
00191 };
00192
00193 };
00194
00195
00200 enum MouseButton
00201 {
00202 LeftButton,
00203 RightButton,
00204 MiddleButton,
00205 X1Button,
00206 X2Button,
00207 MouseButtonCount,
00208 NoButton
00209 };
00210
00211
00216 enum CEGUIBASE_API SystemKey
00217 {
00218 LeftMouse = 0x01,
00219 RightMouse = 0x02,
00220 Shift = 0x04,
00221 Control = 0x08,
00222 MiddleMouse = 0x10,
00223 X1Mouse = 0x20,
00224 X2Mouse = 0x40,
00225 };
00226
00227
00233 class CEGUIBASE_API WindowEventArgs : public EventArgs
00234 {
00235 public:
00236 WindowEventArgs(Window* wnd) : window(wnd) {}
00237
00238 Window* window;
00239 };
00240
00241
00247 class CEGUIBASE_API MouseEventArgs : public WindowEventArgs
00248 {
00249 public:
00250 MouseEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00251
00252 Point position;
00253 Vector2 moveDelta;
00254 MouseButton button;
00255 uint sysKeys;
00256 float wheelChange;
00257 };
00258
00259
00265 class CEGUIBASE_API MouseCursorEventArgs : public EventArgs
00266 {
00267 public:
00268 MouseCursorEventArgs(MouseCursor* cursor) : mouseCursor(cursor) {}
00269
00270 MouseCursor* mouseCursor;
00271 const Image* image;
00272 };
00273
00274
00280 class CEGUIBASE_API KeyEventArgs : public WindowEventArgs
00281 {
00282 public:
00283 KeyEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00284
00285 utf32 codepoint;
00286 Key::Scan scancode;
00287 uint sysKeys;
00288 };
00289
00290
00295 class CEGUIBASE_API ActivationEventArgs : public WindowEventArgs
00296 {
00297 public:
00298 ActivationEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00299
00300 Window* otherWindow;
00301 };
00302
00303
00304 }
00305
00306
00307 #endif // end of guard _CEGUIInputEvent_h_