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 {
00207 LeftButton,
00208 RightButton,
00209 MiddleButton,
00210 X1Button,
00211 X2Button,
00212 MouseButtonCount,
00213 NoButton
00214 };
00215
00216
00221 enum SystemKey
00222 {
00223 LeftMouse = 0x0001,
00224 RightMouse = 0x0002,
00225 Shift = 0x0004,
00226 Control = 0x0008,
00227 MiddleMouse = 0x0010,
00228 X1Mouse = 0x0020,
00229 X2Mouse = 0x0040,
00230 Alt = 0x0080
00231 };
00232
00233
00239 class CEGUIEXPORT WindowEventArgs : public EventArgs
00240 {
00241 public:
00242 WindowEventArgs(Window* wnd) : window(wnd) {}
00243
00244 Window* window;
00245 };
00246
00247
00253 class CEGUIEXPORT MouseEventArgs : public WindowEventArgs
00254 {
00255 public:
00256 MouseEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00257
00258 Point position;
00259 Vector2 moveDelta;
00260 MouseButton button;
00261 uint sysKeys;
00262 float wheelChange;
00263 uint clickCount;
00264 };
00265
00266
00272 class CEGUIEXPORT MouseCursorEventArgs : public EventArgs
00273 {
00274 public:
00275 MouseCursorEventArgs(MouseCursor* cursor) : mouseCursor(cursor) {}
00276
00277 MouseCursor* mouseCursor;
00278 const Image* image;
00279 };
00280
00281
00287 class CEGUIEXPORT KeyEventArgs : public WindowEventArgs
00288 {
00289 public:
00290 KeyEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00291
00292 utf32 codepoint;
00293 Key::Scan scancode;
00294 uint sysKeys;
00295 };
00296
00297
00302 class CEGUIEXPORT ActivationEventArgs : public WindowEventArgs
00303 {
00304 public:
00305 ActivationEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00306
00307 Window* otherWindow;
00308 };
00309
00314 class CEGUIEXPORT DragDropEventArgs : public WindowEventArgs
00315 {
00316 public:
00317 DragDropEventArgs(Window* wnd) : WindowEventArgs(wnd) {}
00318 DragContainer* dragDropItem;
00319 };
00320
00321 }
00322
00323
00324 #endif // end of guard _CEGUIInputEvent_h_