Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TouchScreenGUIDemo
Events/EventListener.h@1:48796b602c86, 2016-03-25 (annotated)
- Committer:
- duncanFrance
- Date:
- Fri Mar 25 16:47:33 2016 +0000
- Revision:
- 1:48796b602c86
- Parent:
- 0:0a590815d51c
- Child:
- 8:a460cabc85ac
Implement default isEventTarget on Widget
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| duncanFrance | 0:0a590815d51c | 1 | #ifndef SIMPLEGUI_EVENT_TARGET_H |
| duncanFrance | 0:0a590815d51c | 2 | #define SIMPLEGUI_EVENT_TARGET_H |
| duncanFrance | 0:0a590815d51c | 3 | |
| duncanFrance | 0:0a590815d51c | 4 | // Need a forward declaration of EventListener here |
| duncanFrance | 0:0a590815d51c | 5 | class EventListener; |
| duncanFrance | 0:0a590815d51c | 6 | |
| duncanFrance | 0:0a590815d51c | 7 | #include "EventHandler.h" |
| duncanFrance | 0:0a590815d51c | 8 | |
| duncanFrance | 0:0a590815d51c | 9 | class EventListener { |
| duncanFrance | 0:0a590815d51c | 10 | |
| duncanFrance | 0:0a590815d51c | 11 | public: |
| duncanFrance | 0:0a590815d51c | 12 | |
| duncanFrance | 0:0a590815d51c | 13 | EventListener(); |
| duncanFrance | 0:0a590815d51c | 14 | |
| duncanFrance | 1:48796b602c86 | 15 | virtual bool isEventTarget(Event e); |
| duncanFrance | 0:0a590815d51c | 16 | void handleEvent(Event e); |
| duncanFrance | 0:0a590815d51c | 17 | void setEventHandler(uint8_t type, EventHandler handler); |
| duncanFrance | 0:0a590815d51c | 18 | void unsetEventHandler(uint8_t type); |
| duncanFrance | 0:0a590815d51c | 19 | |
| duncanFrance | 0:0a590815d51c | 20 | private: |
| duncanFrance | 0:0a590815d51c | 21 | |
| duncanFrance | 0:0a590815d51c | 22 | EventHandlerWrapper* _handlers; |
| duncanFrance | 0:0a590815d51c | 23 | |
| duncanFrance | 0:0a590815d51c | 24 | }; |
| duncanFrance | 0:0a590815d51c | 25 | |
| duncanFrance | 0:0a590815d51c | 26 | #endif |