PolyEvent.h 779 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 "PolyString.h"
  12. #include "PolyLogger.h"
  13. #include "PolyGlobals.h"
  14. #include <string>
  15. using std::string;
  16. namespace Polycode {
  17. class EventDispatcher;
  18. class _PolyExport Event {
  19. public:
  20. Event();
  21. Event(int eventCode);
  22. ~Event();
  23. int getEventCode();
  24. void setEventCode(int eventCode);
  25. EventDispatcher *getDispatcher();
  26. void setDispatcher(EventDispatcher *dispatcher);
  27. String getEventType();
  28. static const int COMPLETE_EVENT = 0;
  29. static const int CHANGE_EVENT = 1;
  30. protected:
  31. String eventType;
  32. EventDispatcher *dispatcher;
  33. int eventCode;
  34. };
  35. }