当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 1 Fork 5.3K

fork_ohos_wj / docs
关闭

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ohos-dragevent.md 12.50 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

OHOS::DragEvent

Overview

Related Modules:

Graphic

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

Public Member Function Name

Description

DragEvent (const Point &newPos, const Point &lastPos, const Point &totalLen)

A constructor used to create a DragEvent instance.

~DragEvent ()

virtual

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 &

Obtains the start coordinates in the drag event.

SetPreLastPoint (const Point &preLastPos)

void

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

uint8_t

Obtains the direction in the drag event.

GetDeltaX () const

int16_t

Obtains the difference between the current position and the last position of the view in the x-axis.

GetDeltaY () const

int16_t

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.

Event (const Point &curPos)

A constructor used to create an Event instance.

~Event ()

virtual

A destructor used to delete the Event instance.

GetCurrentPos () const

const Point &

Obtains the position where an event occurs.

GetTimeStamp () const

const TimeType &

Obtains the timestamp when an event occurs.

SetTimeStamp (const TimeType &timeStamp)

void

Sets the timestamp when an event occurs.

operator new (size_t size)

void *

Overrides the new function.

operator delete (void *p)

void

Overrides the delete function.

1
https://gitee.com/fork_ohos_wj/docs.git
git@gitee.com:fork_ohos_wj/docs.git
fork_ohos_wj
docs
docs
master

搜索帮助