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 #include "guilib/GUIDialog.h"
12 #include "utils/Stopwatch.h"
13 #include "view/GUIViewControl.h"
14 
15 class CFileItemList;
16 
17 class CGUIWindowLoginScreen : public CGUIWindow
18 {
19 public:
20   CGUIWindowLoginScreen(void);
21   ~CGUIWindowLoginScreen(void) override;
22   bool OnMessage(CGUIMessage& message) override;
23   bool OnAction(const CAction &action) override;
24   bool OnBack(int actionID) override;
25   void FrameMove() override;
HasListItems()26   bool HasListItems() const override { return true; };
27   CFileItemPtr GetCurrentListItem(int offset = 0) override;
GetViewContainerID()28   int GetViewContainerID() const override { return m_viewControl.GetCurrentControl(); };
29 
30 protected:
31   void OnInitWindow() override;
32   void OnWindowLoaded() override;
33   void OnWindowUnload() override;
34   void Update();
35   void SetLabel(int iControl, const std::string& strLabel);
36 
37   bool OnPopupMenu(int iItem);
38   CGUIViewControl m_viewControl;
39   CFileItemList* m_vecItems;
40 
41   int m_iSelectedItem;
42   CStopWatch watch;
43 };
44