Kodi Development  20.0
for Binary and Script based Add-Ons

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()

CTextBox ( CWindow window,
int  controlId 
)
inline

Construct a new control.

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

◆ ~CTextBox()

~CTextBox ( )
overridedefault

Destructor.

◆ SetVisible()

void SetVisible ( bool  visible)
inline

Set the control on window to visible.

Parameters
[in]visibleIf true visible, otherwise hidden

◆ Reset()

void Reset ( )
inline

To reset box an remove all the text.

◆ SetText()

void SetText ( const std::string &  text)
inline

To set the text on box.

Parameters
[in]textText to show

◆ GetText()

std::string GetText ( ) const
inline

Get the used text from control.

Returns
Text shown

◆ Scroll()

void Scroll ( unsigned int  position)
inline

To scroll text on other position.

Parameters
[in]positionThe line position to scroll to

◆ SetAutoScrolling()

void 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