Foundation classes for a basic GUI implementing simple widgets and events

Dependents:   TouchScreenGUIDemo

Revision:
0:0a590815d51c
Child:
1:48796b602c86
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Events/EventListener.h	Fri Mar 25 13:47:04 2016 +0000
@@ -0,0 +1,26 @@
+#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
\ No newline at end of file