11#include "../../c-api/gui/controls/edit.h"
63 m_controlHandle = m_interface->kodi_gui->window->get_control_edit(
64 m_interface->kodiBase, m_Window->GetControlHandle(), controlId);
67 "kodi::gui::control::CEdit can't create control class from Kodi !!!");
86 m_interface->kodi_gui->control_edit->set_visible(m_interface->kodiBase, m_controlHandle,
99 m_interface->kodi_gui->control_edit->set_enabled(m_interface->kodiBase, m_controlHandle,
112 m_interface->kodi_gui->control_edit->set_label(m_interface->kodiBase, m_controlHandle,
127 m_interface->kodi_gui->control_edit->get_label(m_interface->kodiBase, m_controlHandle);
130 if (std::strlen(ret))
132 m_interface->free_string(m_interface->kodiBase, ret);
146 m_interface->kodi_gui->control_edit->set_text(m_interface->kodiBase, m_controlHandle,
161 m_interface->kodi_gui->control_edit->get_text(m_interface->kodiBase, m_controlHandle);
164 if (std::strlen(ret))
166 m_interface->free_string(m_interface->kodiBase, ret);
180 m_interface->kodi_gui->control_edit->set_cursor_position(m_interface->kodiBase, m_controlHandle,
193 return m_interface->kodi_gui->control_edit->get_cursor_position(m_interface->kodiBase,
207 m_interface->kodi_gui->control_edit->set_input_type(m_interface->kodiBase, m_controlHandle,
208 static_cast<int>(type), heading.c_str());
@ ADDON_LOG_FATAL
4 : To notify fatal unrecoverable errors, which can may also indicate upcoming crashes.
Definition addon_base.h:197
AddonGUIInputType
Text input types used on kodi::gui::controls::CEdit.
Definition edit.h:25
std::string GetText() const
Returns the text value for this edit control.
Definition Edit.h:157
std::string GetLabel() const
Returns the text heading for this edit control.
Definition Edit.h:123
CEdit(CWindow *window, int controlId)
Construct a new control.
Definition Edit.h:61
void SetVisible(bool visible)
Set the control on window to visible.
Definition Edit.h:84
void SetText(const std::string &text)
Set's text heading for this edit control.
Definition Edit.h:144
~CEdit() override=default
Destructor.
unsigned int GetCursorPosition()
To get current cursor position on text field.
Definition Edit.h:191
void SetEnabled(bool enabled)
Set's the control's enabled/disabled state.
Definition Edit.h:97
void SetLabel(const std::string &label)
To set the text string on edit control.
Definition Edit.h:110
void SetCursorPosition(unsigned int position)
Set the cursor position on text.
Definition Edit.h:178
void SetInputType(AddonGUIInputType type, const std::string &heading)
To set field input type which are defined on AddonGUIInputType.
Definition Edit.h:205
void ATTR_DLL_LOCAL Log(const ADDON_LOG loglevel, const char *format,...)
Add a message to Kodi's log.
Definition AddonBase.h:1938