Crazy Eddies GUI System  0.7.8
CEGUIScheme_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 "CEGUIXMLHandler.h"
32 #include "CEGUIString.h"
33 
34 // Start of CEGUI namespace section
35 namespace CEGUI
36 {
38 class CEGUIEXPORT Scheme_xmlHandler : public XMLHandler
39 {
40 public:
42  Scheme_xmlHandler(const String& filename, const String& resource_group);
43 
46 
48  const String& getObjectName() const;
49 
51  Scheme& getObject() const;
52 
53  // XMLHandler overrides
54  void elementStart(const String& element, const XMLAttributes& attributes);
55  void elementEnd(const String& element);
56 
57 private:
59  static const String GUISchemeSchemaName;
61  static const String GUISchemeElement;
63  static const String ImagesetElement;
65  static const String ImagesetFromImageElement;
67  static const String FontElement;
69  static const String WindowSetElement;
71  static const String WindowFactoryElement;
73  static const String WindowAliasElement;
75  static const String FalagardMappingElement;
77  static const String LookNFeelElement;
79  static const String NameAttribute;
81  static const String FilenameAttribute;
83  static const String AliasAttribute;
85  static const String TargetAttribute;
87  static const String ResourceGroupAttribute;
89  static const String WindowTypeAttribute;
91  static const String TargetTypeAttribute;
93  static const String LookNFeelAttribute;
95  static const String WindowRendererSetElement;
97  static const String WindowRendererFactoryElement;
99  static const String WindowRendererAttribute;
101  static const String RenderEffectAttribute;
102 
104  void elementGUISchemeStart(const XMLAttributes& attributes);
106  void elementImagesetStart(const XMLAttributes& attributes);
108  void elementImagesetFromImageStart(const XMLAttributes& attributes);
110  void elementFontStart(const XMLAttributes& attributes);
112  void elementWindowSetStart(const XMLAttributes& attributes);
114  void elementWindowFactoryStart(const XMLAttributes& attributes);
116  void elementWindowRendererSetStart(const XMLAttributes& attributes);
118  void elementWindowRendererFactoryStart(const XMLAttributes& attributes);
120  void elementWindowAliasStart(const XMLAttributes& attributes);
122  void elementFalagardMappingStart(const XMLAttributes& attributes);
124  void elementLookNFeelStart(const XMLAttributes& attributes);
126  void elementGUISchemeEnd();
127 
129  Scheme* d_scheme;
131  mutable bool d_objectRead;
132 };
133 
134 } // End of CEGUI namespace section
135 
136 #endif // end of guard _CEGUIScheme_xmlHandler_h_