]> git.sesse.net Git - vlc/blob - modules/gui/skins2/src/theme.hpp
Skins: missing include, makes skins2 on Windows fail to build.
[vlc] / modules / gui / skins2 / src / theme.hpp
1 /*****************************************************************************
2  * theme.hpp
3  *****************************************************************************
4  * Copyright (C) 2003 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
8  *          Olivier Teulière <ipkiss@via.ecp.fr>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 #ifndef THEME_HPP
26 #define THEME_HPP
27
28 #include "generic_bitmap.hpp"
29 #include "generic_font.hpp"
30 #include "generic_layout.hpp"
31 #include "popup.hpp"
32 #include "../src/window_manager.hpp"
33 #include "../commands/cmd_generic.hpp"
34 #include "../utils/bezier.hpp"
35 #include "../utils/variable.hpp"
36 #include "../utils/position.hpp"
37 #include "../controls/ctrl_generic.hpp"
38 #include <string>
39 #include <list>
40 #include <map>
41
42 class Builder;
43 class Interpreter;
44
45 /// Class storing the data of the current theme
46 class Theme: public SkinObject
47 {
48     private:
49         friend class Builder;
50         friend class Interpreter;
51     public:
52         Theme( intf_thread_t *pIntf ): SkinObject( pIntf ),
53             m_windowManager( getIntf() ) {}
54         virtual ~Theme();
55
56         void loadConfig();
57         void saveConfig();
58
59         GenericBitmap *getBitmapById( const string &id ) const;
60         GenericFont *getFontById( const string &id ) const;
61         Popup *getPopupById( const string &id ) const;
62         TopWindow *getWindowById( const string &id ) const;
63         GenericLayout *getLayoutById( const string &id ) const;
64         CtrlGeneric *getControlById( const string &id ) const;
65         Position *getPositionById( const string &id ) const;
66
67         WindowManager &getWindowManager() { return m_windowManager; }
68
69     private:
70         /// Store the bitmaps by ID
71         map<string, GenericBitmapPtr> m_bitmaps;
72         /// Store the fonts by ID
73         map<string, GenericFontPtr> m_fonts;
74         /// Store the popups by ID
75         map<string, PopupPtr> m_popups;
76         /// Store the windows by ID
77         map<string, TopWindowPtr> m_windows;
78         /// Store the layouts by ID
79         map<string, GenericLayoutPtr> m_layouts;
80         /// Store the controls by ID
81         map<string, CtrlGenericPtr> m_controls;
82         /// Store the panel positions by ID
83         map<string, PositionPtr> m_positions;
84         /// Store the commands
85         list<CmdGenericPtr> m_commands;
86         /// Store the Bezier curves
87         list<BezierPtr> m_curves;
88         /// Store the variables
89         list<VariablePtr> m_vars;
90
91         WindowManager m_windowManager;
92 };
93
94
95 #endif