2 \file GUISliderControl.h
6 #ifndef GUILIB_GUISettingsSliderCONTROL_H
7 #define GUILIB_GUISettingsSliderCONTROL_H
12 * Copyright (C) 2005-2013 Team XBMC
15 * This Program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
20 * This Program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with XBMC; see the file COPYING. If not, see
27 * <http://www.gnu.org/licenses/>.
31 #include "GUISliderControl.h"
32 #include "GUIButtonControl.h"
34 #define SPIN_CONTROL_TYPE_INT 1
35 #define SPIN_CONTROL_TYPE_FLOAT 2
36 #define SPIN_CONTROL_TYPE_TEXT 3
42 class CGUISettingsSliderControl :
43 public CGUISliderControl
46 CGUISettingsSliderControl(int parentID, int controlID, float posX, float posY, float width, float height, float sliderWidth, float sliderHeight, const CTextureInfo &textureFocus, const CTextureInfo &textureNoFocus, const CTextureInfo& backGroundTexture, const CTextureInfo& nibTexture, const CTextureInfo& nibTextureFocus, const CLabelInfo &labelInfo, int iType);
47 virtual ~CGUISettingsSliderControl(void);
48 virtual CGUISettingsSliderControl *Clone() const { return new CGUISettingsSliderControl(*this); };
50 virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
51 virtual void Render();
52 virtual bool OnAction(const CAction &action);
53 virtual void AllocResources();
54 virtual void FreeResources(bool immediately = false);
55 virtual void DynamicResourceAlloc(bool bOnOff);
56 virtual void SetInvalid();
57 virtual void SetPosition(float posX, float posY);
58 virtual float GetWidth() const { return m_buttonControl.GetWidth();};
59 virtual void SetWidth(float width);
60 virtual float GetHeight() const { return m_buttonControl.GetHeight();};
61 virtual void SetHeight(float height);
62 virtual void SetEnabled(bool bEnable);
64 void SetText(const std::string &label) {m_buttonControl.SetLabel(label);};
65 virtual float GetXPosition() const { return m_buttonControl.GetXPosition();};
66 virtual float GetYPosition() const { return m_buttonControl.GetYPosition();};
67 virtual CStdString GetDescription() const;
68 virtual bool HitTest(const CPoint &point) const { return m_buttonControl.HitTest(point); };
71 virtual bool UpdateColors();
72 virtual void ProcessText();
75 CGUIButtonControl m_buttonControl;