2 \file GUIProgressControl.h
6 #ifndef GUILIB_GUIPROGRESSCONTROL_H
7 #define GUILIB_GUIPROGRESSCONTROL_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"
32 #include "GUIControl.h"
38 class CGUIProgressControl :
42 CGUIProgressControl(int parentID, int controlID, float posX, float posY,
43 float width, float height, const CTextureInfo& backGroundTexture,
44 const CTextureInfo& leftTexture, const CTextureInfo& midTexture,
45 const CTextureInfo& rightTexture, const CTextureInfo& overlayTexture,
47 virtual ~CGUIProgressControl(void);
48 virtual CGUIProgressControl *Clone() const { return new CGUIProgressControl(*this); };
50 virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
51 virtual void Render();
52 virtual bool CanFocus() const;
53 virtual void AllocResources();
54 virtual void FreeResources(bool immediately = false);
55 virtual void DynamicResourceAlloc(bool bOnOff);
56 virtual void SetInvalid();
57 virtual bool OnMessage(CGUIMessage& message);
58 virtual void SetPosition(float posX, float posY);
59 void SetPercentage(float fPercent);
60 void SetInfo(int iInfo);
61 int GetInfo() const {return m_iInfoCode;};
63 float GetPercentage() const;
64 CStdString GetDescription() const;
65 virtual void UpdateInfo(const CGUIListItem *item = NULL);
66 bool UpdateLayout(void);
68 virtual bool UpdateColors();
69 CGUITexture m_guiBackground;
70 CGUITexture m_guiLeft;
72 CGUITexture m_guiRight;
73 CGUITexture m_guiOverlay;
74 CRect m_guiMidClipRect;