[guilib] fix labelcontrols with auto width always being marked as dirty if they speci...
[vuplus_xbmc] / xbmc / guilib / GUIBorderedImage.h
1 #ifndef CGUIBorderedImage_H
2 #define CGUIBorderedImage_H
3
4 /*
5  *      Copyright (C) 2005-2013 Team XBMC
6  *      http://xbmc.org
7  *
8  *  This Program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2, or (at your option)
11  *  any later version.
12  *
13  *  This Program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with XBMC; see the file COPYING.  If not, see
20  *  <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #include "GUIControl.h"
25 #include "TextureManager.h"
26 #include "GUIImage.h"
27
28 class CGUIBorderedImage : public CGUIImage
29 {
30 public:
31   CGUIBorderedImage(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& texture, const CTextureInfo& borderTexture, const CRect &borderSize);
32   CGUIBorderedImage(const CGUIBorderedImage &right);
33   virtual ~CGUIBorderedImage(void);
34   virtual CGUIBorderedImage *Clone() const { return new CGUIBorderedImage(*this); };
35
36   virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
37   virtual void Render();
38   virtual void AllocResources();
39   virtual void FreeResources(bool immediately = false);
40   virtual void DynamicResourceAlloc(bool bOnOff);
41   
42   virtual CRect CalcRenderRegion() const;
43
44 protected:
45   CGUITexture m_borderImage;
46   CRect m_borderSize;
47 };
48
49 #endif