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

Class: kodi::gui::controls::CTextBox

Used to show a multi-page piece of text
The text box control can be used to display descriptions, help texts or other larger texts. More...

Functions

 kodi::gui::controls::CTextBox::CTextBox (CWindow *window, int controlId)
 Construct a new control.
 
 kodi::gui::controls::CTextBox::~CTextBox () override=default
 Destructor.
 
void kodi::gui::controls::CTextBox::SetVisible (bool visible)
 Set the control on window to visible.
 
void kodi::gui::controls::CTextBox::Reset ()
 To reset box an remove all the text.
 
void kodi::gui::controls::CTextBox::SetText (const std::string &text)
 To set the text on box.
 
std::string kodi::gui::controls::CTextBox::GetText () const
 Get the used text from control.
 
void kodi::gui::controls::CTextBox::Scroll (unsigned int position)
 To scroll text on other position.
 
void kodi::gui::controls::CTextBox::SetAutoScrolling (int delay, int time, int repeat)
 To set automatic scrolling of textbox.
 

Detailed Description

Class: kodi::gui::controls::CTextBox

Used to show a multi-page piece of text
The text box control can be used to display descriptions, help texts or other larger texts.

It corresponds to the representation which is also to be seen on the CDialogTextViewer.

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

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

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

Function Documentation

◆ CTextBox()

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

Construct a new control.

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

◆ GetText()

std::string kodi::gui::controls::CTextBox::GetText ( ) const
inline

Get the used text from control.

Returns
Text shown

◆ Reset()

void kodi::gui::controls::CTextBox::Reset ( )
inline

To reset box an remove all the text.

◆ Scroll()

void kodi::gui::controls::CTextBox::Scroll ( unsigned int position)
inline

To scroll text on other position.

Parameters
[in]positionThe line position to scroll to

◆ SetAutoScrolling()

void kodi::gui::controls::CTextBox::SetAutoScrolling ( int delay,
int time,
int repeat )
inline

To set automatic scrolling of textbox.

Specifies the timing and conditions of any autoscrolling this textbox should have. Times are in milliseconds. The content is delayed for the given delay, then scrolls at a rate of one line per time interval until the end. If the repeat tag is present, it then delays for the repeat time, fades out over 1 second, and repeats. It does not wrap or reset to the top at the end of the scroll.

Parameters
[in]delayContent delay
[in]timeOne line per time interval
[in]repeatDelays with given time, fades out over 1 second, and repeats

◆ SetText()

void kodi::gui::controls::CTextBox::SetText ( const std::string & text)
inline

To set the text on box.

Parameters
[in]textText to show

◆ SetVisible()

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

Set the control on window to visible.

Parameters
[in]visibleIf true visible, otherwise hidden

◆ ~CTextBox()

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

Destructor.