sincerely
Singaporean
If you have not done so, read this full tutorial on how to use SGEXTN to build an application.
class SGWMultiTouchReceiver;
part of SGEXTN module SG_Widgets
SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ custom interactive component accepting multiple touch events
list of all including inherited members
preprocessor file inclusion directive: #include ‹SGWMultiTouchReceiver.h›
CMake target for BuildLah: SGEXTN::SG_Widgets
see this link for more information about BuildLah
parent class: SGWWidget
children classes: (none)
int attachedInt;
void (*callbackFunction)(const SGLArray‹SGXTouchEvent›&);
void (*callbackFunctionWithInt)(int, const SGLArray‹SGXTouchEvent›&);
void (*callbackFunctionWithPointer)(SGWMultiTouchReceiver*, const SGLArray‹SGXTouchEvent›&);
void (*callbackFunctionWithString)(SGXString, const SGLArray‹SGXTouchEvent›&);
SGWMultiTouchReceiver(SGWWidget* parent, void (*function)(const SGLArray‹SGXTouchEvent›&), float x1, float x0, float y1, float y0, float w1, float w0, float h1, float h0);
[[nodiscard]] float getHeight() const;
[[nodiscard]] float getWidth() const;
SGWMultiTouchReceiver allows for custom programmed interactive components in SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾. It receives multiple touch events simultaneously and sends them all to a callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ for processing in the form of a SGLArray of SGXTouchEvent.
Stores information about the SGWMultiTouchReceiver.
Int attached to this SGWMultiTouchReceiver.
This is used to identify the source of the callback in callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾.
String attached to this SGWMultiTouchReceiver.
This is used to identify the source of the callback in callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾.
callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ called when the user interacts with the SGWMultiTouchReceiver. All touch events are sent using a SGLArray of SGXTouchEvent.
callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ called when the user interacts with the SGWMultiTouchReceiver. All touch events are sent using a SGLArray of SGXTouchEvent, in addition to SGWMultiTouchReceiver::attachedInt.
callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ called when the user interacts with the SGWMultiTouchReceiver. All touch events are sent using a SGLArray of SGXTouchEvent, in addition to a pointer to this SGWMultiTouchReceiver.
callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ called when the user interacts with the SGWMultiTouchReceiver. All touch events are sent using a SGLArray of SGXTouchEvent, in addition to SGWMultiTouchReceiver::attachedString.
Creates a SGWMultiTouchReceiver with parent SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ parent, w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ coordinates (x1, x0, y1, y0, w1, w0, h1, h0), and callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ function.
5 touch events will be sent to the callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ function, but this may change in a future SGEXTN version.
parent being nullptr is undefined behaviour.
To avoid use after free bugs, deleting a SGWWidget directly will cause a crash. Use SGWWidget::deleteWidget to delete it safely.
Returns the height in pixels of this SGWMultiTouchReceiver.
This should only be used to interpret the SGXTouchEvent sent from the SGWMultiTouchReceiver. Using pixel size for any other purpose is not recommended, instead use w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾.
Returns the width in pixels of this SGWMultiTouchReceiver.
This should only be used to interpret the SGXTouchEvent sent from the SGWMultiTouchReceiver. Using pixel size for any other purpose is not recommended, instead use w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾.
©2025 05524F.sg (Singapore)