Fix keymap.
[vuplus_xbmc] / xbmc / guilib / GUIPanelContainer.h
1 /*!
2 \file GUIPanelContainer.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 "GUIBaseContainer.h"
29
30 /*!
31  \ingroup controls
32  \brief
33  */
34 class CGUIPanelContainer : public CGUIBaseContainer
35 {
36 public:
37   CGUIPanelContainer(int parentID, int controlID, float posX, float posY, float width, float height, ORIENTATION orientation, const CScroller& scroller, int preloadItems);
38   virtual ~CGUIPanelContainer(void);
39   virtual CGUIPanelContainer *Clone() const { return new CGUIPanelContainer(*this); };
40
41   virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
42   virtual void Render();
43   virtual bool OnAction(const CAction &action);
44   virtual bool OnMessage(CGUIMessage& message);
45   virtual void OnLeft();
46   virtual void OnRight();
47   virtual void OnUp();
48   virtual void OnDown();
49   virtual bool GetCondition(int condition, int data) const;
50 protected:
51   virtual bool MoveUp(bool wrapAround);
52   virtual bool MoveDown(bool wrapAround);
53   virtual bool MoveLeft(bool wrapAround);
54   virtual bool MoveRight(bool wrapAround);
55   virtual void Scroll(int amount);
56   float AnalogScrollSpeed() const;
57   virtual void ValidateOffset();
58   virtual void CalculateLayout();
59   unsigned int GetRows() const;
60   virtual int  CorrectOffset(int offset, int cursor) const;
61   virtual bool SelectItemFromPoint(const CPoint &point);
62   virtual int GetCursorFromPoint(const CPoint &point, CPoint *itemPoint = NULL) const;
63   void SetCursor(int cursor);
64   virtual void SelectItem(int item);
65   virtual bool HasPreviousPage() const;
66   virtual bool HasNextPage() const;
67
68   int m_itemsPerRow;
69 };
70