summaryrefslogtreecommitdiffstats
path: root/xbmc/guilib/GUIListContainer.h
blob: d16aa65bea65cf8a1f7c3c9fc6f6bf3ad7665621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 *  Copyright (C) 2005-2018 Team Kodi
 *  This file is part of Kodi - https://kodi.tv
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 *  See LICENSES/README.md for more information.
 */

#pragma once

/*!
\file GUIListContainer.h
\brief
*/

#include "GUIBaseContainer.h"

class CLabelInfo;
class CTextureInfo;

/*!
 \ingroup controls
 \brief
 */
class CGUIListContainer : public CGUIBaseContainer
{
public:
  CGUIListContainer(int parentID, int controlID, float posX, float posY, float width, float height, ORIENTATION orientation, const CScroller& scroller, int preloadItems);
  explicit CGUIListContainer(const CGUIListContainer& other);
  //#ifdef GUILIB_PYTHON_COMPATIBILITY
  CGUIListContainer(int parentID, int controlID, float posX, float posY, float width, float height,
                         const CLabelInfo& labelInfo, const CLabelInfo& labelInfo2,
                         const CTextureInfo& textureButton, const CTextureInfo& textureButtonFocus,
                         float textureHeight, float itemWidth, float itemHeight, float spaceBetweenItems);
  //#endif
  ~CGUIListContainer(void) override;
  CGUIListContainer* Clone() const override { return new CGUIListContainer(*this); }

  bool OnAction(const CAction &action) override;
  bool OnMessage(CGUIMessage& message) override;

  bool HasNextPage() const override;
  bool HasPreviousPage() const override;

protected:
  void Scroll(int amount) override;
  void SetCursor(int cursor) override;
  bool MoveDown(bool wrapAround) override;
  bool MoveUp(bool wrapAround) override;
  void ValidateOffset() override;
  void SelectItem(int item) override;
  bool SelectItemFromPoint(const CPoint &point) override;
  int GetCursorFromPoint(const CPoint &point, CPoint *itemPoint = NULL) const override;
};