Skip to main content

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

enumDragEventType { 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_tgetDeltaX() const
Gets the distance in x coordinates (how long was the drag).
int16_tgetDeltaY() const
Gets the distance in y coordinates (how long was the drag).
virtual Event::EventTypegetEventType() const
Gets event type.
int16_tgetNewX() const
Gets the new x coordinate (dragged to).
int16_tgetNewY() const
Gets the new x coordinate (dragged to).
int16_tgetOldX() const
Gets the old x coordinate, i.e.
int16_tgetOldY() const
Gets the old y coordinate, i.e.
DragEventTypegetType() const
Gets the type of this drag event.

Additional inherited members

Public Types inherited from Event

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

Public Functions inherited from Event

virtual ~Event()
Finalizes an instance of the Event class.

Public Types Documentation

DragEventType

Values that represent drag event types.

DRAGGEDAn enum constant representing the dragged option.

Public Functions Documentation

DragEvent

DragEvent(DragEventTypetype ,
int16_toldX ,
int16_toldY ,
int16_tnewX ,
int16_tnewY
)

Initializes a new instance of the DragEvent class.

Parameters:
typeThe type of the drag event.
oldXThe x coordinate of the drag start position (dragged from)
oldYThe y coordinate of the drag start position (dragged from)
newXThe x coordinate of the new position (dragged to)
newYThe y coordinate of the new position (dragged to)

getDeltaX

int16_t getDeltaX()const

Gets the distance in x coordinates (how long was the drag).

Returns:

The distance of this drag event.

getDeltaY

int16_t getDeltaY()const

Gets the distance in y coordinates (how long was the drag).

Returns:

The distance of this drag event.

getEventType

virtual Event::EventType getEventType()const

Gets event type.

Returns:

The type of this event.

Reimplements: touchgfx::Event::getEventType

getNewX

int16_t getNewX()const

Gets the new x coordinate (dragged to).

Returns:

The new x coordinate (dragged to).

getNewY

int16_t getNewY()const

Gets the new x coordinate (dragged to).

Returns:

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).

Returns:

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).

Returns:

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.

Returns:

The type of this drag event.