Class: kodi::gui::controls::CButton
Standard push button control for window
The button control is used for creating push buttons in Kodi.
You can choose the position, size, and look of the button, as well as choosing what action(s) should be performed when pushed.
It has the header #include <kodi/gui/controls/Button.h> be included to enjoy it.
Here you find the needed skin part for a button control
- Note
- The call of the control is only possible from the corresponding window as its class and identification number is required.
◆ CButton()
Construct a new control.
- Parameters
-
[in] | window | Related window control class |
[in] | controlId | Used skin xml control id |
◆ ~CButton()
◆ SetVisible()
void SetVisible |
( |
bool | visible | ) |
|
|
inline |
Set the control on window to visible.
- Parameters
-
[in] | visible | If true visible, otherwise hidden |
◆ SetEnabled()
void SetEnabled |
( |
bool | enabled | ) |
|
|
inline |
Set's the control's enabled/disabled state.
- Parameters
-
[in] | enabled | If true enabled, otherwise disabled |
◆ SetLabel()
void SetLabel |
( |
const std::string & | label | ) |
|
|
inline |
To set the text string on button.
- Parameters
-
◆ GetLabel()
std::string GetLabel |
( |
| ) |
const |
|
inline |
Get the used text from button.
- Returns
- Text shown
◆ SetLabel2()
void SetLabel2 |
( |
const std::string & | label | ) |
|
|
inline |
If two labels are used for button becomes it set with them.
- Parameters
-
[in] | label | Text for second label |
◆ GetLabel2()
std::string GetLabel2 |
( |
| ) |
const |
|
inline |
Get the second label if present.
- Returns
- Second label