Lab4
Dependencies: SeeedStudioTFTv2 TFT_fonts mbed
Fork of Seeed_TFT_Touch_Shield by
ActionListener.cpp
- Committer:
- uswickra
- Date:
- 2014-09-26
- Revision:
- 4:ebcf8d366b91
- Child:
- 6:ebffa73d4f95
File content as of revision 4:ebcf8d366b91:
#include "ActionListener.h" ActionListener::ActionListener() { is_reg = false ; }; void ActionListener::registerForEvents(ActionListener* widg) { target = widg ; is_reg = true ; children.push_back(widg); }; void ActionListener::action(ActionType type, ActionEvent evnt) { if(is_reg) { // target->trigger_action(type, evnt); for(vector<ActionListener*>::iterator it = children.begin(); it != children.end(); it++) { ActionListener* w = *it; w->trigger_action(type, evnt); } } };