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
00027
00028
00029
00030 #ifndef _CEGUIScheme_h_
00031 #define _CEGUIScheme_h_
00032
00033 #include "CEGUIBase.h"
00034 #include "CEGUIString.h"
00035 #include "CEGUISchemeManager.h"
00036
00037
00038 #include <vector>
00039
00040
00041 #if defined(_MSC_VER)
00042 # pragma warning(push)
00043 # pragma warning(disable : 4251)
00044 #endif
00045
00046
00047
00048 namespace CEGUI
00049 {
00059 class CEGUIEXPORT Scheme
00060 {
00061 friend class Scheme_xmlHandler;
00062 public:
00070 void loadResources(void);
00071
00072
00080 void unloadResources(void);
00081
00082
00090 bool resourcesLoaded(void) const;
00091
00092
00100 const String& getName(void) const {return d_name;}
00101
00110 static const String& getDefaultResourceGroup()
00111 { return d_defaultResourceGroup; }
00112
00123 static void setDefaultResourceGroup(const String& resourceGroup)
00124 { d_defaultResourceGroup = resourceGroup; }
00125
00126 private:
00127
00128
00129
00137 Scheme(const String& name);
00138
00143 void loadXMLImagesets();
00144
00149 void loadImageFileImagesets();
00150
00155 void loadFonts();
00156
00161 void loadLookNFeels();
00162
00167 void loadWindowFactories();
00168
00173 void loadWindowRendererFactories();
00174
00179 void loadFactoryAliases();
00180
00185 void loadFalagardMappings();
00186
00191 void unloadXMLImagesets();
00192
00197 void unloadImageFileImagesets();
00198
00203 void unloadFonts();
00204
00209 void unloadLookNFeels();
00210
00215 void unloadWindowFactories();
00216
00221 void unloadWindowRendererFactories();
00222
00227 void unloadFactoryAliases();
00228
00233 void unloadFalagardMappings();
00234
00239 bool areXMLImagesetsLoaded() const;
00240
00245 bool areImageFileImagesetsLoaded() const;
00246
00251 bool areFontsLoaded() const;
00252
00257 bool areLookNFeelsLoaded() const;
00258
00263 bool areWindowFactoriesLoaded() const;
00264
00269 bool areWindowRendererFactoriesLoaded() const;
00270
00275 bool areFactoryAliasesLoaded() const;
00276
00281 bool areFalagardMappingsLoaded() const;
00282
00283 public:
00291 ~Scheme(void);
00292
00293
00294 private:
00295
00296
00297
00298 struct LoadableUIElement
00299 {
00300 String name;
00301 String filename;
00302 String resourceGroup;
00303 };
00304
00305 struct UIElementFactory
00306 {
00307 String name;
00308 };
00309
00310 struct UIModule
00311 {
00312 String name;
00313 FactoryModule* module;
00314 std::vector<UIElementFactory> factories;
00315 };
00316
00317 struct WRModule
00318 {
00319 String name;
00320 DynamicModule* dynamicModule;
00321 WindowRendererModule* wrModule;
00322 std::vector<String> wrTypes;
00323 };
00324
00325 struct AliasMapping
00326 {
00327 String aliasName;
00328 String targetName;
00329 };
00330
00331 struct FalagardMapping
00332 {
00333 String windowName;
00334 String targetName;
00335 String rendererName;
00336 String lookName;
00337 String effectName;
00338 };
00339
00340
00341
00342
00343 String d_name;
00344
00345 std::vector<LoadableUIElement> d_imagesets;
00346 std::vector<LoadableUIElement> d_imagesetsFromImages;
00347 std::vector<LoadableUIElement> d_fonts;
00348 std::vector<UIModule> d_widgetModules;
00349 std::vector<WRModule> d_windowRendererModules;
00350 std::vector<AliasMapping> d_aliasMappings;
00351 std::vector<LoadableUIElement> d_looknfeels;
00352 std::vector<FalagardMapping> d_falagardMappings;
00353
00354 static String d_defaultResourceGroup;
00355 };
00356
00357 }
00358
00359 #if defined(_MSC_VER)
00360 # pragma warning(pop)
00361 #endif
00362
00363 #endif // end of guard _CEGUIScheme_h_