NAP
Public Member Functions | Public Attributes | List of all members
TouchEvent Class Reference

#include <inputevent.h>

Public Member Functions

 TouchEvent (int fingerID, int touchID, float x, float y, float pressure, int window=input::invalid, int wx=input::invalid, int wy=input::invalid)
 
bool hasWindow () const
 
- Public Member Functions inherited from WindowInputEvent
 WindowInputEvent (int window)
 
- Public Member Functions inherited from Event
virtual ~Event ()=default
 
 Event ()=default
 
 Event (const Event &)=delete
 
Eventoperator= (const Event &)=delete
 

Public Attributes

int mFingerID
 The finger ID. More...
 
int mTouchID
 The touch device ID. More...
 
float mX
 The x-axis location of the touch event, normalized(0 - 1) More...
 
float mY
 The y-axis location of the touch event, normalized(0 - 1) More...
 
float mPressure
 The quantity of the pressure applied, normalized (0 - 1) More...
 
int mXCoordinate
 The x-axis window coordinate, if any. -1 otherwise. More...
 
int mYCoordinate
 The y-axis window coordinate, if any. -1 otherwise. More...
 
- Public Attributes inherited from WindowInputEvent
int mWindow
 Window ID. More...
 

Description

Base class for all touch input events

Inheritance diagram for TouchEvent:
[legend]
Collaboration diagram for TouchEvent:
[legend]

Constructor & Destructor Documentation

◆ TouchEvent()

TouchEvent ( int  fingerID,
int  touchID,
float  x,
float  y,
float  pressure,
int  window = input::invalid,
int  wx = input::invalid,
int  wy = input::invalid 
)

Member Function Documentation

◆ hasWindow()

bool hasWindow ( ) const

Returns if there is a window under the touch event

Returns
if there is a window under the touch event

Member Data Documentation

◆ mFingerID

int mFingerID

The finger ID.

◆ mPressure

float mPressure

The quantity of the pressure applied, normalized (0 - 1)

◆ mTouchID

int mTouchID

The touch device ID.

◆ mX

float mX

The x-axis location of the touch event, normalized(0 - 1)

◆ mXCoordinate

int mXCoordinate

The x-axis window coordinate, if any. -1 otherwise.

◆ mY

float mY

The y-axis location of the touch event, normalized(0 - 1)

◆ mYCoordinate

int mYCoordinate

The y-axis window coordinate, if any. -1 otherwise.