el h / SimpleGUI

Fork of SimpleGUI by Duncan McIntyre

Events/EventListener.h

Committer:
duncanFrance
Date:
2016-03-25
Revision:
0:0a590815d51c
Child:
1:48796b602c86

File content as of revision 0:0a590815d51c:

#ifndef SIMPLEGUI_EVENT_TARGET_H
#define SIMPLEGUI_EVENT_TARGET_H

// Need a forward declaration of EventListener here
class EventListener;

#include "EventHandler.h"

class EventListener {
    
    public:
    
    EventListener();
    
    virtual bool isEventTarget(Event e) = 0;
    void handleEvent(Event e);
    void setEventHandler(uint8_t type, EventHandler handler);
    void unsetEventHandler(uint8_t type);
   
    private:
    
    EventHandlerWrapper* _handlers;    
      
};
    
#endif