GestureEvent
A gesture event. The only gesture events currently supported is SWIPE_HORIZONTAL and SWIPE_VERTICAL, which will be issued every time the input system detects a swipe.
See: Event
Inherits from: Event
Public Types
enum | GestureEventType { SWIPE_HORIZONTAL, SWIPE_VERTICAL } |
Values that represent gesture types. | |
Public Functions
GestureEvent(const GestureEvent & gestureEvent) | |
Copy constructor. | |
GestureEvent(GestureEventType type, int16_t velocity, int16_t x, int16_t y) | |
Constructor. | |
virtual Event::EventType | getEventType() const |
Gets event type. | |
GestureEventType | getType() const |
Gets the type of this gesture event. | |
int16_t | getVelocity() const |
Gets the velocity of this gesture event. | |
int16_t | getX() const |
Gets the x coordinate of this gesture event. | |
int16_t | getY() const |
Gets the y coordinate of this gesture event. | |
const GestureEvent & | operator=(const GestureEvent & gestureEvent) |
Assignment operator. | |
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
GestureEventType
enum GestureEventType
Values that represent gesture types.
SWIPE_HORIZONTAL | An enum constant representing a horizontal swipe. |
SWIPE_VERTICAL | An enum constant representing a vertical swipe. |
Public Functions Documentation
GestureEvent
GestureEvent | ( | const GestureEvent & | gestureEvent | ) | |
Copy constructor.
Parameters:
gestureEvent | The gesture event. |
GestureEvent
GestureEvent | ( | GestureEventType | type , | ||
int16_t | velocity , | ||||
int16_t | x , | ||||
int16_t | y | ||||
) |
Constructor.
Create a gesture event of the specified type with the specified coordinates.
Parameters:
type | The type of the gesture event. |
velocity | The velocity of this gesture (swipe) |
x | The x coordinate of the gesture. |
y | The y coordinate of the gesture. |
getEventType
virtual Event::EventType getEventType | ( | ) | const |
getType
GestureEventType getType | ( | ) | const |
Gets the type of this gesture event.
Returns:
The type of this gesture event.
getVelocity
int16_t getVelocity | ( | ) | const |
Gets the velocity of this gesture event.
Returns:
The velocity of this gesture event.
getX
int16_t getX | ( | ) | const |
Gets the x coordinate of this gesture event.
Returns:
The x coordinate of this gesture event.
getY
int16_t getY | ( | ) | const |
Gets the y coordinate of this gesture event.
Returns:
The y coordinate of this gesture event.
operator=
const GestureEvent & operator= | ( | const GestureEvent & | gestureEvent | ) | |
Assignment operator.
Parameters:
gestureEvent | The gesture event. |
Returns:
A shallow copy of this object.