sincerely
Singaporean
If you have not done so, read this full tutorial on how to use SGEXTN to build an application.
class SGWWidget;
part of SGEXTN module SG_Widgets
base class of all SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ UI element
list of all including inherited members
preprocessor file inclusion directive: #include ‹SGWWidget.h›
CMake target for BuildLah: SGEXTN::SG_Widgets
see this link for more information about BuildLah
parent class: (none)
children classes: SGRRendererWidget, SGWBackground, SGWBlankWidget, SGWButton, SGWColourPickerWidget, SGWInput, SGWLabel, SGWMultiTouchReceiver, SGWSingleTouchReceiver
void deleteWidget();
[[nodiscard]] SGLArray‹SGWWidget*› getChildren() const;
[[nodiscard]] float getH0() const;
[[nodiscard]] float getH1() const;
[[nodiscard]] bool getItemVisibility() const;
[[nodiscard]] SGWWidget* getParent() const;
[[nodiscard]] SGWType::Type getType() const;
[[nodiscard]] float getW0() const;
[[nodiscard]] float getW1() const;
[[nodiscard]] float getX0() const;
[[nodiscard]] float getX1() const;
[[nodiscard]] float getY0() const;
[[nodiscard]] float getY1() const;
void screenshot(void (*callback)(SGRImage*)) const;
void setH0(float h0);
void setH1(float h1);
void setItemVisibility(bool x);
void setW0(float w0);
void setW1(float w1);
void setX0(float x0);
void setX1(float x1);
void setY0(float y0);
void setY1(float y1);
static SGWWidget* parentWidget;
static SGWWidget* rootWidget;
SGWWidget is the base class of all SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ UI elements and provides w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ functionality. SGWWidget also allows child SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ elements to be deleted when the parent is deleted through maintaining a hierarchy tree.
Stores information about the SGWWidget
Deletes a SGWWidget safely.
To avoid use after delete bugs, deleting a SGWWidget directly will cause a crash.
Returns the children of this SGWWidget as a SGLArray of SGWWidget.
A SGWWidget can have more than 1 child SGWWidget.
Returns the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the height of this SGWWidget.
Returns the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the height of this SGWWidget.
Returns if the SGWWidget is currently visible on screen.
Returns the parent SGWWidget.
Returns the type of this SGWWidget as a SGWType.
Returns the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the width of this SGWWidget.
Returns the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the width of this SGWWidget.
Returns the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the x position of this SGWWidget.
Returns the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the x position of this SGWWidget.
Returns the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the y position of this SGWWidget.
Returns the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the y position of this SGWWidget.
Requests a screenshot of the current SGWWidget and all of its children. callback which is a callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ will be called with the SGRImage produced as argument when the screenshot is taken.
callback being nullptr will crash.
Sets the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the height of this SGWWidget to h0.
Sets the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the height of this SGWWidget to h1.
Shows the SGWWidget if x is true and hides it otherwise.
Sets the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the width of this SGWWidget to w0.
Sets the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the width of this SGWWidget to w1.
Sets the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the x position of this SGWWidget to x0.
Sets the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the x position of this SGWWidget to x1.
Sets the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the y position of this SGWWidget to y0.
Sets the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the y position of this SGWWidget to y1.
The SGWWidget that should contain all your SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ UI pages.
Attempting to modify this in any way, except for adding child SGWWidget objects, is undefined behaviour.
The SGWWidget directly attached to the application window.
Attempting to modify this in any way is undefined behaviour.
©2025 05524F.sg (Singapore)