JSEventHelper.h 456 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <Atomic/Core/Object.h>
  3. namespace Atomic
  4. {
  5. class ATOMIC_API JSEventHelper : public Object
  6. {
  7. OBJECT(JSEventHelper);
  8. public:
  9. /// Construct.
  10. JSEventHelper(Context* context);
  11. /// Destruct.
  12. virtual ~JSEventHelper();
  13. void AddEventHandler(StringHash eventType);
  14. void AddEventHandler(Object* sender, StringHash eventType);
  15. private:
  16. void HandleEvent(StringHash eventType, VariantMap& eventData);
  17. };
  18. }