Crazy Eddie's GUI System  0.8.4
Scheme_xmlHandler.h
00001 /***********************************************************************
00002     created:    Mon Jul 20 2009
00003     author:     Paul D Turner <paul@cegui.org.uk>
00004 *************************************************************************/
00005 /***************************************************************************
00006  *   Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
00007  *
00008  *   Permission is hereby granted, free of charge, to any person obtaining
00009  *   a copy of this software and associated documentation files (the
00010  *   "Software"), to deal in the Software without restriction, including
00011  *   without limitation the rights to use, copy, modify, merge, publish,
00012  *   distribute, sublicense, and/or sell copies of the Software, and to
00013  *   permit persons to whom the Software is furnished to do so, subject to
00014  *   the following conditions:
00015  *
00016  *   The above copyright notice and this permission notice shall be
00017  *   included in all copies or substantial portions of the Software.
00018  *
00019  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00020  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00021  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00022  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00023  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00024  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00025  *   OTHER DEALINGS IN THE SOFTWARE.
00026  ***************************************************************************/
00027 #ifndef _CEGUIScheme_xmlHandler_h_
00028 #define _CEGUIScheme_xmlHandler_h_
00029 
00030 #include "CEGUI/XMLHandler.h"
00031 #include "CEGUI/String.h"
00032 
00033 // Start of CEGUI namespace section
00034 namespace CEGUI
00035 {
00037 class CEGUIEXPORT Scheme_xmlHandler : public XMLHandler
00038 {
00039 public:
00041     Scheme_xmlHandler();
00042 
00044     ~Scheme_xmlHandler();
00045 
00047     const String& getObjectName() const;
00048 
00050     Scheme& getObject() const;
00051 
00052     // XMLHandler overrides
00053     const String& getSchemaName() const;
00054     const String& getDefaultResourceGroup() const;
00055     void elementStart(const String& element, const XMLAttributes& attributes);
00056     void elementEnd(const String& element);
00057 
00058 private:
00060     static const String GUISchemeSchemaName;
00062     static const String GUISchemeElement;
00064     static const String ImagesetElement;
00066     static const String ImagesetFromImageElement;
00068     static const String FontElement;
00070     static const String WindowSetElement;
00072     static const String WindowFactoryElement;
00074     static const String WindowAliasElement;
00076     static const String FalagardMappingElement;
00078     static const String LookNFeelElement;
00080     static const String NameAttribute;
00082     static const String FilenameAttribute;
00084     static const String AliasAttribute;
00086     static const String TargetAttribute;
00088     static const String ResourceGroupAttribute;
00090     static const String WindowTypeAttribute;
00092     static const String TargetTypeAttribute;
00094     static const String LookNFeelAttribute;
00096     static const String WindowRendererSetElement;
00098     static const String WindowRendererFactoryElement;
00100     static const String WindowRendererAttribute;
00102     static const String RenderEffectAttribute;
00104     static const String SchemeVersionAttribute;
00105 
00107     void elementGUISchemeStart(const XMLAttributes& attributes);
00109     void elementImagesetStart(const XMLAttributes& attributes);
00111     void elementImagesetFromImageStart(const XMLAttributes& attributes);
00113     void elementFontStart(const XMLAttributes& attributes);
00115     void elementWindowSetStart(const XMLAttributes& attributes);
00117     void elementWindowFactoryStart(const XMLAttributes& attributes);
00119     void elementWindowRendererSetStart(const XMLAttributes& attributes);
00121     void elementWindowRendererFactoryStart(const XMLAttributes& attributes);
00123     void elementWindowAliasStart(const XMLAttributes& attributes);
00125     void elementFalagardMappingStart(const XMLAttributes& attributes);
00127     void elementLookNFeelStart(const XMLAttributes& attributes);
00129     void elementGUISchemeEnd();
00130 
00132     void validateSchemeFileVersion(const XMLAttributes& attrs);
00133 
00135     Scheme* d_scheme;
00137     mutable bool d_objectRead;
00138 };
00139 
00140 } // End of  CEGUI namespace section
00141 
00142 #endif  // end of guard _CEGUIScheme_xmlHandler_h_
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends