Kodi Development  20.0
for Binary and Script based Add-Ons

Detailed Description

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.

Function Documentation

◆ CButton()

CButton ( CWindow window,
int  controlId 
)
inline

Construct a new control.

Parameters
[in]windowRelated window control class
[in]controlIdUsed skin xml control id

◆ ~CButton()

~CButton ( )
overridedefault

Destructor.

◆ SetVisible()

void SetVisible ( bool  visible)
inline

Set the control on window to visible.

Parameters
[in]visibleIf true visible, otherwise hidden

◆ SetEnabled()

void SetEnabled ( bool  enabled)
inline

Set's the control's enabled/disabled state.

Parameters
[in]enabledIf true enabled, otherwise disabled

◆ SetLabel()

void SetLabel ( const std::string &  label)
inline

To set the text string on button.

Parameters
[in]labelText to show

◆ 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]labelText for second label

◆ GetLabel2()

std::string GetLabel2 ( ) const
inline

Get the second label if present.

Returns
Second label