summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h153
1 files changed, 0 insertions, 153 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h
deleted file mode 100644
index 02c843f..0000000
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h
+++ /dev/null
@@ -1,153 +0,0 @@
1/*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#pragma once
10
11#include "../../AddonBase.h"
12#include "../Window.h"
13
14namespace kodi
15{
16namespace gui
17{
18namespace controls
19{
20
21//============================================================================
22///
23/// \defgroup cpp_kodi_gui_controls_CFadeLabel Control Fade Label
24/// \ingroup cpp_kodi_gui
25/// @brief \cpp_class{ kodi::gui::controls::CFadeLabel }
26/// **Window control used to show multiple pieces of text in the same position,
27/// by fading from one to the other**
28///
29/// The fade label control is used for displaying multiple pieces of text in
30/// the same space in Kodi. You can choose the font, size, colour, location
31/// and contents of the text to be displayed. The first piece of information
32/// to display fades in over 50 frames, then scrolls off to the left. Once it
33/// is finished scrolling off screen, the second piece of information fades
34/// in and the process repeats. A fade label control is not supported in a
35/// list container.
36///
37/// It has the header \ref FadeLabel.h "#include <kodi/gui/controls/FadeLabel.h>"
38/// be included to enjoy it.
39///
40/// Here you find the needed skin part for a \ref Fade_Label_Control "fade label control"
41///
42/// @note The call of the control is only possible from the corresponding
43/// window as its class and identification number is required.
44///
45class ATTRIBUTE_HIDDEN CFadeLabel : public CAddonGUIControlBase
46{
47public:
48 //==========================================================================
49 ///
50 /// \ingroup cpp_kodi_gui_controls_CFadeLabel
51 /// @brief Construct a new control.
52 ///
53 /// @param[in] window related window control class
54 /// @param[in] controlId Used skin xml control id
55 ///
56 CFadeLabel(CWindow* window, int controlId) : CAddonGUIControlBase(window)
57 {
58 m_controlHandle = m_interface->kodi_gui->window->get_control_fade_label(
59 m_interface->kodiBase, m_Window->GetControlHandle(), controlId);
60 if (!m_controlHandle)
61 kodi::Log(ADDON_LOG_FATAL,
62 "kodi::gui::controls::CFadeLabel can't create control class from Kodi !!!");
63 }
64 //--------------------------------------------------------------------------
65
66 //==========================================================================
67 ///
68 /// \ingroup cpp_kodi_gui_controls_CFadeLabel
69 /// @brief Destructor.
70 ///
71 ~CFadeLabel() override = default;
72 //--------------------------------------------------------------------------
73
74 //==========================================================================
75 ///
76 /// \ingroup cpp_kodi_gui_controls_CFadeLabel
77 /// @brief Set the control on window to visible.
78 ///
79 /// @param[in] visible If true visible, otherwise hidden
80 ///
81 void SetVisible(bool visible)
82 {
83 m_interface->kodi_gui->control_fade_label->set_visible(m_interface->kodiBase, m_controlHandle,
84 visible);
85 }
86 //--------------------------------------------------------------------------
87
88 //==========================================================================
89 ///
90 /// \ingroup cpp_kodi_gui_controls_CFadeLabel
91 /// @brief To add additional text string on fade label.
92 ///
93 /// @param[in] label Text to show
94 ///
95 void AddLabel(const std::string& label)
96 {
97 m_interface->kodi_gui->control_fade_label->add_label(m_interface->kodiBase, m_controlHandle,
98 label.c_str());
99 }
100 //--------------------------------------------------------------------------
101
102 //==========================================================================
103 ///
104 /// \ingroup cpp_kodi_gui_controls_CFadeLabel
105 /// @brief Get the used text from button
106 ///
107 /// @return Text shown
108 ///
109 std::string GetLabel() const
110 {
111 std::string label;
112 char* ret = m_interface->kodi_gui->control_fade_label->get_label(m_interface->kodiBase,
113 m_controlHandle);
114 if (ret != nullptr)
115 {
116 if (std::strlen(ret))
117 label = ret;
118 m_interface->free_string(m_interface->kodiBase, ret);
119 }
120 return label;
121 }
122 //--------------------------------------------------------------------------
123
124 //==========================================================================
125 ///
126 /// \ingroup cpp_kodi_gui_controls_CFadeLabel
127 /// @brief To enable or disable scrolling on fade label
128 ///
129 /// @param[in] scroll To enable scrolling set to true, otherwise is
130 /// disabled
131 ///
132 void SetScrolling(bool scroll)
133 {
134 m_interface->kodi_gui->control_fade_label->set_scrolling(m_interface->kodiBase, m_controlHandle,
135 scroll);
136 }
137 //--------------------------------------------------------------------------
138
139 //==========================================================================
140 ///
141 /// \ingroup cpp_kodi_gui_controls_CFadeLabel
142 /// @brief To reset al inserted labels.
143 ///
144 void Reset()
145 {
146 m_interface->kodi_gui->control_fade_label->reset(m_interface->kodiBase, m_controlHandle);
147 }
148 //--------------------------------------------------------------------------
149};
150
151} /* namespace controls */
152} /* namespace gui */
153} /* namespace kodi */