\cpp_class{ kodi::gui::controls::CRadioButton } Window control for a radio button (as used for on/off settings)
More...
\cpp_class{ kodi::gui::controls::CRadioButton } Window control for a radio button (as used for on/off settings)
The radio button control is used for creating push button on/off settings in Kodi. You can choose the position, size, and look of the button. When the user clicks on the radio button, the state will change, toggling the extra textures (textureradioon and textureradiooff). Used for settings controls.
It has the header #include <kodi/gui/controls/RadioButton.h> be included to enjoy it.
Here you find the needed skin part for a radio button control
- Note
- The call of the control is only possible from the corresponding window as its class and identification number is required.
◆ CRadioButton()
kodi::gui::controls::CRadioButton::CRadioButton |
( |
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::CRadioButton::GetLabel |
( |
| ) |
const |
|
inline |
Get the used text from control.
- Returns
- Text shown
◆ IsSelected()
bool kodi::gui::controls::CRadioButton::IsSelected |
( |
| ) |
const |
|
inline |
Get the current selected condition of radio button.
- Returns
- Selected condition
◆ SetEnabled()
void kodi::gui::controls::CRadioButton::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::CRadioButton::SetLabel |
( |
const std::string & |
label | ) |
|
|
inline |
To set the text string on radio button.
- Parameters
-
◆ SetSelected()
void kodi::gui::controls::CRadioButton::SetSelected |
( |
bool |
selected | ) |
|
|
inline |
To set radio button condition to on or off.
- Parameters
-
[in] | selected | true set radio button to selection on, otherwise off |
◆ SetVisible()
void kodi::gui::controls::CRadioButton::SetVisible |
( |
bool |
visible | ) |
|
|
inline |
Set the control on window to visible.
- Parameters
-
[in] | visible | If true visible, otherwise hidden |
◆ ~CRadioButton()
kodi::gui::controls::CRadioButton::~CRadioButton |
( |
| ) |
|
|
overridedefault |