# OHOS::DragEvent - [Overview](#section1869934673165635) - [Summary](#section855427081165635) - [Public Member Functions](#pub-methods) ## **Overview** **Related Modules:** [Graphic](Graphic.md) **Description:** Defines a drag event, which indicates a certain movement \(more than 10 pixels\) after a view is pressed. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Public Member Functions
DragEvent (const Point &newPos, const Point &lastPos, const Point &totalLen) |
A constructor used to create a DragEvent instance. |
~DragEvent () |
A destructor used to delete the DragEvent instance. |
GetLastPoint () const |
const Point & Obtains the coordinates of the last position in the drag event. |
GetStartPoint () const |
const Point & |
SetPreLastPoint (const Point &preLastPos) |
Sets the coordinates of the stay position before the last position in the drag event. |
GetPreLastPoint () const |
const Point & Obtains the coordinates of the stay position before the last position in the drag event. |
GetDragDirection () const |
|
GetDeltaX () const |
Obtains the difference between the current position and the last position of the view in the x-axis. |
GetDeltaY () const |
Obtains the difference between the current position and the last position of the view in the y-axis. |
Event () |
A default constructor used to create an Event instance. |
|
A constructor used to create an Event instance. |
|
~Event () |
A destructor used to delete the Event instance. |
GetCurrentPos () const |
const Point & |
GetTimeStamp () const |
|
SetTimeStamp (const TimeType &timeStamp) |
|
operator new (size_t size) |
|
operator delete (void *p) |