DragEvent
A drag event. The only drag event currently supported is DRAGGED, which will be issued every time the input system detects a drag.
See: Event
Inherits from: Event
Public Types
enum | DragEventType { DRAGGED } |
Values that represent drag event types. | |
Public Functions
DragEvent(DragEventType type, int16_t oldX, int16_t oldY, int16_t newX, int16_t newY) | |
Initializes a new instance of the DragEvent class. | |
int16_t | getDeltaX() const |
Gets the distance in x coordinates (how long was the drag). | |
int16_t | getDeltaY() const |
Gets the distance in y coordinates (how long was the drag). | |
virtual Event::EventType | getEventType() const |
Gets event type. | |
int16_t | getNewX() const |
Gets the new x coordinate (dragged to). | |
int16_t | getNewY() const |
Gets the new x coordinate (dragged to). | |
int16_t | getOldX() const |
Gets the old x coordinate, i.e. | |
int16_t | getOldY() const |
Gets the old y coordinate, i.e. | |
DragEventType | getType() const |
Gets the type of this drag event. | |
Additional inherited members
Public Types inherited from Event
enum | EventType { EVENT_CLICK, EVENT_DRAG, EVENT_GESTURE } |
The event types. | |
Public Functions inherited from Event
Public Types Documentation
DragEventType
enum DragEventType
Values that represent drag event types.
DRAGGED | An enum constant representing the dragged option. |
Public Functions Documentation
DragEvent
DragEvent | ( | DragEventType | type , | ||
int16_t | oldX , | ||||
int16_t | oldY , | ||||
int16_t | newX , | ||||
int16_t | newY | ||||
) |
Initializes a new instance of the DragEvent class.
type | The type of the drag event. |
oldX | The x coordinate of the drag start position (dragged from) |
oldY | The y coordinate of the drag start position (dragged from) |
newX | The x coordinate of the new position (dragged to) |
newY | The y coordinate of the new position (dragged to) |
getDeltaX
int16_t getDeltaX | ( | ) | const |
Gets the distance in x coordinates (how long was the drag).
The distance of this drag event.
getDeltaY
int16_t getDeltaY | ( | ) | const |
Gets the distance in y coordinates (how long was the drag).
The distance of this drag event.
getEventType
virtual Event::EventType getEventType | ( | ) | const |
getNewX
int16_t getNewX | ( | ) | const |
Gets the new x coordinate (dragged to).
The new x coordinate (dragged to).
getNewY
int16_t getNewY | ( | ) | const |
Gets the new x coordinate (dragged to).
The new y coordinate (dragged to).
getOldX
int16_t getOldX | ( | ) | const |
Gets the old x coordinate, i.e.
where the drag operation was started (dragged from).
The old x coordinate, i.e. where the drag operation was started (dragged from).
getOldY
int16_t getOldY | ( | ) | const |
Gets the old y coordinate, i.e.
where the drag operation was started (dragged from).
The old y coordinate, i.e. where the drag operation was started (dragged from).
getType
DragEventType getType | ( | ) | const |
Gets the type of this drag event.
The type of this drag event.