2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "windowing/GraphicContext.h" // for VIEW_TYPE
23 virtual ~CGUIViewControl();
26 void SetParentWindow(int window
);
27 void AddView(const CGUIControl
*control
);
28 void SetViewControlID(int control
);
30 void SetCurrentView(int viewMode
, bool bRefresh
= false);
32 void SetItems(CFileItemList
&items
);
34 void SetSelectedItem(int item
);
35 void SetSelectedItem(const std::string
&itemPath
);
37 int GetSelectedItem() const;
38 std::string
GetSelectedItemPath() const;
41 bool HasControl(int controlID
) const;
42 int GetNextViewMode(int direction
= 1) const;
43 int GetViewModeNumber(int number
) const;
44 int GetViewModeCount() const;
45 int GetViewModeByID(int id
) const;
47 int GetCurrentControl() const;
52 int GetSelectedItem(const CGUIControl
*control
) const;
53 void UpdateContents(const CGUIControl
*control
, int currentItem
) const;
55 void UpdateViewAsControl(const std::string
&viewLabel
);
56 void UpdateViewVisibility();
57 int GetView(VIEW_TYPE type
, int id
) const;
59 std::vector
<CGUIControl
*> m_allViews
;
60 std::vector
<CGUIControl
*> m_visibleViews
;
61 typedef std::vector
<CGUIControl
*>::const_iterator ciViews
;
63 CFileItemList
* m_fileItems
;