kodi
GUIWrappingListContainer.h
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"
22 {
23 public:
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); }
27 
28  bool OnAction(const CAction &action) override;
29  bool OnMessage(CGUIMessage& message) override;
30  int GetSelectedItem() const override;
31 
32 protected:
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;
46 
47  void ResetExtraItems();
48  unsigned int m_extraItems;
49 };
50 
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:21
Definition: GUIMessage.h:365
Definition: GUIWrappingListContainer.h:21