changed: Add logic to properly handle subtitles for stacked files
[vuplus_xbmc] / xbmc / pvr / windows / GUIWindowPVR.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2012-2013 Team XBMC
5  *      http://xbmc.org
6  *
7  *  This Program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2, or (at your option)
10  *  any later version.
11  *
12  *  This Program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with XBMC; see the file COPYING.  If not, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #include "GUIWindowPVRCommon.h"
24 #include "epg/GUIEPGGridContainer.h"
25 #include "utils/Stopwatch.h"
26 #include "threads/CriticalSection.h"
27
28 namespace PVR
29 {
30   class CGUIWindowPVRCommon;
31   class CGUIWindowPVRChannels;
32   class CGUIWindowPVRGuide;
33   class CGUIWindowPVRRecordings;
34   class CGUIWindowPVRSearch;
35   class CGUIWindowPVRTimers;
36
37   class CGUIWindowPVR : public CGUIMediaWindow
38   {
39     friend class CGUIWindowPVRCommon;
40     friend class CGUIWindowPVRChannels;
41     friend class CGUIWindowPVRGuide;
42     friend class CGUIWindowPVRRecordings;
43     friend class CGUIWindowPVRSearch;
44     friend class CGUIWindowPVRTimers;
45
46   public:
47     CGUIWindowPVR(void);
48     virtual ~CGUIWindowPVR(void);
49
50     virtual CGUIWindowPVRCommon *GetActiveView(void) const;
51     virtual void SetActiveView(CGUIWindowPVRCommon *window);
52     virtual void GetContextButtons(int itemNumber, CContextButtons &buttons);
53     virtual CGUIWindowPVRCommon *GetSavedView(void) const;
54     virtual bool OnAction(const CAction &action);
55     virtual bool OnContextButton(int itemNumber, CONTEXT_BUTTON button);
56     virtual void OnInitWindow(void);
57     virtual bool OnMessage(CGUIMessage& message);
58     virtual void OnWindowLoaded(void);
59     virtual void OnWindowUnload(void);
60     virtual void FrameMove();
61     virtual void Reset(void);
62     virtual void Cleanup(void);
63
64     EPG::CGUIEPGGridContainer *m_guideGrid;
65
66   protected:
67     virtual void SetLabel(int iControl, const CStdString &strLabel);
68     virtual void SetLabel(int iControl, int iLabel);
69     virtual void UpdateButtons(void);
70     virtual bool Update(const CStdString &strDirectory, bool updateFilterPath = true);
71
72   private:
73     virtual bool OnMessageFocus(CGUIMessage &message);
74     virtual bool OnMessageClick(CGUIMessage &message);
75
76     virtual void CreateViews(void);
77
78     CGUIWindowPVRCommon *    m_currentSubwindow;
79     CGUIWindowPVRCommon *    m_savedSubwindow;
80
81     CGUIWindowPVRChannels *  m_windowChannelsTV;
82     CGUIWindowPVRChannels *  m_windowChannelsRadio;
83     CGUIWindowPVRGuide    *  m_windowGuide;
84     CGUIWindowPVRRecordings *m_windowRecordings;
85     CGUIWindowPVRSearch *    m_windowSearch;
86     CGUIWindowPVRTimers *    m_windowTimers;
87     bool                     m_bWasReset;
88
89     CCriticalSection         m_critSection;
90
91     CStopWatch               m_refreshWatch;
92   };
93 }