diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h | 550 |
1 files changed, 282 insertions, 268 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h index 4f97ba5..76a02aa 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h | |||
| @@ -18,294 +18,308 @@ namespace gui | |||
| 18 | namespace controls | 18 | namespace controls |
| 19 | { | 19 | { |
| 20 | 20 | ||
| 21 | //============================================================================ | 21 | //============================================================================ |
| 22 | /// | ||
| 23 | /// \defgroup cpp_kodi_gui_controls_CSettingsSlider Control Settings Slider | ||
| 24 | /// \ingroup cpp_kodi_gui | ||
| 25 | /// @brief \cpp_class{ kodi::gui::controls::CSettingsSlider } | ||
| 26 | /// **Window control for moveable slider with text name** | ||
| 27 | /// | ||
| 28 | /// The settings slider control is used in the settings screens for when an | ||
| 29 | /// option is best specified on a sliding scale. You can choose the position, | ||
| 30 | /// size, and look of the slider control. It is basically a cross between the | ||
| 31 | /// button control and a slider control. It has a label and focus and non | ||
| 32 | /// focus textures, as well as a slider control on the right. | ||
| 33 | /// | ||
| 34 | /// It has the header \ref SettingsSlider.h "#include <kodi/gui/controls/SettingsSlider.h>" | ||
| 35 | /// be included to enjoy it. | ||
| 36 | /// | ||
| 37 | /// Here you find the needed skin part for a \ref Settings_Slider_Control "settings slider control" | ||
| 38 | /// | ||
| 39 | /// @note The call of the control is only possible from the corresponding | ||
| 40 | /// window as its class and identification number is required. | ||
| 41 | /// | ||
| 42 | class ATTRIBUTE_HIDDEN CSettingsSlider : public CAddonGUIControlBase | ||
| 43 | { | ||
| 44 | public: | ||
| 45 | //========================================================================== | ||
| 22 | /// | 46 | /// |
| 23 | /// \defgroup cpp_kodi_gui_controls_CSettingsSlider Control Settings Slider | 47 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 24 | /// \ingroup cpp_kodi_gui | 48 | /// @brief Construct a new control |
| 25 | /// @brief \cpp_class{ kodi::gui::controls::CSettingsSlider } | ||
| 26 | /// **Window control for moveable slider with text name** | ||
| 27 | /// | 49 | /// |
| 28 | /// The settings slider control is used in the settings screens for when an | 50 | /// @param[in] window related window control class |
| 29 | /// option is best specified on a sliding scale. You can choose the position, | 51 | /// @param[in] controlId Used skin xml control id |
| 30 | /// size, and look of the slider control. It is basically a cross between the | ||
| 31 | /// button control and a slider control. It has a label and focus and non | ||
| 32 | /// focus textures, as well as a slider control on the right. | ||
| 33 | /// | 52 | /// |
| 34 | /// It has the header \ref SettingsSlider.h "#include <kodi/gui/controls/SettingsSlider.h>" | 53 | CSettingsSlider(CWindow* window, int controlId) : CAddonGUIControlBase(window) |
| 35 | /// be included to enjoy it. | 54 | { |
| 55 | m_controlHandle = m_interface->kodi_gui->window->get_control_settings_slider( | ||
| 56 | m_interface->kodiBase, m_Window->GetControlHandle(), controlId); | ||
| 57 | if (!m_controlHandle) | ||
| 58 | kodi::Log(ADDON_LOG_FATAL, | ||
| 59 | "kodi::gui::controls::CSettingsSlider can't create control class from Kodi !!!"); | ||
| 60 | } | ||
| 61 | //-------------------------------------------------------------------------- | ||
| 62 | |||
| 63 | //========================================================================== | ||
| 36 | /// | 64 | /// |
| 37 | /// Here you find the needed skin part for a \ref Settings_Slider_Control "settings slider control" | 65 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 66 | /// @brief Destructor | ||
| 67 | /// | ||
| 68 | ~CSettingsSlider() override = default; | ||
| 69 | //-------------------------------------------------------------------------- | ||
| 70 | |||
| 71 | //========================================================================== | ||
| 38 | /// | 72 | /// |
| 39 | /// @note The call of the control is only possible from the corresponding | 73 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 40 | /// window as its class and identification number is required. | 74 | /// @brief Set the control on window to visible |
| 41 | /// | 75 | /// |
| 42 | class CSettingsSlider : public CAddonGUIControlBase | 76 | /// @param[in] visible If true visible, otherwise hidden |
| 77 | /// | ||
| 78 | void SetVisible(bool visible) | ||
| 43 | { | 79 | { |
| 44 | public: | 80 | m_interface->kodi_gui->control_settings_slider->set_visible(m_interface->kodiBase, |
| 45 | //========================================================================== | 81 | m_controlHandle, visible); |
| 46 | /// | 82 | } |
| 47 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 83 | //-------------------------------------------------------------------------- |
| 48 | /// @brief Construct a new control | ||
| 49 | /// | ||
| 50 | /// @param[in] window related window control class | ||
| 51 | /// @param[in] controlId Used skin xml control id | ||
| 52 | /// | ||
| 53 | CSettingsSlider(CWindow* window, int controlId) | ||
| 54 | : CAddonGUIControlBase(window) | ||
| 55 | { | ||
| 56 | m_controlHandle = m_interface->kodi_gui->window->get_control_settings_slider(m_interface->kodiBase, m_Window->GetControlHandle(), controlId); | ||
| 57 | if (!m_controlHandle) | ||
| 58 | kodi::Log(ADDON_LOG_FATAL, "kodi::gui::controls::CSettingsSlider can't create control class from Kodi !!!"); | ||
| 59 | } | ||
| 60 | //-------------------------------------------------------------------------- | ||
| 61 | |||
| 62 | //========================================================================== | ||
| 63 | /// | ||
| 64 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | ||
| 65 | /// @brief Destructor | ||
| 66 | /// | ||
| 67 | ~CSettingsSlider() override = default; | ||
| 68 | //-------------------------------------------------------------------------- | ||
| 69 | 84 | ||
| 70 | //========================================================================== | 85 | //========================================================================== |
| 71 | /// | 86 | /// |
| 72 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 87 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 73 | /// @brief Set the control on window to visible | 88 | /// @brief Set's the control's enabled/disabled state |
| 74 | /// | 89 | /// |
| 75 | /// @param[in] visible If true visible, otherwise hidden | 90 | /// @param[in] enabled If true enabled, otherwise disabled |
| 76 | /// | 91 | /// |
| 77 | void SetVisible(bool visible) | 92 | void SetEnabled(bool enabled) |
| 78 | { | 93 | { |
| 79 | m_interface->kodi_gui->control_settings_slider->set_visible(m_interface->kodiBase, m_controlHandle, visible); | 94 | m_interface->kodi_gui->control_settings_slider->set_enabled(m_interface->kodiBase, |
| 80 | } | 95 | m_controlHandle, enabled); |
| 81 | //-------------------------------------------------------------------------- | 96 | } |
| 82 | 97 | //-------------------------------------------------------------------------- | |
| 83 | //========================================================================== | ||
| 84 | /// | ||
| 85 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | ||
| 86 | /// @brief Set's the control's enabled/disabled state | ||
| 87 | /// | ||
| 88 | /// @param[in] enabled If true enabled, otherwise disabled | ||
| 89 | /// | ||
| 90 | void SetEnabled(bool enabled) | ||
| 91 | { | ||
| 92 | m_interface->kodi_gui->control_settings_slider->set_enabled(m_interface->kodiBase, m_controlHandle, enabled); | ||
| 93 | } | ||
| 94 | //-------------------------------------------------------------------------- | ||
| 95 | 98 | ||
| 96 | //========================================================================== | 99 | //========================================================================== |
| 97 | /// | 100 | /// |
| 98 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 101 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 99 | /// @brief To set the text string on settings slider | 102 | /// @brief To set the text string on settings slider |
| 100 | /// | 103 | /// |
| 101 | /// @param[in] text Text to show | 104 | /// @param[in] text Text to show |
| 102 | /// | 105 | /// |
| 103 | void SetText(const std::string& text) | 106 | void SetText(const std::string& text) |
| 104 | { | 107 | { |
| 105 | m_interface->kodi_gui->control_settings_slider->set_text(m_interface->kodiBase, m_controlHandle, text.c_str()); | 108 | m_interface->kodi_gui->control_settings_slider->set_text(m_interface->kodiBase, m_controlHandle, |
| 106 | } | 109 | text.c_str()); |
| 107 | //-------------------------------------------------------------------------- | 110 | } |
| 111 | //-------------------------------------------------------------------------- | ||
| 108 | 112 | ||
| 109 | //========================================================================== | 113 | //========================================================================== |
| 110 | /// | 114 | /// |
| 111 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 115 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 112 | /// @brief To reset slider on defaults | 116 | /// @brief To reset slider on defaults |
| 113 | /// | 117 | /// |
| 114 | void Reset() | 118 | void Reset() |
| 115 | { | 119 | { |
| 116 | m_interface->kodi_gui->control_settings_slider->reset(m_interface->kodiBase, m_controlHandle); | 120 | m_interface->kodi_gui->control_settings_slider->reset(m_interface->kodiBase, m_controlHandle); |
| 117 | } | 121 | } |
| 118 | //-------------------------------------------------------------------------- | 122 | //-------------------------------------------------------------------------- |
| 119 | 123 | ||
| 120 | //========================================================================== | 124 | //========================================================================== |
| 121 | /// | 125 | /// |
| 122 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 126 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 123 | /// @brief To set the the range as integer of slider, e.g. -10 is the slider | 127 | /// @brief To set the the range as integer of slider, e.g. -10 is the slider |
| 124 | /// start and e.g. +10 is the from here defined position where it reach the | 128 | /// start and e.g. +10 is the from here defined position where it reach the |
| 125 | /// end. | 129 | /// end. |
| 126 | /// | 130 | /// |
| 127 | /// Ad default is the range from 0 to 100. | 131 | /// Ad default is the range from 0 to 100. |
| 128 | /// | 132 | /// |
| 129 | /// The integer interval is as default 1 and can be changed with | 133 | /// The integer interval is as default 1 and can be changed with |
| 130 | /// @ref SetIntInterval. | 134 | /// @ref SetIntInterval. |
| 131 | /// | 135 | /// |
| 132 | /// @param[in] start Integer start value | 136 | /// @param[in] start Integer start value |
| 133 | /// @param[in] end Integer end value | 137 | /// @param[in] end Integer end value |
| 134 | /// | 138 | /// |
| 135 | /// @note Percent, floating point or integer are alone possible. Combining | 139 | /// @note Percent, floating point or integer are alone possible. Combining |
| 136 | /// these different values can be not together and can, therefore, only | 140 | /// these different values can be not together and can, therefore, only |
| 137 | /// one each can be used. | 141 | /// one each can be used. |
| 138 | /// | 142 | /// |
| 139 | void SetIntRange(int start, int end) | 143 | void SetIntRange(int start, int end) |
| 140 | { | 144 | { |
| 141 | m_interface->kodi_gui->control_settings_slider->set_int_range(m_interface->kodiBase, m_controlHandle, start, end); | 145 | m_interface->kodi_gui->control_settings_slider->set_int_range(m_interface->kodiBase, |
| 142 | } | 146 | m_controlHandle, start, end); |
| 143 | //-------------------------------------------------------------------------- | 147 | } |
| 148 | //-------------------------------------------------------------------------- | ||
| 144 | 149 | ||
| 145 | //========================================================================== | 150 | //========================================================================== |
| 146 | /// | 151 | /// |
| 147 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 152 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 148 | /// @brief Set the slider position with the given integer value. The Range | 153 | /// @brief Set the slider position with the given integer value. The Range |
| 149 | /// must be defined with a call from \ref SetIntRange before. | 154 | /// must be defined with a call from \ref SetIntRange before. |
| 150 | /// | 155 | /// |
| 151 | /// @param[in] value Position in range to set with integer | 156 | /// @param[in] value Position in range to set with integer |
| 152 | /// | 157 | /// |
| 153 | /// @note Percent, floating point or integer are alone possible. Combining | 158 | /// @note Percent, floating point or integer are alone possible. Combining |
| 154 | /// these different values can be not together and can, therefore, only | 159 | /// these different values can be not together and can, therefore, only |
| 155 | /// one each can be used. | 160 | /// one each can be used. |
| 156 | /// | 161 | /// |
| 157 | void SetIntValue(int value) | 162 | void SetIntValue(int value) |
| 158 | { | 163 | { |
| 159 | m_interface->kodi_gui->control_settings_slider->set_int_value(m_interface->kodiBase, m_controlHandle, value); | 164 | m_interface->kodi_gui->control_settings_slider->set_int_value(m_interface->kodiBase, |
| 160 | } | 165 | m_controlHandle, value); |
| 161 | //-------------------------------------------------------------------------- | 166 | } |
| 167 | //-------------------------------------------------------------------------- | ||
| 162 | 168 | ||
| 163 | //========================================================================== | 169 | //========================================================================== |
| 164 | /// | 170 | /// |
| 165 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 171 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 166 | /// @brief To get the current position as integer value. | 172 | /// @brief To get the current position as integer value. |
| 167 | /// | 173 | /// |
| 168 | /// @return The position as integer | 174 | /// @return The position as integer |
| 169 | /// | 175 | /// |
| 170 | /// @note Percent, floating point or integer are alone possible. Combining | 176 | /// @note Percent, floating point or integer are alone possible. Combining |
| 171 | /// these different values can be not together and can, therefore, only | 177 | /// these different values can be not together and can, therefore, only |
| 172 | /// one each can be used. | 178 | /// one each can be used. |
| 173 | /// | 179 | /// |
| 174 | int GetIntValue() const | 180 | int GetIntValue() const |
| 175 | { | 181 | { |
| 176 | return m_interface->kodi_gui->control_settings_slider->get_int_value(m_interface->kodiBase, m_controlHandle); | 182 | return m_interface->kodi_gui->control_settings_slider->get_int_value(m_interface->kodiBase, |
| 177 | } | 183 | m_controlHandle); |
| 178 | //-------------------------------------------------------------------------- | 184 | } |
| 185 | //-------------------------------------------------------------------------- | ||
| 179 | 186 | ||
| 180 | //========================================================================== | 187 | //========================================================================== |
| 181 | /// | 188 | /// |
| 182 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 189 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 183 | /// @brief To set the interval steps of slider, as default is it 1. If it | 190 | /// @brief To set the interval steps of slider, as default is it 1. If it |
| 184 | /// becomes changed with this function will a step of the user with the | 191 | /// becomes changed with this function will a step of the user with the |
| 185 | /// value fixed here be executed. | 192 | /// value fixed here be executed. |
| 186 | /// | 193 | /// |
| 187 | /// @param[in] interval Intervall step to set. | 194 | /// @param[in] interval Intervall step to set. |
| 188 | /// | 195 | /// |
| 189 | /// @note Percent, floating point or integer are alone possible. Combining | 196 | /// @note Percent, floating point or integer are alone possible. Combining |
| 190 | /// these different values can be not together and can, therefore, only | 197 | /// these different values can be not together and can, therefore, only |
| 191 | /// one each can be used. | 198 | /// one each can be used. |
| 192 | /// | 199 | /// |
| 193 | void SetIntInterval(int interval) | 200 | void SetIntInterval(int interval) |
| 194 | { | 201 | { |
| 195 | m_interface->kodi_gui->control_settings_slider->set_int_interval(m_interface->kodiBase, m_controlHandle, interval); | 202 | m_interface->kodi_gui->control_settings_slider->set_int_interval(m_interface->kodiBase, |
| 196 | } | 203 | m_controlHandle, interval); |
| 197 | //-------------------------------------------------------------------------- | 204 | } |
| 205 | //-------------------------------------------------------------------------- | ||
| 198 | 206 | ||
| 199 | //========================================================================== | 207 | //========================================================================== |
| 200 | /// | 208 | /// |
| 201 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 209 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 202 | /// @brief Sets the percent of the slider. | 210 | /// @brief Sets the percent of the slider. |
| 203 | /// | 211 | /// |
| 204 | /// @param[in] percent float - Percent value of slide | 212 | /// @param[in] percent float - Percent value of slide |
| 205 | /// | 213 | /// |
| 206 | /// @note Percent, floating point or integer are alone possible. Combining | 214 | /// @note Percent, floating point or integer are alone possible. Combining |
| 207 | /// these different values can be not together and can, therefore, only | 215 | /// these different values can be not together and can, therefore, only |
| 208 | /// one each can be used. | 216 | /// one each can be used. |
| 209 | /// | 217 | /// |
| 210 | void SetPercentage(float percent) | 218 | void SetPercentage(float percent) |
| 211 | { | 219 | { |
| 212 | m_interface->kodi_gui->control_settings_slider->set_percentage(m_interface->kodiBase, m_controlHandle, percent); | 220 | m_interface->kodi_gui->control_settings_slider->set_percentage(m_interface->kodiBase, |
| 213 | } | 221 | m_controlHandle, percent); |
| 214 | //-------------------------------------------------------------------------- | 222 | } |
| 223 | //-------------------------------------------------------------------------- | ||
| 215 | 224 | ||
| 216 | //========================================================================== | 225 | //========================================================================== |
| 217 | /// | 226 | /// |
| 218 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 227 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 219 | /// @brief Returns a float of the percent of the slider. | 228 | /// @brief Returns a float of the percent of the slider. |
| 220 | /// | 229 | /// |
| 221 | /// @return float - Percent of slider | 230 | /// @return float - Percent of slider |
| 222 | /// | 231 | /// |
| 223 | /// @note Percent, floating point or integer are alone possible. Combining | 232 | /// @note Percent, floating point or integer are alone possible. Combining |
| 224 | /// these different values can be not together and can, therefore, only | 233 | /// these different values can be not together and can, therefore, only |
| 225 | /// one each can be used. | 234 | /// one each can be used. |
| 226 | /// | 235 | /// |
| 227 | float GetPercentage() const | 236 | float GetPercentage() const |
| 228 | { | 237 | { |
| 229 | return m_interface->kodi_gui->control_settings_slider->get_percentage(m_interface->kodiBase, m_controlHandle); | 238 | return m_interface->kodi_gui->control_settings_slider->get_percentage(m_interface->kodiBase, |
| 230 | } | 239 | m_controlHandle); |
| 231 | //-------------------------------------------------------------------------- | 240 | } |
| 241 | //-------------------------------------------------------------------------- | ||
| 232 | 242 | ||
| 233 | //========================================================================== | 243 | //========================================================================== |
| 234 | /// | 244 | /// |
| 235 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 245 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 236 | /// @brief To set the the range as float of slider, e.g. -25.0 is the slider | 246 | /// @brief To set the the range as float of slider, e.g. -25.0 is the slider |
| 237 | /// start and e.g. +25.0 is the from here defined position where it reach | 247 | /// start and e.g. +25.0 is the from here defined position where it reach |
| 238 | /// the end. | 248 | /// the end. |
| 239 | /// | 249 | /// |
| 240 | /// As default is the range 0.0 to 1.0. | 250 | /// As default is the range 0.0 to 1.0. |
| 241 | /// | 251 | /// |
| 242 | /// The float interval is as default 0.1 and can be changed with | 252 | /// The float interval is as default 0.1 and can be changed with |
| 243 | /// @ref SetFloatInterval. | 253 | /// @ref SetFloatInterval. |
| 244 | /// | 254 | /// |
| 245 | /// @param[in] start Integer start value | 255 | /// @param[in] start Integer start value |
| 246 | /// @param[in] end Integer end value | 256 | /// @param[in] end Integer end value |
| 247 | /// | 257 | /// |
| 248 | /// @note Percent, floating point or integer are alone possible. Combining | 258 | /// @note Percent, floating point or integer are alone possible. Combining |
| 249 | /// these different values can be not together and can, therefore, only | 259 | /// these different values can be not together and can, therefore, only |
| 250 | /// one each can be used. | 260 | /// one each can be used. |
| 251 | /// | 261 | /// |
| 252 | void SetFloatRange(float start, float end) | 262 | void SetFloatRange(float start, float end) |
| 253 | { | 263 | { |
| 254 | m_interface->kodi_gui->control_settings_slider->set_float_range(m_interface->kodiBase, m_controlHandle, start, end); | 264 | m_interface->kodi_gui->control_settings_slider->set_float_range(m_interface->kodiBase, |
| 255 | } | 265 | m_controlHandle, start, end); |
| 256 | //-------------------------------------------------------------------------- | 266 | } |
| 267 | //-------------------------------------------------------------------------- | ||
| 257 | 268 | ||
| 258 | //========================================================================== | 269 | //========================================================================== |
| 259 | /// | 270 | /// |
| 260 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 271 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 261 | /// @brief Set the slider position with the given float value. The Range | 272 | /// @brief Set the slider position with the given float value. The Range |
| 262 | /// can be defined with a call from \ref SetIntRange before, as default it | 273 | /// can be defined with a call from \ref SetIntRange before, as default it |
| 263 | /// is 0.0 to 1.0. | 274 | /// is 0.0 to 1.0. |
| 264 | /// | 275 | /// |
| 265 | /// @param[in] value Position in range to set with float | 276 | /// @param[in] value Position in range to set with float |
| 266 | /// | 277 | /// |
| 267 | /// @note Percent, floating point or integer are alone possible. Combining | 278 | /// @note Percent, floating point or integer are alone possible. Combining |
| 268 | /// these different values can be not together and can, therefore, only | 279 | /// these different values can be not together and can, therefore, only |
| 269 | /// one each can be used. | 280 | /// one each can be used. |
| 270 | /// | 281 | /// |
| 271 | void SetFloatValue(float value) | 282 | void SetFloatValue(float value) |
| 272 | { | 283 | { |
| 273 | m_interface->kodi_gui->control_settings_slider->set_float_value(m_interface->kodiBase, m_controlHandle, value); | 284 | m_interface->kodi_gui->control_settings_slider->set_float_value(m_interface->kodiBase, |
| 274 | } | 285 | m_controlHandle, value); |
| 275 | //-------------------------------------------------------------------------- | 286 | } |
| 287 | //-------------------------------------------------------------------------- | ||
| 276 | 288 | ||
| 277 | //========================================================================== | 289 | //========================================================================== |
| 278 | /// | 290 | /// |
| 279 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 291 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 280 | /// @brief To get the current position as float value. | 292 | /// @brief To get the current position as float value. |
| 281 | /// | 293 | /// |
| 282 | /// @return The position as float | 294 | /// @return The position as float |
| 283 | /// | 295 | /// |
| 284 | float GetFloatValue() const | 296 | float GetFloatValue() const |
| 285 | { | 297 | { |
| 286 | return m_interface->kodi_gui->control_settings_slider->get_float_value(m_interface->kodiBase, m_controlHandle); | 298 | return m_interface->kodi_gui->control_settings_slider->get_float_value(m_interface->kodiBase, |
| 287 | } | 299 | m_controlHandle); |
| 288 | //-------------------------------------------------------------------------- | 300 | } |
| 301 | //-------------------------------------------------------------------------- | ||
| 289 | 302 | ||
| 290 | //========================================================================== | 303 | //========================================================================== |
| 291 | /// | 304 | /// |
| 292 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider | 305 | /// \ingroup cpp_kodi_gui_controls_CSettingsSlider |
| 293 | /// @brief To set the interval steps of slider, as default is it 0.1 If it | 306 | /// @brief To set the interval steps of slider, as default is it 0.1 If it |
| 294 | /// becomes changed with this function will a step of the user with the | 307 | /// becomes changed with this function will a step of the user with the |
| 295 | /// value fixed here be executed. | 308 | /// value fixed here be executed. |
| 296 | /// | 309 | /// |
| 297 | /// @param[in] interval Intervall step to set. | 310 | /// @param[in] interval Intervall step to set. |
| 298 | /// | 311 | /// |
| 299 | /// @note Percent, floating point or integer are alone possible. Combining | 312 | /// @note Percent, floating point or integer are alone possible. Combining |
| 300 | /// these different values can be not together and can, therefore, only | 313 | /// these different values can be not together and can, therefore, only |
| 301 | /// one each can be used. | 314 | /// one each can be used. |
| 302 | /// | 315 | /// |
| 303 | void SetFloatInterval(float interval) | 316 | void SetFloatInterval(float interval) |
| 304 | { | 317 | { |
| 305 | m_interface->kodi_gui->control_settings_slider->set_float_interval(m_interface->kodiBase, m_controlHandle, interval); | 318 | m_interface->kodi_gui->control_settings_slider->set_float_interval(m_interface->kodiBase, |
| 306 | } | 319 | m_controlHandle, interval); |
| 307 | //-------------------------------------------------------------------------- | 320 | } |
| 308 | }; | 321 | //-------------------------------------------------------------------------- |
| 322 | }; | ||
| 309 | 323 | ||
| 310 | } /* namespace controls */ | 324 | } /* namespace controls */ |
| 311 | } /* namespace gui */ | 325 | } /* namespace gui */ |
