Lab4

Dependencies:   SeeedStudioTFTv2 TFT_fonts mbed

Fork of Seeed_TFT_Touch_Shield by Shields

ActionListener.cpp

Committer:
uswickra
Date:
2014-09-26
Revision:
6:ebffa73d4f95
Parent:
4:ebcf8d366b91

File content as of revision 6:ebffa73d4f95:

#include "ActionListener.h"

ActionListener::ActionListener()
{
    is_reg = false ;
};

void ActionListener::registerForEvents(ActionListener* tagt)
{
    target = tagt ;
    is_reg = true ;
//    if(tagt != NULL)
//        children.push_back(tagt);
};

void ActionListener::action(ActionType type, ActionEvent evnt)
{
    //trigger action for target
    if(is_reg) {
        trigger_action(type, evnt, (void*) target);
    }
};