2 \file GUIListContainer.h
9 * Copyright (C) 2005-2013 Team XBMC
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)
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.
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/>.
28 #include "GUIBaseContainer.h"
33 class CGUIWrappingListContainer : public CGUIBaseContainer
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); };
40 virtual bool OnAction(const CAction &action);
41 virtual bool OnMessage(CGUIMessage& message);
42 virtual int GetSelectedItem() const;
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);
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);
59 void ResetExtraItems();
60 unsigned int m_extraItems;