from DragEvent.hpp:34
class DragEvent : public Event
{
public:
typedef enum
{
DRAGGED
} DragEventType;
DragEvent(DragEventType type, int16_t oldX, int16_t oldY, int16_t newX, int16_t newY) :
_type(type), _oldX(oldX), _oldY(oldY), _newX(newX), _newY(newY) { }
virtual ~DragEvent() { }
int16_t getOldX() const
{
return _oldX;
}
int16_t getOldY() const
{
return _oldY;
}
int16_t getNewX() const
{
return _newX;
}
int16_t getNewY() const
{
return _newY;
}
DragEventType getType() const
{
return _type;
}
int16_t getDeltaX() const
{
return _newX - _oldX;
}
int16_t getDeltaY() const
{
return _newY - _oldY;
}
virtual Event::EventType getEventType()
{
return Event::EVENT_DRAG;
}
private:
DragEventType _type;
int16_t _oldX;
int16_t _oldY;
int16_t _newX;
int16_t _newY;
};