2 \file GUIRadioButtonControl.h
9 * Copyright (C) 2005-2013 Team XBMC
12 * This Program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2, or (at your option)
17 * This Program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with XBMC; see the file COPYING. If not, see
24 * <http://www.gnu.org/licenses/>.
28 #include "GUIButtonControl.h"
34 class CGUIRadioButtonControl :
35 public CGUIButtonControl
38 CGUIRadioButtonControl(int parentID, int controlID,
39 float posX, float posY, float width, float height,
40 const CTextureInfo& textureFocus, const CTextureInfo& textureNoFocus,
41 const CLabelInfo& labelInfo,
42 const CTextureInfo& radioOnFocus, const CTextureInfo& radioOnNoFocus,
43 const CTextureInfo& radioOffFocus, const CTextureInfo& radioOffNoFocus);
45 virtual ~CGUIRadioButtonControl(void);
46 virtual CGUIRadioButtonControl *Clone() const { return new CGUIRadioButtonControl(*this); };
48 virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
49 virtual void Render();
50 virtual bool OnAction(const CAction &action) ;
51 virtual bool OnMessage(CGUIMessage& message);
52 virtual void AllocResources();
53 virtual void FreeResources(bool immediately = false);
54 virtual void DynamicResourceAlloc(bool bOnOff);
55 virtual void SetInvalid();
56 virtual void SetPosition(float posX, float posY);
57 virtual void SetWidth(float width);
58 virtual void SetHeight(float height);
59 virtual CStdString GetDescription() const;
60 void SetRadioDimensions(float posX, float posY, float width, float height);
61 void SetToggleSelect(const CStdString &toggleSelect);
62 bool IsSelected() const { return m_bSelected; };
64 virtual bool UpdateColors();
65 CGUITexture m_imgRadioOnFocus;
66 CGUITexture m_imgRadioOnNoFocus;
67 CGUITexture m_imgRadioOffFocus;
68 CGUITexture m_imgRadioOffNoFocus;
71 INFO::InfoPtr m_toggleSelect;