11#include "../../c-api/gui/controls/spin.h"
128 m_controlHandle = m_interface->kodi_gui->window->get_control_spin(
129 m_interface->kodiBase, m_Window->GetControlHandle(), controlId);
130 if (!m_controlHandle)
132 "kodi::gui::controls::CSpin can't create control class from Kodi !!!");
151 m_interface->kodi_gui->control_spin->set_visible(m_interface->kodiBase, m_controlHandle,
164 m_interface->kodi_gui->control_spin->set_enabled(m_interface->kodiBase, m_controlHandle,
177 m_interface->kodi_gui->control_spin->set_text(m_interface->kodiBase, m_controlHandle,
188 m_interface->kodi_gui->control_spin->reset(m_interface->kodiBase, m_controlHandle);
202 m_interface->kodi_gui->control_spin->set_type(m_interface->kodiBase, m_controlHandle,
216 void AddLabel(
const std::string& label,
const std::string& value)
218 m_interface->kodi_gui->control_spin->add_string_label(m_interface->kodiBase, m_controlHandle,
219 label.c_str(), value.c_str());
234 m_interface->kodi_gui->control_spin->add_int_label(m_interface->kodiBase, m_controlHandle,
235 label.c_str(), value);
249 m_interface->kodi_gui->control_spin->set_string_value(m_interface->kodiBase, m_controlHandle,
265 char* ret = m_interface->kodi_gui->control_spin->get_string_value(m_interface->kodiBase,
269 if (std::strlen(ret))
271 m_interface->free_string(m_interface->kodiBase, ret);
294 m_interface->kodi_gui->control_spin->set_int_range(m_interface->kodiBase, m_controlHandle,
312 m_interface->kodi_gui->control_spin->set_int_value(m_interface->kodiBase, m_controlHandle,
329 return m_interface->kodi_gui->control_spin->get_int_value(m_interface->kodiBase,
354 m_interface->kodi_gui->control_spin->set_float_range(m_interface->kodiBase, m_controlHandle,
373 m_interface->kodi_gui->control_spin->set_float_value(m_interface->kodiBase, m_controlHandle,
386 return m_interface->kodi_gui->control_spin->get_float_value(m_interface->kodiBase,
405 m_interface->kodi_gui->control_spin->set_float_interval(m_interface->kodiBase, m_controlHandle,
@ ADDON_LOG_FATAL
4 : To notify fatal unrecoverable errors, which can may also indicate upcoming crashes.
Definition addon_base.h:197
CSpin(CWindow *window, int controlId)
Construct a new control.
Definition Spin.h:126
void SetFloatInterval(float interval)
To set the interval steps of spin, as default is it 0.1 If it becomes changed with this function will...
Definition Spin.h:403
void SetIntRange(int start, int end)
To set the the range as integer of slider, e.g. -10 is the slider start and e.g. +10 is the from here...
Definition Spin.h:292
void SetIntValue(int value)
Set the slider position with the given integer value. The Range must be defined with a call from SetI...
Definition Spin.h:310
void SetType(AddonGUISpinControlType type)
To set the with SpinControlType defined types of spin.
Definition Spin.h:200
void SetStringValue(const std::string &value)
To change the spin to position with them string as value.
Definition Spin.h:247
void Reset()
To reset spin control to defaults.
Definition Spin.h:186
float GetFloatValue() const
To get the current position as float value.
Definition Spin.h:384
void SetVisible(bool visible)
Set the control on window to visible.
Definition Spin.h:149
void SetText(const std::string &text)
To set the text string on spin control.
Definition Spin.h:175
void AddLabel(const std::string &label, const std::string &value)
To add a label entry in spin defined with a value as string.
Definition Spin.h:216
AddonGUISpinControlType
The values here defines the used value format for steps on spin control.
Definition Spin.h:104
~CSpin() override=default
Destructor.
void SetEnabled(bool enabled)
Set's the control's enabled/disabled state.
Definition Spin.h:162
void SetFloatValue(float value)
Set the spin position with the given float value. The Range can be defined with a call from SetIntRan...
Definition Spin.h:371
int GetIntValue() const
To get the current position as integer value.
Definition Spin.h:327
std::string GetStringValue() const
To get the current spin control position with text string value.
Definition Spin.h:262
void AddLabel(const std::string &label, int value)
To add a label entry in spin defined with a value as integer.
Definition Spin.h:232
void SetFloatRange(float start, float end)
To set the the range as float of spin, e.g. -25.0 is the spin start and e.g. +25.0 is the from here d...
Definition Spin.h:352
@ ADDON_SPIN_CONTROL_TYPE_TEXT
One spin step interpreted as text string.
Definition Spin.h:110
@ ADDON_SPIN_CONTROL_TYPE_PAGE
One spin step interpreted as a page change value.
Definition Spin.h:112
@ ADDON_SPIN_CONTROL_TYPE_INT
One spin step interpreted as integer.
Definition Spin.h:106
@ ADDON_SPIN_CONTROL_TYPE_FLOAT
One spin step interpreted as floating point value.
Definition Spin.h:108
void ATTR_DLL_LOCAL Log(const ADDON_LOG loglevel, const char *format,...)
Add a message to Kodi's log.
Definition AddonBase.h:1938