Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
kodi::gui::controls::CButton Class Reference

#include <Button.h>

Inheritance diagram for kodi::gui::controls::CButton:
kodi::gui::CAddonGUIControlBase

Public Member Functions

 CButton (CWindow *window, int controlId)
 Construct a new control. More...
 
 ~CButton () override=default
 Destructor. More...
 
void SetVisible (bool visible)
 Set the control on window to visible. More...
 
void SetEnabled (bool enabled)
 Set's the control's enabled/disabled state. More...
 
void SetLabel (const std::string &label)
 To set the text string on button. More...
 
std::string GetLabel () const
 Get the used text from button. More...
 
void SetLabel2 (const std::string &label)
 If two labels are used for button becomes it set with them. More...
 
std::string GetLabel2 () const
 Get the second label if present. More...
 
- Public Member Functions inherited from kodi::gui::CAddonGUIControlBase
GUIHANDLE GetControlHandle () const
 

Additional Inherited Members

- Protected Member Functions inherited from kodi::gui::CAddonGUIControlBase
 CAddonGUIControlBase (CAddonGUIControlBase *window)
 
virtual ~CAddonGUIControlBase ()=default
 
- Protected Attributes inherited from kodi::gui::CAddonGUIControlBase
GUIHANDLE m_controlHandle
 
AddonToKodiFuncTable_Addonm_interface
 
CAddonGUIControlBasem_Window
 

Constructor & Destructor Documentation

◆ CButton()

kodi::gui::controls::CButton::CButton ( CWindow window,
int  controlId 
)
inline

Construct a new control.

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

◆ ~CButton()

kodi::gui::controls::CButton::~CButton ( )
overridedefault

Destructor.

Member Function Documentation

◆ 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]enabledIf true enabled, otherwise disabled

◆ SetLabel()

void kodi::gui::controls::CButton::SetLabel ( const std::string &  label)
inline

To set the text string on button.

Parameters
[in]labelText to show

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

◆ SetVisible()

void kodi::gui::controls::CButton::SetVisible ( bool  visible)
inline

Set the control on window to visible.

Parameters
[in]visibleIf true visible, otherwise hidden

The documentation for this class was generated from the following file: