2 \file GUICheckMarkControl.h
6 #ifndef CGUILIB_GUICHECKMARK_CONTROL_H
7 #define CGUILIB_GUICHECKMARK_CONTROL_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 "GUITexture.h"
33 #include "GUIControl.h"
39 class CGUICheckMarkControl: public CGUIControl
42 CGUICheckMarkControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& textureCheckMark, const CTextureInfo& textureCheckMarkNF, float checkWidth, float checkHeight, const CLabelInfo &labelInfo);
43 virtual ~CGUICheckMarkControl(void);
44 virtual CGUICheckMarkControl *Clone() const { return new CGUICheckMarkControl(*this); };
46 virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
47 virtual void Render();
48 virtual bool OnAction(const CAction &action) ;
49 virtual bool OnMessage(CGUIMessage& message);
50 virtual void AllocResources();
51 virtual void FreeResources(bool immediately = false);
52 virtual void DynamicResourceAlloc(bool bOnOff);
53 virtual void SetInvalid();
55 void SetLabel(const std::string& strLabel);
56 const std::string GetLabel() const { return m_strLabel; };
57 const CLabelInfo& GetLabelInfo() const { return m_label.GetLabelInfo(); };
58 void SetSelected(bool bOnOff);
59 bool GetSelected() const;
61 void PythonSetLabel(const CStdString &strFont, const std::string &strText, color_t textColor);
62 void PythonSetDisabledColor(color_t disabledColor);
65 virtual EVENT_RESULT OnMouseEvent(const CPoint &point, const CMouseEvent &event);
66 virtual bool UpdateColors();
67 CGUILabel::COLOR GetTextColor() const;
69 CGUITexture m_imgCheckMark;
70 CGUITexture m_imgCheckMarkNoFocus;
73 std::string m_strLabel;