Crazy Eddies GUI System: CEGUIFalWidgetLookManager.h Source File

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

CEGUIFalWidgetLookManager.h

    00001 /***********************************************************************
    00002     filename:   CEGUIFalWidgetLookManager.h
    00003     created:    Mon Jun 13 2005
    00004     author:     Paul D Turner <paul@cegui.org.uk>
    00005 *************************************************************************/
    00006 /***************************************************************************
    00007  *   Copyright (C) 2004 - 2010 Paul D Turner & The CEGUI Development Team
    00008  *
    00009  *   Permission is hereby granted, free of charge, to any person obtaining
    00010  *   a copy of this software and associated documentation files (the
    00011  *   "Software"), to deal in the Software without restriction, including
    00012  *   without limitation the rights to use, copy, modify, merge, publish,
    00013  *   distribute, sublicense, and/or sell copies of the Software, and to
    00014  *   permit persons to whom the Software is furnished to do so, subject to
    00015  *   the following conditions:
    00016  *
    00017  *   The above copyright notice and this permission notice shall be
    00018  *   included in all copies or substantial portions of the Software.
    00019  *
    00020  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    00021  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    00022  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    00023  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
    00024  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    00025  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    00026  *   OTHER DEALINGS IN THE SOFTWARE.
    00027  ***************************************************************************/
    00028 #ifndef _CEGUIFalWidgetLookManager_h_
    00029 #define _CEGUIFalWidgetLookManager_h_
    00030
    00031 #include "../CEGUISingleton.h"
    00032 #include "../CEGUIString.h"
    00033 #include "../CEGUIExceptions.h"
    00034 #include "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 // Start of CEGUI namespace section
    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 } // End of  CEGUI namespace section
    00237
    00238
    00239 #if defined(_MSC_VER)
    00240 #       pragma warning(pop)
    00241 #endif
    00242
    00243 #endif  // end of guard _CEGUIFalWidgetLookManager_h_