AbstractButton¶
Inherited: None
Description¶
The AbstractButton class provides a foundation for creating interactive buttons within a graphical user interface. It allows customization of various visual properties and handles user interaction events. Internal methods are marked as internal and are intended for use within the framework rather than by external code.
Public Methods¶
Frame * |
background () const |
color () const |
|
highlightedColor () const |
|
Image * |
icon () const |
iconSize () const |
|
bool |
isCheckable () const |
bool |
isChecked () const |
bool |
isExclusive () const |
bool |
isMirrored () const |
Label * |
label () const |
pressedColor () const |
|
void |
setBackground (Frame * frame) |
void |
setCheckable (bool checkable) |
void |
setChecked (bool checked) |
void |
setColor (const Vector4 & color) |
void |
setExclusive (bool exclusive) |
void |
setHighlightedColor (const Vector4 & color) |
void |
setIcon (Image * image) |
void |
setIconSize (const Vector2 & size) |
void |
setLabel (Label * label) |
void |
setMirrored (bool mirrored) |
void |
setPressedColor (const Vector4 & color) |
void |
setText (const TString text) |
text () const |
Static Methods¶
None
Methods Description¶
Frame * AbstractButton::background () const
Returns the background frame object associated with the button.
See also setBackground().
Vector4 AbstractButton::color () const
Returns the normal color of the button.
See also setColor().
Vector4 AbstractButton::highlightedColor () const
Returns the color used when the button is highlighted.
See also setHighlightedColor().
Image * AbstractButton::icon () const
Returns the icon associated with the button.
See also setIcon().
Vector2 AbstractButton::iconSize () const
Returns the size of the icon.
See also setIconSize().
bool AbstractButton::isCheckable () const
Returns true if the button is checkable; otherwise, false.
bool AbstractButton::isChecked () const
Returns true if the button is checked; otherwise, false.
bool AbstractButton::isExclusive () const
Returns true if the button is in exclusive mode; otherwise, false.
bool AbstractButton::isMirrored () const
Returns true if the button is mirrored; otherwise, false.
Label * AbstractButton::label () const
Returns the label object associated with the button.
See also setLabel().
Vector4 AbstractButton::pressedColor () const
Returns the color used when the button is pressed.
See also setPressedColor().
void AbstractButton::setBackground (Frame * frame)
Sets the background frame of the button.
See also background().
void AbstractButton::setCheckable (bool checkable)
Sets whether the button is checkable.
See also isCheckable().
void AbstractButton::setChecked (bool checked)
Sets the checked state of the button.
See also isChecked().
void AbstractButton::setColor (Vector4 & color)
Sets the normal color of the button.
See also color().
void AbstractButton::setExclusive (bool exclusive)
Sets whether the button is in exclusive mode.
See also isExclusive().
void AbstractButton::setHighlightedColor (Vector4 & color)
Sets the color used when the button is highlighted.
See also highlightedColor().
void AbstractButton::setIcon (Image * image)
Sets the icon image associated with the button.
See also icon().
void AbstractButton::setIconSize (Vector2 & size)
Sets the size of the icon.
See also iconSize().
void AbstractButton::setLabel (Label * label)
Sets the label associated with the button.
See also label().
void AbstractButton::setMirrored (bool mirrored)
Sets whether the button should be mirrored.
See also isMirrored().
void AbstractButton::setPressedColor (Vector4 & color)
Sets the color used when the button is pressed.
See also pressedColor().
void AbstractButton::setText (TString text)
Sets the text displayed on the button.
See also text().
TString AbstractButton::text () const
Returns the text displayed on the button.
See also setText().