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 fromX, int16_t fromY, int16_t toX, int16_t toY) | |
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() |
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 x coordinate where the drag operation was started (dragged from). | |
int16_t | getOldY() const |
Gets the y coordinate where the drag operation was started (dragged from). | |
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 | fromX , | ||||
int16_t | fromY , | ||||
int16_t | toX , | ||||
int16_t | toY | ||||
) |
Initializes a new instance of the DragEvent class.
type | The type of the drag event. |
fromX | The x coordinate of the drag start position (dragged from) |
fromY | The y coordinate of the drag start position (dragged from) |
toX | The x coordinate of the new position (dragged to) |
toY | 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 | ( | ) |
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 x coordinate where the drag operation was started (dragged from).
The x coordinate where the drag operation was started (dragged from).
getOldY
int16_t getOldY | ( | ) | const |
Gets the y coordinate where the drag operation was started (dragged from).
The y coordinate 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.