Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

Class: kodi::gui::controls::CLabel

Window control used to show some lines of text
The label control is used for displaying text in Kodi. You can choose the font, size, colour, location and contents of the text to be displayed. More...

Functions

 kodi::gui::controls::CLabel::CLabel (CWindow *window, int controlId)
 Construct a new control.
 
 kodi::gui::controls::CLabel::~CLabel () override=default
 Destructor.
 
void kodi::gui::controls::CLabel::SetVisible (bool visible)
 Set the control on window to visible.
 
void kodi::gui::controls::CLabel::SetLabel (const std::string &text)
 To set the text string on label.
 
std::string kodi::gui::controls::CLabel::GetLabel () const
 Get the used text from control.
 

Detailed Description

Class: kodi::gui::controls::CLabel

Window control used to show some lines of text
The label control is used for displaying text in Kodi. You can choose the font, size, colour, location and contents of the text to be displayed.

It has the header #include <kodi/gui/controls/Label.h> be included to enjoy it.

Here you find the needed skin part for a label control.

Note
The call of the control is only possible from the corresponding window as its class and identification number is required.

Function Documentation

◆ CLabel()

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

Construct a new control.

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

◆ GetLabel()

std::string kodi::gui::controls::CLabel::GetLabel ( ) const
inline

Get the used text from control.

Returns
Used text on label control

◆ SetLabel()

void kodi::gui::controls::CLabel::SetLabel ( const std::string & text)
inline

To set the text string on label.

Parameters
[in]textText to show

◆ SetVisible()

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

Set the control on window to visible.

Parameters
[in]visibleIf true visible, otherwise hidden

◆ ~CLabel()

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

Destructor.