28 lines
537 B
C++
28 lines
537 B
C++
|
|
#ifndef SPECTRE_SYSTEM_MESSAGEHANDLER_H
|
|
#define SPECTRE_SYSTEM_MESSAGEHANDLER_H
|
|
|
|
#include <vector>
|
|
#include "EventListener.h"
|
|
|
|
namespace sp {
|
|
|
|
class MessageHandler : public EventListener
|
|
{
|
|
public :
|
|
|
|
void registerListener(EventListener *listener);
|
|
|
|
void unregisterListener(EventListener *listener);
|
|
|
|
virtual void onSizeChanged(Window* window, int width, int height);
|
|
|
|
virtual void onEvent(const Event& event);
|
|
|
|
protected :
|
|
std::vector<EventListener*> m_listeners;
|
|
};
|
|
|
|
} // namespace sp
|
|
|
|
#endif /* SPECTRE_SYSTEM_MESSAGEHANDLER_H */
|