MyScript Interactive Ink SDK  3.1.3
Public Member Functions | Public Attributes | List of all members
myscript::iink::PointerEvent Struct Reference

#include <PointerEvent.h>

Public Member Functions

 PointerEvent ()=default
 
PointerEvent & down (float x, float y)
 
PointerEvent & move (float x, float y)
 
PointerEvent & up (float x, float y)
 
PointerEvent & timestamp (int64_t t)
 
PointerEvent & force (float f)
 
PointerEvent & type (PointerType pointerType)
 
PointerEvent & id (int pointerId)
 

Public Attributes

PointerEventType eventType = PointerEventType::CANCEL
 
float x = 0.f
 
float y = 0.f
 
int64_t t = -1
 
float f = 0.0f
 
PointerType pointerType = PointerType::PEN
 
int pointerId = -1
 

Detailed Description

Represents a pointer event.

Constructor & Destructor Documentation

◆ PointerEvent()

myscript::iink::PointerEvent::PointerEvent ( )
default

Member Function Documentation

◆ down()

PointerEvent& myscript::iink::PointerEvent::down ( float  x,
float  y 
)
inline

Update this event to a "down" event.

Parameters
xthe x coordinate location.
ythe y coordinate location.
Returns
this.

◆ move()

PointerEvent& myscript::iink::PointerEvent::move ( float  x,
float  y 
)
inline

Update this event to a "move" event.

Parameters
xthe x coordinate location.
ythe y coordinate location.
Returns
this.

◆ up()

PointerEvent& myscript::iink::PointerEvent::up ( float  x,
float  y 
)
inline

Update this event to a "up" event.

Parameters
xthe x coordinate location.
ythe y coordinate location.
Returns
this.

◆ timestamp()

PointerEvent& myscript::iink::PointerEvent::timestamp ( int64_t  t)
inline

Update the event timestamp.

Parameters
tthe timestamp value.
Returns
this.

◆ force()

PointerEvent& myscript::iink::PointerEvent::force ( float  f)
inline

Update the event pressure.

Parameters
fthe pressure value.
Returns
this.

◆ type()

PointerEvent& myscript::iink::PointerEvent::type ( PointerType  pointerType)
inline

Update the event pointer type.

Parameters
pointerTypethe pointer type.
Returns
this.

◆ id()

PointerEvent& myscript::iink::PointerEvent::id ( int  pointerId)
inline

Update the event pointer id.

Parameters
pointerIdthe pointer id value.
Returns
this.

Member Data Documentation

◆ eventType

PointerEventType myscript::iink::PointerEvent::eventType = PointerEventType::CANCEL

The event type.

◆ x

float myscript::iink::PointerEvent::x = 0.f

The event x coordinate.

◆ y

float myscript::iink::PointerEvent::y = 0.f

The event y coordinate.

◆ t

int64_t myscript::iink::PointerEvent::t = -1

The event timestamp in ms since Unix EPOCH, or -1.

◆ f

float myscript::iink::PointerEvent::f = 0.0f

The event normalised pressure.

◆ pointerType

PointerType myscript::iink::PointerEvent::pointerType = PointerType::PEN

The type of input pointer.

◆ pointerId

int myscript::iink::PointerEvent::pointerId = -1

The id of the pointer.


The documentation for this struct was generated from the following file: