Fix keymap.
[vuplus_xbmc] / xbmc / guilib / GUIListLabel.h
1 /*!
2 \file GUIListLabel.h
3 \brief
4 */
5
6 #pragma once
7
8 /*
9  *      Copyright (C) 2005-2013 Team XBMC
10  *      http://xbmc.org
11  *
12  *  This Program is free software; you can redistribute it and/or modify
13  *  it under the terms of the GNU General Public License as published by
14  *  the Free Software Foundation; either version 2, or (at your option)
15  *  any later version.
16  *
17  *  This Program is distributed in the hope that it will be useful,
18  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  *  GNU General Public License for more details.
21  *
22  *  You should have received a copy of the GNU General Public License
23  *  along with XBMC; see the file COPYING.  If not, see
24  *  <http://www.gnu.org/licenses/>.
25  *
26  */
27
28 #include "GUIControl.h"
29 #include "GUILabel.h"
30
31 /*!
32  \ingroup controls
33  \brief
34  */
35 class CGUIListLabel :
36       public CGUIControl
37 {
38 public:
39   CGUIListLabel(int parentID, int controlID, float posX, float posY, float width, float height, const CLabelInfo& labelInfo, const CGUIInfoLabel &label, bool alwaysScroll);
40   virtual ~CGUIListLabel(void);
41   virtual CGUIListLabel *Clone() const { return new CGUIListLabel(*this); };
42
43   virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
44   virtual void Render();
45   virtual bool CanFocus() const { return false; };
46   virtual void UpdateInfo(const CGUIListItem *item = NULL);
47   virtual void SetFocus(bool focus);
48   virtual void SetInvalid();
49   virtual void SetWidth(float width);
50
51   void SetLabel(const CStdString &label);
52   void SetSelected(bool selected);
53   void SetScrolling(bool scrolling);
54
55   static void CheckAndCorrectOverlap(CGUIListLabel &label1, CGUIListLabel &label2)
56   {
57     CGUILabel::CheckAndCorrectOverlap(label1.m_label, label2.m_label);
58   }
59
60   virtual CRect CalcRenderRegion() const;
61
62 protected:
63   virtual bool UpdateColors();
64
65   CGUILabel     m_label;
66   CGUIInfoLabel m_info;
67   bool          m_alwaysScroll;
68 };