2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
12 \file GUIListContainer.h
16 #include "GUIBaseContainer.h"
21 class CGUIWrappingListContainer
: public CGUIBaseContainer
24 CGUIWrappingListContainer(int parentID
, int controlID
, float posX
, float posY
, float width
, float height
, ORIENTATION orientation
, const CScroller
& scroller
, int preloadItems
, int fixedPosition
);
25 ~CGUIWrappingListContainer(void) override
;
26 CGUIWrappingListContainer
* Clone() const override
{ return new CGUIWrappingListContainer(*this); }
28 bool OnAction(const CAction
&action
) override
;
29 bool OnMessage(CGUIMessage
& message
) override
;
30 int GetSelectedItem() const override
;
33 void Scroll(int amount
) override
;
34 bool MoveDown(bool wrapAround
) override
;
35 bool MoveUp(bool wrapAround
) override
;
36 bool GetOffsetRange(int &minOffset
, int &maxOffset
) const override
;
37 void ValidateOffset() override
;
38 int CorrectOffset(int offset
, int cursor
) const override
;
39 bool SelectItemFromPoint(const CPoint
&point
) override
;
40 void SelectItem(int item
) override
;
41 void Reset() override
;
42 size_t GetNumItems() const override
{ return m_items
.size() - m_extraItems
; }
43 int GetCurrentPage() const override
;
44 void SetPageControlRange() override
;
45 void UpdatePageControl(int offset
) override
;
47 void ResetExtraItems();
48 unsigned int m_extraItems
;