Louvre  v2.9.0-1
C++ library for Wayland compositors
Public Member Functions | List of all members
LSceneTouchPoint Class Referencefinal

Touch point managed within an LScene. More...

+ Inheritance diagram for LSceneTouchPoint:

Public Member Functions

LScenescene () const noexcept
 Scene this touch point belongs to. More...
 
Int32 id () const noexcept
 Gets the unique identifier of the touch point. More...
 
bool pressed () const noexcept
 Check if the touch point is currently being pressed. More...
 
const std::vector< LView * > & views () const noexcept
 Touched views. More...
 
const LPointFpos () const noexcept
 Gets the position of the touch point assigned by the last touch-down or move event. More...
 
- Public Member Functions inherited from LObject
 LObject (const LObject &) noexcept
 Copy constructor. More...
 
LObjectoperator= (const LObject &) noexcept
 Assignment operator (each object has its own individual LWeak reference count). More...
 
void setUserData (UIntPtr data) const noexcept
 Store an unsigned integer value/pointer. More...
 
UIntPtr userData () const noexcept
 Retrieves the stored unsigned integer value/pointer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LObject
 LObject () noexcept=default
 Constructor of the LObject class. More...
 
virtual ~LObject () noexcept
 Destructor of the LObject class. More...
 
void notifyDestruction () noexcept
 Notifies the object destruction. More...
 

Detailed Description

Touch point managed within an LScene.

This class behaves similarly to LTouchPoint but its lifetime is managed by its parent LScene handleTouchXXX events.

See also
LTouchPoint for understanding the lifetime of a touch point.

To access all active touch points of an LScene, see LScene::touchPoints().

Note
For an LView to be capable of receiving touch events, LView::touchEventsEnabled() must be set to true.

Member Function Documentation

◆ scene()

LScene* scene ( ) const
inlinenoexcept

Scene this touch point belongs to.

◆ id()

Int32 id ( ) const
inlinenoexcept

Gets the unique identifier of the touch point.

Each touch point is assigned a unique identifier, ensuring that there are no two touch points with the same ID.

Returns
The unique identifier of the touch point.

◆ pressed()

bool pressed ( ) const
inlinenoexcept

Check if the touch point is currently being pressed.

◆ views()

const std::vector<LView*>& views ( ) const
inlinenoexcept

Touched views.

A vector of views being touched by this touch point.

Views with the LView::blockTouchEnabled() property set to false allow views behind them to receive touch events as well. In such cases, the vector contains the views ordered from topmost to bottommost.

◆ pos()

const LPointF& pos ( ) const
inlinenoexcept

Gets the position of the touch point assigned by the last touch-down or move event.

The position is represented in a coordinate space ranging from 0 to 1 for both the x and y axes.

Returns
A constant reference to the position of the touch point.