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 GUIFixedListContainer.h
16 #include "GUIBaseContainer.h"
22 class CGUIFixedListContainer
: public CGUIBaseContainer
25 CGUIFixedListContainer(int parentID
, int controlID
, float posX
, float posY
, float width
, float height
, ORIENTATION orientation
, const CScroller
& scroller
, int preloadItems
, int fixedPosition
, int cursorRange
);
26 ~CGUIFixedListContainer(void) override
;
27 CGUIFixedListContainer
* Clone() const override
{ return new CGUIFixedListContainer(*this); }
29 bool OnAction(const CAction
&action
) override
;
32 void Scroll(int amount
) override
;
33 bool MoveDown(bool wrapAround
) override
;
34 bool MoveUp(bool wrapAround
) override
;
35 bool GetOffsetRange(int &minOffset
, int &maxOffset
) const override
;
36 void ValidateOffset() override
;
37 bool SelectItemFromPoint(const CPoint
&point
) override
;
38 int GetCursorFromPoint(const CPoint
&point
, CPoint
*itemPoint
= NULL
) const override
;
39 void SelectItem(int item
) override
;
40 bool HasNextPage() const override
;
41 bool HasPreviousPage() const override
;
42 int GetCurrentPage() const override
;
46 \brief Get the minimal and maximal cursor positions in the list
48 As the fixed list cursor position may vary at the ends of the list based
49 on the cursor range, this function computes the minimal and maximal positions
50 based on the number of items in the list
51 \param minCursor the minimal cursor position
52 \param maxCursor the maximal cursor position
53 \sa m_fixedCursor, m_cursorRange
55 void GetCursorRange(int &minCursor
, int &maxCursor
) const;
57 int m_fixedCursor
; ///< default position the skinner wishes to use for the focused item
58 int m_cursorRange
; ///< range that the focused item can vary when at the ends of the list