Richard Parker / EALCD

manager/EATouchManager.h

Committer:
richardparker
Date:
2010-03-04
Revision:
1:f04bcaea1d60
Child:
4:f8f7f4f9c58d

File content as of revision 1:f04bcaea1d60:

// Copyright 2010 Richard Parker

#ifndef MBED_EATOUCHMANAGER_H
#define MBED_EATOUCHMANAGER_H

#include "mbed.h"

class EATouch;
class EAHitBox;

/**
 * Class to handle the hits on the touch screen
 * @author Richard Parker
 */
class EATouchManager
{
public:
    EATouchManager(EATouch& touch);
    
    ~EATouchManager();
    
    void tick();
    
    void deleteHitBox(EAHitBox* box);
    EAHitBox* createHitBox();
    void clearHitBoxes();

    inline EAHitBox* head() { return _head; }
    
private:
    EATouch& _touch;
    
    EAHitBox* _head;
    
    void _doHits(short x, short y);
    
};

#endif