[video] fix selection after changing video or extra art
[xbmc.git] / xbmc / pvr / dialogs / GUIDialogPVRItemsViewBase.h
blob66530e4a01fbd393a3761d6846efa35420da7ad8
1 /*
2 * Copyright (C) 2012-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.
7 */
9 #pragma once
11 #include "guilib/GUIDialog.h"
12 #include "view/GUIViewControl.h"
14 #include <memory>
15 #include <string>
17 class CFileItemList;
19 namespace PVR
21 class CGUIDialogPVRItemsViewBase : public CGUIDialog
23 public:
24 CGUIDialogPVRItemsViewBase() = delete;
25 CGUIDialogPVRItemsViewBase(int id, const std::string& xmlFile);
26 ~CGUIDialogPVRItemsViewBase() override = default;
28 void OnWindowLoaded() override;
29 void OnWindowUnload() override;
30 bool OnAction(const CAction& action) override;
32 protected:
33 void Init();
35 void OnInitWindow() override;
36 void OnDeinitWindow(int nextWindowID) override;
37 CGUIControl* GetFirstFocusableControl(int id) override;
39 std::unique_ptr<CFileItemList> m_vecItems;
40 CGUIViewControl m_viewControl;
42 private:
43 void Clear();
44 void ShowInfo(int itemIdx);
45 bool ContextMenu(int iItemIdx);
47 } // namespace PVR