[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / guilib / GUISettingsSliderControl.h
blob3458c6c875390ad22a59088a864d1a9da9eaa0c8
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 /*!
12 \file GUISliderControl.h
13 \brief
16 #include "GUIButtonControl.h"
17 #include "GUISliderControl.h"
19 /*!
20 \ingroup controls
21 \brief
23 class CGUISettingsSliderControl :
24 public CGUISliderControl
26 public:
27 CGUISettingsSliderControl(int parentID,
28 int controlID,
29 float posX,
30 float posY,
31 float width,
32 float height,
33 float sliderWidth,
34 float sliderHeight,
35 const CTextureInfo& textureFocus,
36 const CTextureInfo& textureNoFocus,
37 const CTextureInfo& backGroundTexture,
38 const CTextureInfo& backGroundTextureDisabled,
39 const CTextureInfo& nibTexture,
40 const CTextureInfo& nibTextureFocus,
41 const CTextureInfo& nibTextureDisabled,
42 const CLabelInfo& labelInfo,
43 int iType);
44 ~CGUISettingsSliderControl() override = default;
45 CGUISettingsSliderControl *Clone() const override { return new CGUISettingsSliderControl(*this); }
47 void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) override;
48 void Render() override;
49 bool OnAction(const CAction &action) override;
50 void OnUnFocus() override;
51 EVENT_RESULT OnMouseEvent(const CPoint& point, const KODI::MOUSE::CMouseEvent& event) override;
52 void SetActive();
53 bool IsActive() const override { return m_active; }
54 void AllocResources() override;
55 void FreeResources(bool immediately = false) override;
56 void DynamicResourceAlloc(bool bOnOff) override;
57 void SetInvalid() override;
58 void SetPosition(float posX, float posY) override;
59 float GetWidth() const override { return m_buttonControl.GetWidth(); }
60 void SetWidth(float width) override;
61 float GetHeight() const override { return m_buttonControl.GetHeight(); }
62 void SetHeight(float height) override;
63 void SetEnabled(bool bEnable) override;
65 void SetText(const std::string& label) { m_buttonControl.SetLabel(label); }
66 float GetXPosition() const override { return m_buttonControl.GetXPosition(); }
67 float GetYPosition() const override { return m_buttonControl.GetYPosition(); }
68 std::string GetDescription() const override;
69 bool HitTest(const CPoint& point) const override { return m_buttonControl.HitTest(point); }
71 protected:
72 bool UpdateColors(const CGUIListItem* item) override;
73 virtual void ProcessText();
75 private:
76 CGUISettingsSliderControl(const CGUISettingsSliderControl& control);
78 CGUIButtonControl m_buttonControl;
79 CGUILabel m_label;
80 bool m_active; ///< Whether the slider has been activated by a click.