PageRenderTime 24ms CodeModel.GetById 15ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/guilib/GUIListGroup.h

http://github.com/xbmc/xbmc
C Header | 50 lines | 26 code | 9 blank | 15 comment | 0 complexity | 87195a0ee2b29750020eaff59dbe070c MD5 | raw 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
11/*!
12\file GUIListGroup.h
13\brief
14*/
15
16#include "GUIControlGroup.h"
17
18/*!
19 \ingroup controls
20 \brief a group of controls within a list/panel container
21 */
22class CGUIListGroup final : public CGUIControlGroup
23{
24public:
25  CGUIListGroup(int parentID, int controlID, float posX, float posY, float width, float height);
26  CGUIListGroup(const CGUIListGroup &right);
27  ~CGUIListGroup(void) override;
28  CGUIListGroup *Clone() const override { return new CGUIListGroup(*this); };
29
30  void AddControl(CGUIControl *control, int position = -1) override;
31
32  void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) override;
33  void ResetAnimation(ANIMATION_TYPE type) override;
34  void UpdateVisibility(const CGUIListItem *item = NULL) override;
35  void UpdateInfo(const CGUIListItem *item) override;
36  void SetInvalid() override;
37
38  void EnlargeWidth(float difference);
39  void EnlargeHeight(float difference);
40  void SetFocusedItem(unsigned int subfocus);
41  unsigned int GetFocusedItem() const;
42  bool MoveLeft();
43  bool MoveRight();
44  void SetState(bool selected, bool focused);
45  void SelectItemFromPoint(const CPoint &point);
46
47protected:
48  const CGUIListItem *m_item;
49};
50