xbmc
GUIPanelContainer.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 
23 {
24 public:
25  CGUIPanelContainer(int parentID, int controlID, float posX, float posY, float width, float height, ORIENTATION orientation, const CScroller& scroller, int preloadItems);
26  ~CGUIPanelContainer(void) override;
27  CGUIPanelContainer* Clone() const override { return new CGUIPanelContainer(*this); }
28 
29  void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) override;
30  void Render() override;
31  bool OnAction(const CAction &action) override;
32  bool OnMessage(CGUIMessage& message) override;
33  void OnLeft() override;
34  void OnRight() override;
35  void OnUp() override;
36  void OnDown() override;
37  bool GetCondition(int condition, int data) const override;
38  std::string GetLabel(int info) const override;
39 protected:
40  bool MoveUp(bool wrapAround) override;
41  bool MoveDown(bool wrapAround) override;
42  virtual bool MoveLeft(bool wrapAround);
43  virtual bool MoveRight(bool wrapAround);
44  void Scroll(int amount) override;
45  float AnalogScrollSpeed() const;
46  void ValidateOffset() override;
47  void CalculateLayout() override;
48  unsigned int GetRows() const override;
49  int CorrectOffset(int offset, int cursor) const override;
50  bool SelectItemFromPoint(const CPoint &point) override;
51  int GetCursorFromPoint(const CPoint &point, CPoint *itemPoint = NULL) const override;
52  void SetCursor(int cursor) override;
53  void SelectItem(int item) override;
54  bool HasPreviousPage() const override;
55  bool HasNextPage() const override;
56 
57  int GetCurrentRow() const;
58  int GetCurrentColumn() const;
59 
60  int m_itemsPerRow;
61 };
62 
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: GUIMessage.h:365
Definition: GUIPanelContainer.h:22
void SetCursor(int cursor) override
Set the cursor position Should be used by all base classes rather than directly setting it...
Definition: GUIPanelContainer.cpp:400