00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _CEGUIScheme_h_
00027 #define _CEGUIScheme_h_
00028
00029 #include "CEGUIBase.h"
00030 #include "CEGUIString.h"
00031 #include "CEGUISchemeManager.h"
00032
00033 #include <vector>
00034
00035
00036 #if defined(_MSC_VER)
00037 # pragma warning(push)
00038 # pragma warning(disable : 4251)
00039 #endif
00040
00041
00042
00043 namespace CEGUI
00044 {
00054 class CEGUIEXPORT Scheme
00055 {
00056 friend class Scheme_xmlHandler;
00057 public:
00065 void loadResources(void);
00066
00067
00075 void unloadResources(void);
00076
00077
00085 bool resourcesLoaded(void) const;
00086
00087
00095 const String& getName(void) const {return d_name;}
00096
00097 private:
00098
00099
00100
00101 static const char GUISchemeSchemaName[];
00102
00103
00104
00105
00106 friend Scheme* SchemeManager::loadScheme(const String& scheme_filename, const String& resourceGroup);
00107 friend void SchemeManager::unloadScheme(const String& scheme_name);
00108
00109
00110
00111
00112
00127 Scheme(const String& filename, const String& resourceGroup);
00128
00129
00130 public:
00138 ~Scheme(void);
00139
00140
00141 private:
00142
00143
00144
00145 struct LoadableUIElement
00146 {
00147 String name;
00148 String filename;
00149 String resourceGroup;
00150 };
00151
00152 struct UIElementFactory
00153 {
00154 String name;
00155 };
00156
00157 struct UIModule
00158 {
00159 String name;
00160 FactoryModule* module;
00161 std::vector<UIElementFactory> factories;
00162 };
00163
00164 struct AliasMapping
00165 {
00166 String aliasName;
00167 String targetName;
00168 };
00169
00170 struct FalagardMapping
00171 {
00172 String windowName;
00173 String targetName;
00174 String lookName;
00175 };
00176
00177
00178
00179
00180 String d_name;
00181
00182 std::vector<LoadableUIElement> d_imagesets;
00183 std::vector<LoadableUIElement> d_imagesetsFromImages;
00184 std::vector<LoadableUIElement> d_fonts;
00185 std::vector<UIModule> d_widgetModules;
00186 std::vector<AliasMapping> d_aliasMappings;
00187 std::vector<LoadableUIElement> d_looknfeels;
00188 std::vector<FalagardMapping> d_falagardMappings;
00189 };
00190
00191 }
00192
00193 #if defined(_MSC_VER)
00194 # pragma warning(pop)
00195 #endif
00196
00197 #endif // end of guard _CEGUIScheme_h_