sincerely
Singaporean
If you have not done so, read this full tutorial on how to use SGEXTN to build an application.
class SGXTouchEvent;
part of SGEXTN module SG_Widgets
represents touch event
list of all including inherited members
preprocessor file inclusion directive: #include ‹SGXTouchEvent.h›
CMake target for BuildLah: SGEXTN::SG_Widgets
see this link for more information about BuildLah
parent class: (none)
children classes: (none)
enum TouchPhase{ TouchStart, TouchOngoing, TouchEnd };
float differenceX;
float differenceY;
float force;
int id;
SGXTouchEvent::TouchPhase phase;
float previousX;
float previousY;
float radius;
float startX;
float startY;
float velocityX;
float velocityY;
float x;
float y;
[[nodiscard]] int hash() const;
[[nodiscard]] bool operator!=(SGXTouchEvent x) const;
[[nodiscard]] bool operator‹(SGXTouchEvent x) const;
[[nodiscard]] bool operator==(SGXTouchEvent x) const;
[[nodiscard]] bool operator›(SGXTouchEvent x) const;
SGXTouchEvent returns a touch event received by SGWSingleTouchReceiver or a SGWMultiTouchReceiver. This is passed to the corresponding callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ to allow custom interactions.
Contains information about the touch event.
Indicates the type of touch event. The phase is TouchStart when the finger contacts the screen for the first time, TouchOngoing if the finger is moved while in contact with the screen, and TouchEnd when the finger is not in contact.
Difference in x coordinate between the SGXTouchEvent this frame and the corresponding SGXTouchEvent last frame.
Difference in y coordinate between the SGXTouchEvent this frame and the corresponding SGXTouchEvent last frame.
Force of the user pressing their finger against the screen.
This is always between 0 and 1.
This may not be available on some devices.
Index of the SGXTouchEvent.
The same touch event is guaranteed to have the same index across different frames.
Phase of the SGXTouchEvent.
X coordinate of the corresponding SGXTouchEvent last frame.
Y coordinate of the corresponding SGXTouchEvent last frame.
Radius of contact point in pixels.
This can be used for palm detection.
X coordinate of the SGXTouchEvent on the first frame when the finger touched the screen.
Y coordinate of the SGXTouchEvent on the first frame when the finger touched the screen.
X direction of the speed of the user moving their finger across the screen in pixels per second.
This may not be available on some devices.
Y direction of the speed of the user moving their finger across the screen in pixels per second.
This may not be available on some devices.
X coordinate in pixels of the SGXTouchEvent.
Y coordinate in pixels of the SGXTouchEvent.
Hash function for SGLHash.
This only takes into account the index number, comparing SGXTouchEvent from different touch receivers is undefined behaviour.
Inequality check with x for SGLEqualsTo.
This only takes into account the index number, comparing SGXTouchEvent from different touch receivers is undefined behaviour.
Lesser than operator with x for SGLLesserThan and SGLMoreThan.
This only takes into account the index number, comparing SGXTouchEvent from different touch receivers is undefined behaviour.
Equality check with x for SGLEqualsTo.
This only takes into account the index number, comparing SGXTouchEvent from different touch receivers is undefined behaviour.
More than operator with x for SGLLesserThan and SGLMoreThan.
This only takes into account the index number, comparing SGXTouchEvent from different touch receivers is undefined behaviour.
©2025 05524F.sg (Singapore)