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