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 CEGUIEXPORT 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 RightWindows =0xDC,
00179 AppMenu =0xDD,
00180 Power =0xDE,
00181 Sleep =0xDF,
00182 Wake =0xE3,
00183 WebSearch =0xE5,
00184 WebFavorites =0xE6,
00185 WebRefresh =0xE7,
00186 WebStop =0xE8,
00187 WebForward =0xE9,
00188 WebBack =0xEA,
00189 MyComputer =0xEB,
00190 Mail =0xEC,
00191 MediaSelect =0xED
00192 };
00193
00194 };
00195
00196
00201 enum MouseButton
00202 {
00203 LeftButton,
00204 RightButton,
00205 MiddleButton,
00206 X1Button,
00207 X2Button,
00208 MouseButtonCount,
00209 NoButton
00210 };
00211
00212
00217 enum SystemKey
00218 {
00219 LeftMouse = 0x0001,
00220 RightMouse = 0x0002,
00221 Shift = 0x0004,
00222 Control = 0x0008,
00223 MiddleMouse = 0x0010,
00224 X1Mouse = 0x0020,
00225 X2Mouse = 0x0040,
00226 Alt = 0x0080
00227 };
00228
00229
00235 class CEGUIEXPORT WindowEventArgs : public EventArgs
00236 {
00237 public:
00238 WindowEventArgs(Window* wnd) : window(wnd) {}
00239
00240 Window* window;
00241 };
00242
00243
00249 class CEGUIEXPORT MouseEventArgs : public WindowEventArgs
00250 {
00251 public:
00252 MouseEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00253
00254 Point position;
00255 Vector2 moveDelta;
00256 MouseButton button;
00257 uint sysKeys;
00258 float wheelChange;
00259 uint clickCount;
00260 };
00261
00262
00268 class CEGUIEXPORT MouseCursorEventArgs : public EventArgs
00269 {
00270 public:
00271 MouseCursorEventArgs(MouseCursor* cursor) : mouseCursor(cursor) {}
00272
00273 MouseCursor* mouseCursor;
00274 const Image* image;
00275 };
00276
00277
00283 class CEGUIEXPORT KeyEventArgs : public WindowEventArgs
00284 {
00285 public:
00286 KeyEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00287
00288 utf32 codepoint;
00289 Key::Scan scancode;
00290 uint sysKeys;
00291 };
00292
00293
00298 class CEGUIEXPORT ActivationEventArgs : public WindowEventArgs
00299 {
00300 public:
00301 ActivationEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00302
00303 Window* otherWindow;
00304 };
00305
00310 class CEGUIEXPORT DragDropEventArgs : public WindowEventArgs
00311 {
00312 public:
00313 DragDropEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00314 DragContainer* dragDropItem;
00315 };
00316
00317 }
00318
00319
00320 #endif // end of guard _CEGUIInputEvent_h_