PolyEvent.h 755 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * PolyEvent.h
  3. * Poly
  4. *
  5. * Created by Ivan Safrin on 3/28/08.
  6. * Copyright 2008 __MyCompanyName__. All rights reserved.
  7. *
  8. */
  9. // @package Events
  10. #pragma once
  11. #include "PolyLogger.h"
  12. #include "PolyGlobals.h"
  13. #include <string>
  14. using std::string;
  15. namespace Polycode {
  16. class EventDispatcher;
  17. class _PolyExport Event {
  18. public:
  19. Event();
  20. Event(int eventCode);
  21. ~Event();
  22. int getEventCode();
  23. void setEventCode(int eventCode);
  24. EventDispatcher *getDispatcher();
  25. void setDispatcher(EventDispatcher *dispatcher);
  26. string getEventType();
  27. static const int COMPLETE_EVENT = 0;
  28. static const int CHANGE_EVENT = 1;
  29. protected:
  30. string eventType;
  31. EventDispatcher *dispatcher;
  32. int eventCode;
  33. };
  34. }