[cosmetics] update date in GPL header
[vuplus_xbmc] / xbmc / guilib / GUIProgressControl.h
1 /*!
2 \file GUIProgressControl.h
3 \brief
4 */
5
6 #ifndef GUILIB_GUIPROGRESSCONTROL_H
7 #define GUILIB_GUIPROGRESSCONTROL_H
8
9 #pragma once
10
11 /*
12  *      Copyright (C) 2005-2013 Team XBMC
13  *      http://www.xbmc.org
14  *
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)
18  *  any later version.
19  *
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.
24  *
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/>.
28  *
29  */
30
31 #include "GUITexture.h"
32 #include "GUIControl.h"
33
34 /*!
35  \ingroup controls
36  \brief
37  */
38 class CGUIProgressControl :
39       public CGUIControl
40 {
41 public:
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,
46                       bool reveal=false);
47   virtual ~CGUIProgressControl(void);
48   virtual CGUIProgressControl *Clone() const { return new CGUIProgressControl(*this); };
49
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;};
62
63   float GetPercentage() const;
64   CStdString GetDescription() const;
65   virtual void UpdateInfo(const CGUIListItem *item = NULL);
66   bool UpdateLayout(void);
67 protected:
68   virtual bool UpdateColors();
69   CGUITexture m_guiBackground;
70   CGUITexture m_guiLeft;
71   CGUITexture m_guiMid;
72   CGUITexture m_guiRight;
73   CGUITexture m_guiOverlay;
74   CRect m_guiMidClipRect;
75
76   int m_iInfoCode;
77   float m_fPercent;
78   bool m_bReveal;
79   bool m_bChanged;
80 };
81 #endif