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 "PolyGlobals.h"
  12. #include "PolyEvent.h"
  13. #include "PolyVector2.h"
  14. #include "PolyInputKeys.h"
  15. namespace Polycode {
  16. class _PolyExport InputEvent : public Event {
  17. public:
  18. InputEvent(Vector2 mousePosition,int timestamp);
  19. // InputEvent(TAUKey key, int timestamp);
  20. InputEvent(TAUKey key, wchar_t charCode, int timestamp);
  21. ~InputEvent();
  22. static const int EVENT_MOUSEDOWN = 0;
  23. static const int EVENT_MOUSEUP = 1;
  24. static const int EVENT_MOUSEMOVE = 2;
  25. static const int EVENT_MOUSEOVER = 3;
  26. static const int EVENT_MOUSEOUT = 4;
  27. static const int EVENT_DOUBLECLICK = 5;
  28. static const int EVENT_MOUSEUP_OUTSIDE = 6;
  29. static const int EVENT_MOUSEWHEEL_UP = 7;
  30. static const int EVENT_MOUSEWHEEL_DOWN = 8;
  31. static const int EVENT_KEYDOWN = 13;
  32. static const int EVENT_KEYUP = 14;
  33. int mouseButton;
  34. Vector2 mousePosition;
  35. TAUKey key;
  36. int keyCode() { return key; }
  37. wchar_t charCode;
  38. int timestamp;
  39. protected:
  40. };
  41. }