Foundation classes for a basic GUI implementing simple widgets and events. (Fork for custom changes.)

Fork of SimpleGUI by Duncan McIntyre

Revision:
12:63db16fea709
Parent:
0:0a590815d51c
--- a/Events/Event.h	Fri Apr 22 16:12:42 2016 +0000
+++ b/Events/Event.h	Sun May 08 14:42:08 2016 +0000
@@ -2,15 +2,15 @@
 #define SIMPLEGUI_EVENT_H
 
 #include "mbed.h"
-
+#include "EventListener.h"
+#include "EventType.h"
 
 typedef struct Event {
+    
+    EventListener *target;
 
-    // It would be nice to use e.g. classes to represent events. But getting class information
-    // out of a C++ class at runtime takes gymnastics which I can't be bothered with
-    // Instead it's up to YOU the user of this library to ensure that your event types
-    // are drawn from a central list so that they can be properly distinguished. Sorry.
-    uint8_t type;
+    EventType type;
+
     // This should probably be some kind of union to cope with the different kinds of event we expect to handle
     // For now I'm going to explicitly assume events relate to something on-screen
     int screenX;