xbmc
GUIListContainer.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
16 #include "GUIBaseContainer.h"
17 
18 class CLabelInfo;
19 class CTextureInfo;
20 
26 {
27 public:
28  CGUIListContainer(int parentID, int controlID, float posX, float posY, float width, float height, ORIENTATION orientation, const CScroller& scroller, int preloadItems);
29  explicit CGUIListContainer(const CGUIListContainer& other);
30  //#ifdef GUILIB_PYTHON_COMPATIBILITY
31  CGUIListContainer(int parentID, int controlID, float posX, float posY, float width, float height,
32  const CLabelInfo& labelInfo, const CLabelInfo& labelInfo2,
33  const CTextureInfo& textureButton, const CTextureInfo& textureButtonFocus,
34  float textureHeight, float itemWidth, float itemHeight, float spaceBetweenItems);
35  //#endif
36  ~CGUIListContainer(void) override;
37  CGUIListContainer* Clone() const override { return new CGUIListContainer(*this); }
38 
39  bool OnAction(const CAction &action) override;
40  bool OnMessage(CGUIMessage& message) override;
41 
42  bool HasNextPage() const override;
43  bool HasPreviousPage() const override;
44 
45 protected:
46  void Scroll(int amount) override;
47  void SetCursor(int cursor) override;
48  bool MoveDown(bool wrapAround) override;
49  bool MoveUp(bool wrapAround) override;
50  void ValidateOffset() override;
51  void SelectItem(int item) override;
52  bool SelectItemFromPoint(const CPoint &point) override;
53  int GetCursorFromPoint(const CPoint &point, CPoint *itemPoint = NULL) const override;
54 };
55 
void SetCursor(int cursor) override
Set the cursor position Should be used by all base classes rather than directly setting it...
Definition: GUIListContainer.cpp:200
Definition: GUIBaseContainer.h:34
Class used to handle scrolling, allow using tweeners.
Definition: VisibleEffect.h:221
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: GUITexture.h:51
Definition: GUIListContainer.h:25
Definition: GUIMessage.h:365
Definition: GUILabel.h:22