sincerely Singaporean

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

SGWInput

see header file

see source file

class SGWInput;

part of SGEXTN module SG_Widgets

SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ input field base class

detailed description

list of all including inherited members

implementation details

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

CMake target for BuildLah: SGEXTN::SG_Widgets

see this link for more information about BuildLah

parent class: SGWWidget

children classes: SGWLongInput, SGWTextInput

instance member variables

int attachedInt;

SGXString attachedString;

void (*focusEndFunction)();

void (*focusEndFunctionWithInt)(int);

void (*focusEndFunctionWithPointer)(SGWInput*);

void (*focusEndFunctionWithString)(const SGXString&);

void (*focusStartFunction)();

void (*focusStartFunctionWithInt)(int);

void (*focusStartFunctionWithPointer)(SGWInput*);

void (*focusStartFunctionWithString)(const SGXString&);

void (*textChangedFunction)();

void (*textChangedFunctionWithInt)(int);

void (*textChangedFunctionWithPointer)(SGWInput*);

void (*textChangedFunctionWithString)(const SGXString&);

instance member functions

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

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

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

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

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

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

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

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

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

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

[[nodiscard]] float getF0() const;

[[nodiscard]] float getF1() const;

[[nodiscard]] SGXString getFont() const;

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

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

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

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

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

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

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

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

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

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

[[nodiscard]] SGWHorizontalAlignment::Flag getHorizontalAlignment() const;

[[nodiscard]] bool getInvalid() const;

[[nodiscard]] SGXString getPlaceholderText() const;

[[nodiscard]] float getTextAsFloat(bool* isValid, float minimum, float maximum) const;

[[nodiscard]] int getTextAsInt(bool* isValid, int minimum, int maximum) const;

[[nodiscard]] SGXString getTextAsString() const;

[[nodiscard]] SGWVerticalAlignment::Flag getVerticalAlignment() const;

void setBackgroundColour(SGXColourRGBA colour);

void setBackgroundFocusColour(SGXColourRGBA colour);

void setBackgroundFocusThemeColour(int themeColour);

void setBackgroundHoverColour(SGXColourRGBA colour);

void setBackgroundHoverInvalidColour(SGXColourRGBA colour);

void setBackgroundHoverInvalidThemeColour(int themeColour);

void setBackgroundHoverThemeColour(int themeColour);

void setBackgroundInvalidColour(SGXColourRGBA colour);

void setBackgroundInvalidThemeColour(int themeColour);

void setBackgroundThemeColour(int themeColour);

void setF0(float f0);

void setF1(float f1);

void setFont(const SGXString& font);

void setForegroundColour(SGXColourRGBA colour);

void setForegroundFocusColour(SGXColourRGBA colour);

void setForegroundFocusThemeColour(int themeColour);

void setForegroundHoverColour(SGXColourRGBA colour);

void setForegroundHoverInvalidColour(SGXColourRGBA colour);

void setForegroundHoverInvalidThemeColour(int themeColour);

void setForegroundHoverThemeColour(int themeColour);

void setForegroundInvalidColour(SGXColourRGBA colour);

void setForegroundInvalidThemeColour(int themeColour);

void setForegroundThemeColour(int themeColour);

void setHorizontalAlignment(SGWHorizontalAlignment::Flag alignment);

void setInvalid(bool invalid);

void setPlaceholderText(const SGXString& s);

void setTextFromFloat(float x);

void setTextFromInt(int x);

void setTextFromString(const SGXString& s);

void setVerticalAlignment(SGWVerticalAlignment::Flag alignment);

Detailed Description

SGWInput provides a base class for SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ input fields. This is not meant to be instantiated directly, you are supposed to create its subclasses (SGWTextInput, SGWLongInput) to use its functionality. This is interactive and can trigger callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ when focused, unfocused, or the text inside is modified. All SGWInput subclasses use SingCorrect ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾.

Implementation Details

Stores information about the SGWInput.

int attachedInt;

Int attached to this SGWInput.

This is used to identify the source of the callback in callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾.

SGXString attachedString;

String attached to this SGWInput.

This is used to identify the source of the callback in callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾.

void (*focusEndFunction)();

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking no arguments, triggered when the SGWInput is unfocused.

void (*focusEndFunctionWithInt)(int);

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking a int, triggered when this SGWInput is unfocused and SGWInput::attachedInt is passed as argument.

void (*focusEndFunctionWithPointer)(SGWInput*);

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking a pointer to SGWInput, triggered when the SGWInput is unfocused and the pointer to this SGWInput is passed as argument.

void (*focusEndFunctionWithString)(const SGXString&);

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking a string, triggered when the SGWInput is unfocused and SGWInput::attachedString is passed as argument.

void (*focusStartFunction)();

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking no arguments, triggered when the SGWInput is focused.

void (*focusStartFunctionWithInt)(int);

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking a int, triggered when this SGWInput is focused and SGWInput::attachedInt is passed as argument.

void (*focusStartFunctionWithPointer)(SGWInput*);

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking a pointer to SGWInput, triggered when the SGWInput is focused and the pointer to this SGWInput is passed as argument.

void (*focusStartFunctionWithString)(const SGXString&);

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking a string, triggered when the SGWInput is focused and SGWInput::attachedString is passed as argument.

void (*textChangedFunction)();

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking no arguments, triggered when the text in this SGWInput is changed.

void (*textChangedFunctionWithInt)(int);

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking a int, triggered when the text in this SGWInput is changed and SGWInput::attachedInt is passed as argument.

void (*textChangedFunctionWithPointer)(SGWInput*);

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking a pointer to SGWInput, triggered when the text on this SGWInput is changed and the pointer to this SGWInput is passed as argument.

void (*textChangedFunctionWithString)(const SGXString&);

callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ taking a string, triggered when the text in this SGWInput is changed and SGWInput::attachedString is passed as argument.

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

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

Returns the SGXColourRGBA currently being used for the background of this SGWInput 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 getBackgroundFocusThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the background of this SGWInput 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 getBackgroundHoverColour(bool* isUsing) const;

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

Returns the SGXColourRGBA currently being used for the background of this SGWInput when marked as invalid and 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 getBackgroundHoverInvalidThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the background of this SGWInput when marked as invalid and 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 getBackgroundHoverThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the background of this SGWInput 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]] SGXColourRGBA getBackgroundInvalidColour(bool* isUsing) const;

Returns the SGXColourRGBA currently being used for the background of this SGWInput when marked as invalid. 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 getBackgroundInvalidThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the background of this SGWInput when marked as invalid. 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 getBackgroundThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the background of this SGWInput. 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]] float getF0() const;

Gets the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the font size.

[[nodiscard]] float getF1() const;

Gets the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the font size.

[[nodiscard]] SGXString getFont() const;

Returns the current font used to display text in the SGWInput.

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

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

Returns the SGXColourRGBA currently being used for the foreground of this SGWInput 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 getForegroundFocusThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the foreground of this SGWInput 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 getForegroundHoverColour(bool* isUsing) const;

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

Returns the SGXColourRGBA currently being used for the foreground of this SGWInput when marked as invalid and 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 getForegroundHoverInvalidThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the foreground of this SGWInput when marked as invalid and 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 getForegroundHoverThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the foreground of this SGWInput 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]] SGXColourRGBA getForegroundInvalidColour(bool* isUsing) const;

Returns the SGXColourRGBA currently being used for the foreground of this SGWInput when marked as invalid. 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 getForegroundInvalidThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the foreground of this SGWInput when marked as invalid. 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 getForegroundThemeColour(bool* isUsing) const;

Returns the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ currently being used for the foreground of this SGWInput. 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]] SGWHorizontalAlignment::Flag getHorizontalAlignment() const;

Returns the current SGWHorizontalAlignment mode used to display text in this SGWInput.

[[nodiscard]] bool getInvalid() const;

Returns if the SGWInput is currently set to invalid.

[[nodiscard]] SGXString getPlaceholderText() const;

Returns the current placeholder text used by this SGWInput.

[[nodiscard]] float getTextAsFloat(bool* isValid, float minimum, float maximum) const;

Returns the text displayed in the SGWInput as a number between minimum and maximum inclusive. If the text does not represent a number or if it is out of bounds, isValid is set to false and 0 is returned, otherwise isValid is set to true.

Pass nullptr to isValid if you are not interested if the text represents a number and the integer is in bounds.

minimum more than maximum is undefined behaviour.

[[nodiscard]] int getTextAsInt(bool* isValid, int minimum, int maximum) const;

Returns the text displayed in the SGWInput as an integer between minimum and maximum inclusive. If the text does not represent an integer or if it is out of bounds, isValid is set to false and 0 is returned, otherwise isValid is set to true.

Pass nullptr to isValid if you are not interested if the text represents an integer and the integer is in bounds.

minimum more than maximum is undefined behaviour.

[[nodiscard]] SGXString getTextAsString() const;

Returns the text displayed in the SGWInput.

[[nodiscard]] SGWVerticalAlignment::Flag getVerticalAlignment() const;

Returns the current SGWVerticalAlignment mode used to display text in this SGWInput.

void setBackgroundColour(SGXColourRGBA colour);

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

void setBackgroundFocusColour(SGXColourRGBA colour);

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

void setBackgroundFocusThemeColour(int themeColour);

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

void setBackgroundHoverColour(SGXColourRGBA colour);

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

void setBackgroundHoverInvalidColour(SGXColourRGBA colour);

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

void setBackgroundHoverInvalidThemeColour(int themeColour);

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

void setBackgroundHoverThemeColour(int themeColour);

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

void setBackgroundInvalidColour(SGXColourRGBA colour);

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

void setBackgroundInvalidThemeColour(int themeColour);

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

void setBackgroundThemeColour(int themeColour);

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

void setF0(float f0);

Sets the 0 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the font size to f0.

void setF1(float f1);

Sets the 1 coordinate of the w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ controlling the font size to f1.

void setFont(const SGXString& font);

Sets the SGWInput to use font to display text.

If font is not a valid font, this is undefined behaviour.

void setForegroundColour(SGXColourRGBA colour);

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

void setForegroundFocusColour(SGXColourRGBA colour);

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

void setForegroundFocusThemeColour(int themeColour);

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

void setForegroundHoverColour(SGXColourRGBA colour);

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

void setForegroundHoverInvalidColour(SGXColourRGBA colour);

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

void setForegroundHoverInvalidThemeColour(int themeColour);

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

void setForegroundHoverThemeColour(int themeColour);

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

void setForegroundInvalidColour(SGXColourRGBA colour);

Sets the SGXColourRGBA of the foreground of this SGWInput when marked as invalid to colour and turns off theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode.

void setForegroundInvalidThemeColour(int themeColour);

Sets the theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ of the foreground of this SGWInput when marked as invalid to themeColour and turns on theme colour ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ mode.

void setForegroundThemeColour(int themeColour);

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

void setHorizontalAlignment(SGWHorizontalAlignment::Flag alignment);

Sets the SGWHorizontalAlignment mode used to display text in this SGWInput to alignment.

void setInvalid(bool invalid);

If invalid is true, set the SGWInput to invalid, otherwise set the SGWInput to not invalid.

void setPlaceholderText(const SGXString& s);

Sets the placeholder text for the SGWInput to s.

void setTextFromFloat(float x);

Sets the text currently displayed in the SGWInput to the string representation of x.

void setTextFromInt(int x);

Sets the text currently displayed in the SGWInput to the string representation of x.

void setTextFromString(const SGXString& s);

Sets the text currently displayed in the SGWInput to s.

void setVerticalAlignment(SGWVerticalAlignment::Flag alignment);

Sets the SGWVerticalAlignment mode used to display text in this SGWInput to alignment.

©2025 05524F.sg (Singapore)

contact 05524F / report a bug / make a suggestion

about 05524F SINGAPORE values

list of 05524F projects