Class: kodi::gui::controls::CButton
Standard push button control for window
The button control is used for creating push buttons in Kodi.
More...
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()
kodi::gui::controls::CButton::CButton |
( |
CWindow * | window, |
|
|
int | controlId ) |
|
inline |
Construct a new control.
- Parameters
-
[in] | window | Related window control class |
[in] | controlId | Used skin xml control id |
◆ GetLabel()
std::string kodi::gui::controls::CButton::GetLabel |
( |
| ) |
const |
|
inline |
Get the used text from button.
- Returns
- Text shown
◆ GetLabel2()
std::string kodi::gui::controls::CButton::GetLabel2 |
( |
| ) |
const |
|
inline |
Get the second label if present.
- Returns
- Second label
◆ SetEnabled()
void kodi::gui::controls::CButton::SetEnabled |
( |
bool | enabled | ) |
|
|
inline |
Set's the control's enabled/disabled state.
- Parameters
-
[in] | enabled | If true enabled, otherwise disabled |
◆ SetLabel()
void kodi::gui::controls::CButton::SetLabel |
( |
const std::string & | label | ) |
|
|
inline |
To set the text string on button.
- Parameters
-
◆ SetLabel2()
void kodi::gui::controls::CButton::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 |
◆ SetVisible()
void kodi::gui::controls::CButton::SetVisible |
( |
bool | visible | ) |
|
|
inline |
Set the control on window to visible.
- Parameters
-
[in] | visible | If true visible, otherwise hidden |
◆ ~CButton()
kodi::gui::controls::CButton::~CButton |
( |
| ) |
|
|
overridedefault |