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 #ifndef _CEGUIFalWidgetLookManager_h_
00029 #define _CEGUIFalWidgetLookManager_h_
00030
00031 #include "CEGUISingleton.h"
00032 #include "CEGUIString.h"
00033 #include "CEGUIExceptions.h"
00034 #include "falagard/CEGUIFalWidgetLookFeel.h"
00035 #include <map>
00036
00037 #if defined(_MSC_VER)
00038 # pragma warning(push)
00039 # pragma warning(disable : 4251)
00040 # pragma warning(disable : 4275)
00041 #endif
00042
00043
00044 namespace CEGUI
00045 {
00050 class CEGUIEXPORT WidgetLookManager : public Singleton<WidgetLookManager>
00051 {
00052 public:
00057 WidgetLookManager();
00058
00063 ~WidgetLookManager();
00064
00072 static WidgetLookManager& getSingleton(void);
00073
00074
00082 static WidgetLookManager* getSingletonPtr(void);
00083
00084
00106 void parseLookNFeelSpecification(const String& filename, const String& resourceGroup = "");
00107
00108
00120 bool isWidgetLookAvailable(const String& widget) const;
00121
00122
00135 const WidgetLookFeel& getWidgetLook(const String& widget) const;
00136
00137
00149 void eraseWidgetLook(const String& widget);
00150
00151
00168 void addWidgetLook(const WidgetLookFeel& look);
00169
00170
00182 void writeWidgetLookToStream(const String& name, OutStream& out_stream) const;
00183
00200 void writeWidgetLookSeriesToStream(const String& prefix, OutStream& out_stream) const;
00201
00210 static const String& getDefaultResourceGroup()
00211 { return d_defaultResourceGroup; }
00212
00223 static void setDefaultResourceGroup(const String& resourceGroup)
00224 { d_defaultResourceGroup = resourceGroup; }
00225
00226
00227 private:
00228 static const String FalagardSchemaName;
00229
00230 typedef std::map<String, WidgetLookFeel, String::FastLessCompare> WidgetLookList;
00231 WidgetLookList d_widgetLooks;
00232
00233 static String d_defaultResourceGroup;
00234 };
00235
00236 }
00237
00238
00239 #if defined(_MSC_VER)
00240 # pragma warning(pop)
00241 #endif
00242
00243 #endif // end of guard _CEGUIFalWidgetLookManager_h_