Fix keymap.
[vuplus_xbmc] / xbmc / guilib / IGUIContainer.h
1 /*
2  *      Copyright (C) 2005-2013 Team XBMC
3  *      http://xbmc.org
4  *
5  *  This Program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2, or (at your option)
8  *  any later version.
9  *
10  *  This Program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with XBMC; see the file COPYING.  If not, see
17  *  <http://www.gnu.org/licenses/>.
18  *
19  */
20
21 #pragma once
22
23 #include "GUIControl.h"
24 #include "boost/shared_ptr.hpp"
25
26 typedef boost::shared_ptr<CGUIListItem> CGUIListItemPtr;
27
28 /*!
29  \ingroup controls
30  \brief
31  */
32
33 class IGUIContainer : public CGUIControl
34 {
35 protected:
36   VIEW_TYPE m_type;
37   CStdString m_label;
38 public:
39   IGUIContainer(int parentID, int controlID, float posX, float posY, float width, float height)
40    : CGUIControl(parentID, controlID, posX, posY, width, height), m_type(VIEW_TYPE_NONE) {}
41
42   virtual bool IsContainer() const { return true; };
43
44   VIEW_TYPE GetType() const { return m_type; };
45   const CStdString &GetLabel() const { return m_label; };
46   void SetType(VIEW_TYPE type, const CStdString &label)
47   {
48     m_type = type;
49     m_label = label;
50   }
51
52   virtual CGUIListItemPtr GetListItem(int offset, unsigned int flag = 0) const = 0;
53   virtual CStdString GetLabel(int info) const                                  = 0;
54 };