sincerely Singaporean

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

SGWLongLabel

see header file

see source file

class SGWLongLabel;

part of SGEXTN module SG_Widgets

SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ multi line scrollable text label

detailed description

list of all including inherited members

implementation details

preprocessor file inclusion directive: #include ‹SGWLongLabel.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

SGWLongLabel(SGWWidget* parent, const SGXString& s, float x1, float x0, float y1, float y0, float w1, float w0, float h1, float h0, float f1, float f0, float s1, float s0, float p1, float p0);

[[nodiscard]] float getP0() const;

[[nodiscard]] float getP1() const;

[[nodiscard]] float getS0() const;

[[nodiscard]] float getS1() const;

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

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

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

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

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

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

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

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

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

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

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

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

void setP0(float p0);

void setP1(float p1);

void setS0(float s0);

void setS1(float s1);

void setScrollbarBackgroundColour(SGXColourRGBA colour);

void setScrollbarBackgroundFocusColour(SGXColourRGBA colour);

void setScrollbarBackgroundFocusThemeColour(int themeColour);

void setScrollbarBackgroundHoverColour(SGXColourRGBA colour);

void setScrollbarBackgroundHoverThemeColour(int themeColour);

void setScrollbarBackgroundThemeColour(int themeColour);

void setScrollbarForegroundColour(SGXColourRGBA colour);

void setScrollbarForegroundFocusColour(SGXColourRGBA colour);

void setScrollbarForegroundFocusThemeColour(int themeColour);

void setScrollbarForegroundHoverColour(SGXColourRGBA colour);

void setScrollbarForegroundHoverThemeColour(int themeColour);

void setScrollbarForegroundThemeColour(int themeColour);

Detailed Description

SGWLongLabel provides a multi line scrollable text label for SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾. It has automatic padding that makes text easier to read and a builtin scrollbar. If the scrollbar is not needed (due to the label being in a SGWSequentialScrollView), use a SGWSequentialLongLabel instead.

Implementation Details

Stores information about the SGWLongLabel.

SGWLongLabel(SGWWidget* parent, const SGXString& s, float x1, float x0, float y1, float y0, float w1, float w0, float h1, float h0, float f1, float f0, float s1, float s0, float p1, float p0);

Creates a SGWLongLabel with parent SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ parent, w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ coordinates (x1, x0, y1, y0, w1, w0, h1, h0). Additionally, the font size has a w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ of (f1, f0), the scrollbar width has a w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ of (s1, s0), the padding has a w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ of (p1, p0), and the SGWLongLabel displays the text s.

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]] float getP0() const;

Returns the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the padding around text.

[[nodiscard]] float getP1() const;

Returns the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the padding around text.

[[nodiscard]] float getS0() const;

Returns the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the scrollbar width.

[[nodiscard]] float getS1() const;

Returns the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the scrollbar width.

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

Returns the SGXColourRGBA currently being used for the scrollbar background of this SGWLongLabel. 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]] SGXColourRGBA getScrollbarBackgroundFocusColour(bool* isUsing) const;

Returns the SGXColourRGBA currently being used for the scrollbar background of this SGWLongLabel when focused. 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 getScrollbarBackgroundFocusThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the scrollbar background of this SGWLongLabel when focused. 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.

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

Returns the SGXColourRGBA currently being used for the scrollbar background of this SGWLongLabel when hovered over. 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 getScrollbarBackgroundHoverThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the scrollbar background of this SGWLongLabel when hovered over. 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.

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

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the scrollbar background of this SGWLongLabel. 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.

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

Returns the SGXColourRGBA currently being used for the scrollbar foreground of this SGWLongLabel. 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]] SGXColourRGBA getScrollbarForegroundFocusColour(bool* isUsing) const;

Returns the SGXColourRGBA currently being used for the scrollbar foreground of this SGWLongLabel when focused. 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 getScrollbarForegroundFocusThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the scrollbar foreground of this SGWLongLabel when focused. 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.

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

Returns the SGXColourRGBA currently being used for the scrollbar foreground of this SGWLongLabel when hovered over. 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 getScrollbarForegroundHoverThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the scrollbar foreground of this SGWLongLabel when hovered over. 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.

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

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the scrollbar foreground of this SGWLongLabel. 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 setP0(float p0);

Sets the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the padding around text to p0.

void setP1(float p1);

Sets the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the padding around text to p1.

void setS0(float s0);

Sets the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the scrollbar width to s0.

void setS1(float s1);

Sets the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the scrollbar width to s1.

void setScrollbarBackgroundColour(SGXColourRGBA colour);

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

void setScrollbarBackgroundFocusColour(SGXColourRGBA colour);

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

void setScrollbarBackgroundFocusThemeColour(int themeColour);

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

void setScrollbarBackgroundHoverColour(SGXColourRGBA colour);

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

void setScrollbarBackgroundHoverThemeColour(int themeColour);

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

void setScrollbarBackgroundThemeColour(int themeColour);

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

void setScrollbarForegroundColour(SGXColourRGBA colour);

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

void setScrollbarForegroundFocusColour(SGXColourRGBA colour);

Sets the SGXColourRGBA of the scrollbar foreground of this SGWLongLabel when focused to colour and turns off theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode.

void setScrollbarForegroundFocusThemeColour(int themeColour);

Sets the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ of the scrollbar foreground of this SGWLongLabel when focused to themeColour and turns on theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode.

void setScrollbarForegroundHoverColour(SGXColourRGBA colour);

Sets the SGXColourRGBA of the scrollbar foreground of this SGWLongLabel when hovered over to colour and turns off theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode.

void setScrollbarForegroundHoverThemeColour(int themeColour);

Sets the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ of the scrollbar foreground of this SGWLongLabel when hovered over to themeColour and turns on theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode.

void setScrollbarForegroundThemeColour(int themeColour);

Sets the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ of the scrollbar foreground of this SGWLongLabel 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