Foundation classes for a basic GUI implementing simple widgets and events
Dependents: TouchScreenGUIDemo
Events/Event.h@18:d849f3ada858, 2016-05-28 (annotated)
- Committer:
- duncanFrance
- Date:
- Sat May 28 14:50:14 2016 +0000
- Revision:
- 18:d849f3ada858
- Parent:
- 12:63db16fea709
Moved the event queue into the EventDispatcher; Improved event handling across Window/Widget
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
duncanFrance | 0:0a590815d51c | 1 | #ifndef SIMPLEGUI_EVENT_H |
duncanFrance | 0:0a590815d51c | 2 | #define SIMPLEGUI_EVENT_H |
duncanFrance | 0:0a590815d51c | 3 | |
duncanFrance | 0:0a590815d51c | 4 | #include "mbed.h" |
duncanFrance | 12:63db16fea709 | 5 | #include "EventListener.h" |
duncanFrance | 12:63db16fea709 | 6 | #include "EventType.h" |
duncanFrance | 0:0a590815d51c | 7 | |
duncanFrance | 0:0a590815d51c | 8 | typedef struct Event { |
duncanFrance | 12:63db16fea709 | 9 | |
duncanFrance | 12:63db16fea709 | 10 | EventListener *target; |
duncanFrance | 0:0a590815d51c | 11 | |
duncanFrance | 12:63db16fea709 | 12 | EventType type; |
duncanFrance | 12:63db16fea709 | 13 | |
duncanFrance | 0:0a590815d51c | 14 | // This should probably be some kind of union to cope with the different kinds of event we expect to handle |
duncanFrance | 0:0a590815d51c | 15 | // For now I'm going to explicitly assume events relate to something on-screen |
duncanFrance | 0:0a590815d51c | 16 | int screenX; |
duncanFrance | 0:0a590815d51c | 17 | int screenY; |
duncanFrance | 0:0a590815d51c | 18 | |
duncanFrance | 0:0a590815d51c | 19 | } Event; |
duncanFrance | 0:0a590815d51c | 20 | |
duncanFrance | 0:0a590815d51c | 21 | #endif |