Crazy Eddie's GUI System  0.8.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Scheme_xmlHandler.h
1 /***********************************************************************
2  filename: CEGUIScheme_xmlHandler.h
3  created: Mon Jul 20 2009
4  author: Paul D Turner <paul@cegui.org.uk>
5 *************************************************************************/
6 /***************************************************************************
7  * Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining
10  * a copy of this software and associated documentation files (the
11  * "Software"), to deal in the Software without restriction, including
12  * without limitation the rights to use, copy, modify, merge, publish,
13  * distribute, sublicense, and/or sell copies of the Software, and to
14  * permit persons to whom the Software is furnished to do so, subject to
15  * the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be
18  * included in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26  * OTHER DEALINGS IN THE SOFTWARE.
27  ***************************************************************************/
28 #ifndef _CEGUIScheme_xmlHandler_h_
29 #define _CEGUIScheme_xmlHandler_h_
30 
31 #include "CEGUI/XMLHandler.h"
32 #include "CEGUI/String.h"
33 
34 // Start of CEGUI namespace section
35 namespace CEGUI
36 {
38 class CEGUIEXPORT Scheme_xmlHandler : public XMLHandler
39 {
40 public:
43 
46 
48  const String& getObjectName() const;
49 
51  Scheme& getObject() const;
52 
53  // XMLHandler overrides
54  const String& getSchemaName() const;
55  const String& getDefaultResourceGroup() const;
56  void elementStart(const String& element, const XMLAttributes& attributes);
57  void elementEnd(const String& element);
58 
59 private:
61  static const String GUISchemeSchemaName;
63  static const String GUISchemeElement;
65  static const String ImagesetElement;
67  static const String ImagesetFromImageElement;
69  static const String FontElement;
71  static const String WindowSetElement;
73  static const String WindowFactoryElement;
75  static const String WindowAliasElement;
77  static const String FalagardMappingElement;
79  static const String LookNFeelElement;
81  static const String NameAttribute;
83  static const String FilenameAttribute;
85  static const String AliasAttribute;
87  static const String TargetAttribute;
89  static const String ResourceGroupAttribute;
91  static const String WindowTypeAttribute;
93  static const String TargetTypeAttribute;
95  static const String LookNFeelAttribute;
97  static const String WindowRendererSetElement;
99  static const String WindowRendererFactoryElement;
101  static const String WindowRendererAttribute;
103  static const String RenderEffectAttribute;
105  static const String SchemeVersionAttribute;
106 
108  void elementGUISchemeStart(const XMLAttributes& attributes);
110  void elementImagesetStart(const XMLAttributes& attributes);
112  void elementImagesetFromImageStart(const XMLAttributes& attributes);
114  void elementFontStart(const XMLAttributes& attributes);
116  void elementWindowSetStart(const XMLAttributes& attributes);
118  void elementWindowFactoryStart(const XMLAttributes& attributes);
120  void elementWindowRendererSetStart(const XMLAttributes& attributes);
122  void elementWindowRendererFactoryStart(const XMLAttributes& attributes);
124  void elementWindowAliasStart(const XMLAttributes& attributes);
126  void elementFalagardMappingStart(const XMLAttributes& attributes);
128  void elementLookNFeelStart(const XMLAttributes& attributes);
130  void elementGUISchemeEnd();
131 
133  void validateSchemeFileVersion(const XMLAttributes& attrs);
134 
136  Scheme* d_scheme;
138  mutable bool d_objectRead;
139 };
140 
141 } // End of CEGUI namespace section
142 
143 #endif // end of guard _CEGUIScheme_xmlHandler_h_