Fix keymap.
[vuplus_xbmc] / xbmc / guilib / GUIWrappingListContainer.h
1 /*!
2 \file GUIListContainer.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  \ingroup controls
31  \brief
32  */
33 class CGUIWrappingListContainer : public CGUIBaseContainer
34 {
35 public:
36   CGUIWrappingListContainer(int parentID, int controlID, float posX, float posY, float width, float height, ORIENTATION orientation, const CScroller& scroller, int preloadItems, int fixedPosition);
37   virtual ~CGUIWrappingListContainer(void);
38   virtual CGUIWrappingListContainer *Clone() const { return new CGUIWrappingListContainer(*this); };
39
40   virtual bool OnAction(const CAction &action);
41   virtual bool OnMessage(CGUIMessage& message);
42   virtual int GetSelectedItem() const;
43
44 protected:
45   virtual void Scroll(int amount);
46   virtual bool MoveDown(bool wrapAround);
47   virtual bool MoveUp(bool wrapAround);
48   virtual bool GetOffsetRange(int &minOffset, int &maxOffset) const;
49   virtual void ValidateOffset();
50   virtual int  CorrectOffset(int offset, int cursor) const;
51   virtual bool SelectItemFromPoint(const CPoint &point);
52   virtual void SelectItem(int item);
53   virtual void Reset();
54   virtual unsigned int GetNumItems() const { return m_items.size() - m_extraItems; };
55   virtual int GetCurrentPage() const;
56   virtual void SetPageControlRange();
57   virtual void UpdatePageControl(int offset);
58
59   void ResetExtraItems();
60   unsigned int m_extraItems;
61 };
62