Foundation classes for a basic GUI implementing simple widgets and events. (Fork for custom changes.)
Fork of SimpleGUI by
Events/EventSource.h@20:ef07d42ea062, 2016-10-18 (annotated)
- Committer:
- elh
- Date:
- Tue Oct 18 19:43:15 2016 +0000
- Revision:
- 20:ef07d42ea062
- Parent:
- 18:d849f3ada858
Initialize Textwidgets _text to NULL preventing crash if widget is draw until a text was set.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
duncanFrance | 0:0a590815d51c | 1 | #ifndef SIMPLEGUI_EVENT_SOURCE_H |
duncanFrance | 0:0a590815d51c | 2 | #define SIMPLEGUI_EVENT_SOURCE_H |
duncanFrance | 0:0a590815d51c | 3 | |
duncanFrance | 18:d849f3ada858 | 4 | #include "EventDispatcher.h" |
duncanFrance | 0:0a590815d51c | 5 | |
duncanFrance | 0:0a590815d51c | 6 | /** |
duncanFrance | 0:0a590815d51c | 7 | * Interface defining a class which sources events |
duncanFrance | 0:0a590815d51c | 8 | **/ |
duncanFrance | 0:0a590815d51c | 9 | class EventSource { |
duncanFrance | 0:0a590815d51c | 10 | |
duncanFrance | 0:0a590815d51c | 11 | public: |
duncanFrance | 0:0a590815d51c | 12 | |
duncanFrance | 18:d849f3ada858 | 13 | EventSource(EventDispatcher* dispatcher) : _eventDispatcher(dispatcher) {} |
duncanFrance | 1:48796b602c86 | 14 | |
duncanFrance | 1:48796b602c86 | 15 | protected: |
duncanFrance | 0:0a590815d51c | 16 | |
duncanFrance | 18:d849f3ada858 | 17 | EventDispatcher* _eventDispatcher; |
duncanFrance | 0:0a590815d51c | 18 | }; |
duncanFrance | 0:0a590815d51c | 19 | |
duncanFrance | 0:0a590815d51c | 20 | |
duncanFrance | 0:0a590815d51c | 21 | #endif |