[droid] splash: adjust progressbar color
[vuplus_xbmc] / xbmc / GUIViewControl.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-2012 Team XBMC
5  *      http://www.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 "GUIViewState.h"
24
25 #include "guilib/GUIBaseContainer.h"
26
27 class CGUIViewControl
28 {
29 public:
30   CGUIViewControl(void);
31   virtual ~CGUIViewControl(void);
32
33   void Reset();
34   void SetParentWindow(int window);
35   void AddView(const CGUIControl *control);
36   void SetViewControlID(int control);
37
38   void SetCurrentView(int viewMode, bool bRefresh = false);
39
40   void SetItems(CFileItemList &items);
41
42   void SetSelectedItem(int item);
43   void SetSelectedItem(const CStdString &itemPath);
44
45   int GetSelectedItem() const;
46   void SetFocused();
47
48   bool HasControl(int controlID) const;
49   int GetNextViewMode(int direction = 1) const;
50   int GetViewModeNumber(int number) const;
51   int GetViewModeByID(int id) const;
52
53   int GetCurrentControl() const;
54
55   void Clear();
56
57 protected:
58   int GetSelectedItem(const CGUIControl *control) const;
59   void UpdateContents(const CGUIControl *control, int currentItem);
60   void UpdateView();
61   void UpdateViewAsControl(const CStdString &viewLabel);
62   void UpdateViewVisibility();
63   int GetView(VIEW_TYPE type, int id) const;
64
65   std::vector<CGUIControl *> m_allViews;
66   std::vector<CGUIControl *> m_visibleViews;
67   typedef std::vector<CGUIControl *>::const_iterator ciViews;
68
69   CFileItemList*        m_fileItems;
70   int                   m_viewAsControl;
71   int                   m_parentWindow;
72   int                   m_currentView;
73 };