[guilib] fix labelcontrols with auto width always being marked as dirty if they speci...
[vuplus_xbmc] / xbmc / guilib / GUIListContainer.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 /*!
31  \ingroup controls
32  \brief
33  */
34 class CGUIListContainer : public CGUIBaseContainer
35 {
36 public:
37   CGUIListContainer(int parentID, int controlID, float posX, float posY, float width, float height, ORIENTATION orientation, const CScroller& scroller, int preloadItems);
38 //#ifdef PRE_SKIN_VERSION_9_10_COMPATIBILITY
39   CGUIListContainer(int parentID, int controlID, float posX, float posY, float width, float height,
40                          const CLabelInfo& labelInfo, const CLabelInfo& labelInfo2,
41                          const CTextureInfo& textureButton, const CTextureInfo& textureButtonFocus,
42                          float textureHeight, float itemWidth, float itemHeight, float spaceBetweenItems);
43 //#endif
44   virtual ~CGUIListContainer(void);
45   virtual CGUIListContainer *Clone() const { return new CGUIListContainer(*this); };
46
47   virtual bool OnAction(const CAction &action);
48   virtual bool OnMessage(CGUIMessage& message);
49
50   virtual bool HasNextPage() const;
51   virtual bool HasPreviousPage() const;
52
53 protected:
54   virtual void Scroll(int amount);
55   void SetCursor(int cursor);
56   virtual bool MoveDown(bool wrapAround);
57   virtual bool MoveUp(bool wrapAround);
58   virtual void ValidateOffset();
59   virtual void SelectItem(int item);
60   virtual bool SelectItemFromPoint(const CPoint &point);
61   virtual int GetCursorFromPoint(const CPoint &point, CPoint *itemPoint = NULL) const;
62 };
63