Skip to main content

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

enumGestureEventType { 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::EventTypegetEventType() const
Gets event type.
GestureEventTypegetType() const
Gets the type of this gesture event.
int16_tgetVelocity() const
Gets the velocity of this gesture event.
int16_tgetX() const
Gets the x coordinate of this gesture event.
int16_tgetY() 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

enumEventType { EVENT_CLICK, EVENT_DRAG, EVENT_GESTURE }
The event types.

Public Functions inherited from Event

Event()
Default constructor.
virtual ~Event()
Destructor.

Public Types Documentation

GestureEventType

Values that represent gesture types.

SWIPE_HORIZONTALAn enum constant representing a horizontal swipe.
SWIPE_VERTICALAn enum constant representing a vertical swipe.

Public Functions Documentation

GestureEvent

GestureEvent(const GestureEvent &gestureEvent)

Copy constructor.

Parameters:
gestureEventThe gesture event.

GestureEvent

GestureEvent(GestureEventTypetype ,
int16_tvelocity ,
int16_tx ,
int16_ty
)

Constructor.

Create a gesture event of the specified type with the specified coordinates.

Parameters:
typeThe type of the gesture event.
velocityThe velocity of this gesture (swipe)
xThe x coordinate of the gesture.
yThe y coordinate of the gesture.

getEventType

virtual Event::EventType getEventType()const

Gets event type.

Returns:

The type of this event.

Reimplements: touchgfx::Event::getEventType

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:
gestureEventThe gesture event.
Returns:

A shallow copy of this object.