4 * Copyright (C) 2005-2012 Team XBMC
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)
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.
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/>.
23 #include "GUIViewState.h"
25 #include "guilib/GUIBaseContainer.h"
30 CGUIViewControl(void);
31 virtual ~CGUIViewControl(void);
34 void SetParentWindow(int window);
35 void AddView(const CGUIControl *control);
36 void SetViewControlID(int control);
38 void SetCurrentView(int viewMode, bool bRefresh = false);
40 void SetItems(CFileItemList &items);
42 void SetSelectedItem(int item);
43 void SetSelectedItem(const CStdString &itemPath);
45 int GetSelectedItem() const;
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;
53 int GetCurrentControl() const;
58 int GetSelectedItem(const CGUIControl *control) const;
59 void UpdateContents(const CGUIControl *control, int currentItem);
61 void UpdateViewAsControl(const CStdString &viewLabel);
62 void UpdateViewVisibility();
63 int GetView(VIEW_TYPE type, int id) const;
65 std::vector<CGUIControl *> m_allViews;
66 std::vector<CGUIControl *> m_visibleViews;
67 typedef std::vector<CGUIControl *>::const_iterator ciViews;
69 CFileItemList* m_fileItems;