2 \file GUIToggleButtonControl.h
6 #ifndef GUILIB_GUITOGGLEBUTTONCONTROL_H
7 #define GUILIB_GUITOGGLEBUTTONCONTROL_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 "GUIButtonControl.h"
37 class CGUIToggleButtonControl : public CGUIButtonControl
40 CGUIToggleButtonControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& textureFocus, const CTextureInfo& textureNoFocus, const CTextureInfo& altTextureFocus, const CTextureInfo& altTextureNoFocus, const CLabelInfo &labelInfo);
41 virtual ~CGUIToggleButtonControl(void);
42 virtual CGUIToggleButtonControl *Clone() const { return new CGUIToggleButtonControl(*this); };
44 virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
45 virtual void Render();
46 virtual bool OnAction(const CAction &action);
47 virtual void AllocResources();
48 virtual void FreeResources(bool immediately = false);
49 virtual void DynamicResourceAlloc(bool bOnOff);
50 virtual void SetInvalid();
51 virtual void SetPosition(float posX, float posY);
52 virtual void SetWidth(float width);
53 virtual void SetHeight(float height);
54 void SetLabel(const std::string& strLabel);
55 void SetAltLabel(const std::string& label);
56 virtual CStdString GetDescription() const;
57 void SetToggleSelect(const CStdString &toggleSelect);
58 void SetAltClickActions(const CGUIAction &clickActions);
61 virtual bool UpdateColors();
62 virtual void OnClick();
63 CGUIButtonControl m_selectButton;
64 INFO::InfoPtr m_toggleSelect;