sincerely Singaporean

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

SGWIconLabel

see header file

see source file

class SGWIconLabel;

part of SGEXTN module SG_Widgets

SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ label displaying an icon

detailed description

list of all including inherited members

implementation details

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

CMake target for BuildLah: SGEXTN::SG_Widgets

see this link for more information about BuildLah

parent class: SGWLabel

children classes: (none)

instance member functions

SGWIconLabel(SGWWidget* parent, SGXChar s, float x1, float x0, float y1, float y0, float w1, float w0);

[[nodiscard]] SGXChar getChar() const;

void setChar(SGXChar c);

Detailed Description

SGWIconLabel provides a label that displays an icon for SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾. To use this, the application icon ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ font must be provided.

Implementation Details

Stores information about the SGWIconLabel.

SGWIconLabel(SGWWidget* parent, SGXChar s, float x1, float x0, float y1, float y0, float w1, float w0);

Creates a SGWIconLabel with parent SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ parent, w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ coordinates (x1, x0, y1, y0, w1, w0, ?, ?), and application icon ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ s. The height of the SGWIconLabel is always equal to its width.

s should be present in the application icon ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ font. It is recommended that it be in the Unicode private use range.

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]] SGXChar getChar() const;

Returns the SGXChar currently being displayed by the SGWIconLabel.

void setChar(SGXChar c);

Sets the SGWIconLabel to display the SGXChar c.

©2025 05524F.sg (Singapore)

contact 05524F / report a bug / make a suggestion

about 05524F SINGAPORE values

list of 05524F projects