PolyInputEvent.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * PolyInputEvent.h
  3. * Poly
  4. *
  5. * Created by Ivan Safrin on 3/28/08.
  6. * Copyright 2008 __MyCompanyName__. All rights reserved.
  7. *
  8. */
  9. // @package Core
  10. #pragma once
  11. #include "PolyString.h"
  12. #include "PolyGlobals.h"
  13. #include "PolyEvent.h"
  14. #include "PolyVector2.h"
  15. #include "PolyInputKeys.h"
  16. namespace Polycode {
  17. class _PolyExport InputEvent : public Event {
  18. public:
  19. InputEvent(Vector2 mousePosition,int timestamp);
  20. // InputEvent(TAUKey key, int timestamp);
  21. InputEvent(TAUKey key, wchar_t charCode, int timestamp);
  22. ~InputEvent();
  23. static const int EVENT_MOUSEDOWN = 0;
  24. static const int EVENT_MOUSEUP = 1;
  25. static const int EVENT_MOUSEMOVE = 2;
  26. static const int EVENT_MOUSEOVER = 3;
  27. static const int EVENT_MOUSEOUT = 4;
  28. static const int EVENT_DOUBLECLICK = 5;
  29. static const int EVENT_MOUSEUP_OUTSIDE = 6;
  30. static const int EVENT_MOUSEWHEEL_UP = 7;
  31. static const int EVENT_MOUSEWHEEL_DOWN = 8;
  32. static const int EVENT_KEYDOWN = 13;
  33. static const int EVENT_KEYUP = 14;
  34. int mouseButton;
  35. Vector2 mousePosition;
  36. TAUKey key;
  37. int keyCode() { return key; }
  38. wchar_t charCode;
  39. int timestamp;
  40. protected:
  41. };
  42. }