sincerely Singaporean

If you have not done so, read this full tutorial on how to use SGEXTN to build an application.

SGWBlankWidget

see header file

see source file

class SGWBlankWidget;

part of SGEXTN module SG_Widgets

SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ coloured rectangle

detailed description

list of all including inherited members

implementation details

preprocessor file inclusion directive: #include ‹SGWBlankWidget.h›

CMake target for BuildLah: SGEXTN::SG_Widgets

see this link for more information about BuildLah

parent class: SGWWidget

children classes: (none)

instance member functions

SGWBlankWidget(SGWWidget* parent, float x1, float x0, float y1, float y0, float w1, float w0, float h1, float h0);

[[nodiscard]] SGXColourRGBA getColour(bool* isUsing) const;

[[nodiscard]] int getThemeColour(bool* isUsing) const;

void setColour(SGXColourRGBA colour);

void setThemeColour(int themeColour);

Detailed Description

SGWBlankWidget provides a SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ coloured rectangle. This does not block touch events from reaching any SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ below it. For backgrounds of UI pages, use a SGWBackground subclass instead.

Implementation Details

Stores information about the SGWBlankWidget

SGWBlankWidget(SGWWidget* parent, float x1, float x0, float y1, float y0, float w1, float w0, float h1, float h0);

Creates a SGWBlankWidget with parent SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ parent and w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ coordinates (x1, x0, y1, y0, w1, w0, h1, h0).

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.

[[nodiscard]] SGXColourRGBA getColour(bool* isUsing) const;

Returns the SGXColourRGBA currently being used for the background of this SGWBlankWidget. The bool that isUsing points to is set to true if theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode is off, and false otherwise.

If you are not interested in the current theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode, pass nullptr to isUsing.

[[nodiscard]] int getThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the background of this SGWBlankWidget. The bool that isUsing points to is set to true if theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode is on, and false otherwise.

If you are not interested in the current theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode, pass nullptr to isUsing.

void setColour(SGXColourRGBA colour);

Sets the SGXColourRGBA of the background of this SGWBlankWidget to colour and turns off theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode.

void setThemeColour(int themeColour);

Sets the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ of the background of this SGWBlankWidget to themeColour and turns on theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode.

©2025 05524F.sg (Singapore)

contact 05524F / report a bug / make a suggestion

about 05524F SINGAPORE values

list of 05524F projects