Kodi Development  20.0
for Binary and Script based Add-Ons

Detailed Description

Class: kodi::gui::controls::CEdit

Editable window text control used as an input control for the osd keyboard and other input fields
The edit control allows a user to input text in Kodi.

You can choose the font, size, colour, location and header of the text to be displayed.

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

Here you find the needed skin partfor a edit control.

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

Modules

 Definitions, structures and enumerators
 Library definition values
 

Function Documentation

◆ CEdit()

CEdit ( CWindow window,
int  controlId 
)
inline

Construct a new control.

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

◆ ~CEdit()

~CEdit ( )
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 edit control.

Parameters
[in]labelText to show

◆ GetLabel()

std::string GetLabel ( ) const
inline

Returns the text heading for this edit control.

Returns
Heading text

◆ SetText()

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

Set's text heading for this edit control.

Parameters
[in]textstring or unicode - text string.

◆ GetText()

std::string GetText ( ) const
inline

Returns the text value for this edit control.

Returns
Text value of control

◆ SetCursorPosition()

void SetCursorPosition ( unsigned int  position)
inline

Set the cursor position on text.

Parameters
[in]positionThe position to set

◆ GetCursorPosition()

unsigned int GetCursorPosition ( )
inline

To get current cursor position on text field.

Returns
The current cursor position

◆ SetInputType()

void SetInputType ( AddonGUIInputType  type,
const std::string &  heading 
)
inline

To set field input type which are defined on AddonGUIInputType.

Parameters
[in]typeThe Add-on input type to use
[in]headingThe heading text for related keyboard dialog