Foundation classes for a basic GUI implementing simple widgets and events
Dependents: TouchScreenGUIDemo
Events/EventDispatcher.h@12:63db16fea709, 2016-05-08 (annotated)
- Committer:
- duncanFrance
- Date:
- Sun May 08 14:42:08 2016 +0000
- Revision:
- 12:63db16fea709
- Parent:
- 0:0a590815d51c
- Child:
- 18:d849f3ada858
Update to handle dirty pixels and geometric change/damage
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
duncanFrance | 0:0a590815d51c | 1 | #ifndef SIMPLEGUI_EVENT_DISPATCHER_H |
duncanFrance | 0:0a590815d51c | 2 | #define SIMPLEGUI_EVENT_DISPATCHER_H |
duncanFrance | 0:0a590815d51c | 3 | |
duncanFrance | 0:0a590815d51c | 4 | #include "EventListener.h" |
duncanFrance | 12:63db16fea709 | 5 | #include "LinkedList.h" |
duncanFrance | 0:0a590815d51c | 6 | |
duncanFrance | 12:63db16fea709 | 7 | class EventDispatcher |
duncanFrance | 12:63db16fea709 | 8 | { |
duncanFrance | 12:63db16fea709 | 9 | |
duncanFrance | 0:0a590815d51c | 10 | |
duncanFrance | 12:63db16fea709 | 11 | public: |
duncanFrance | 12:63db16fea709 | 12 | |
duncanFrance | 0:0a590815d51c | 13 | EventDispatcher(); |
duncanFrance | 12:63db16fea709 | 14 | |
duncanFrance | 0:0a590815d51c | 15 | void attachListener(EventListener* l); |
duncanFrance | 0:0a590815d51c | 16 | void detachListener(EventListener* l); |
duncanFrance | 0:0a590815d51c | 17 | void dispatchEvent(Event e); |
duncanFrance | 12:63db16fea709 | 18 | |
duncanFrance | 12:63db16fea709 | 19 | private: |
duncanFrance | 12:63db16fea709 | 20 | |
duncanFrance | 12:63db16fea709 | 21 | LinkedList<EventListener> _listeners; |
duncanFrance | 0:0a590815d51c | 22 | |
duncanFrance | 0:0a590815d51c | 23 | }; |
duncanFrance | 0:0a590815d51c | 24 | |
duncanFrance | 0:0a590815d51c | 25 | #endif |