00001 #ifndef GUI_EVENTRECEIVER_HPP 00002 #define GUI_EVENTRECEIVER_HPP 00003 00004 #include <utils.hpp> 00005 #include <string> 00006 00007 namespace gui 00008 { 00009 class event; 00010 class event_manager; 00011 00013 00018 class event_receiver 00019 { 00020 public : 00021 00023 explicit event_receiver(event_manager* mManager = nullptr); 00024 00026 virtual ~event_receiver(); 00027 00029 00033 virtual void on_event(const event& mEvent) = 0; 00034 00036 00039 virtual void register_event(const std::string& sEventName); 00040 00042 00045 virtual void unregister_event(const std::string& sEventName); 00046 00047 protected : 00048 00049 event_manager* pEventManager_; 00050 }; 00051 } 00052 00053 #endif