Crazy Eddie's GUI System  0.8.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Scheme_xmlHandler.h
1 /***********************************************************************
2  created: Mon Jul 20 2009
3  author: Paul D Turner <paul@cegui.org.uk>
4 *************************************************************************/
5 /***************************************************************************
6  * Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining
9  * a copy of this software and associated documentation files (the
10  * "Software"), to deal in the Software without restriction, including
11  * without limitation the rights to use, copy, modify, merge, publish,
12  * distribute, sublicense, and/or sell copies of the Software, and to
13  * permit persons to whom the Software is furnished to do so, subject to
14  * the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be
17  * included in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  ***************************************************************************/
27 #ifndef _CEGUIScheme_xmlHandler_h_
28 #define _CEGUIScheme_xmlHandler_h_
29 
30 #include "CEGUI/XMLHandler.h"
31 #include "CEGUI/String.h"
32 
33 // Start of CEGUI namespace section
34 namespace CEGUI
35 {
37 class CEGUIEXPORT Scheme_xmlHandler : public XMLHandler
38 {
39 public:
42 
45 
47  const String& getObjectName() const;
48 
50  Scheme& getObject() const;
51 
52  // XMLHandler overrides
53  const String& getSchemaName() const;
54  const String& getDefaultResourceGroup() const;
55  void elementStart(const String& element, const XMLAttributes& attributes);
56  void elementEnd(const String& element);
57 
58 private:
60  static const String GUISchemeSchemaName;
62  static const String GUISchemeElement;
64  static const String ImagesetElement;
66  static const String ImagesetFromImageElement;
68  static const String FontElement;
70  static const String WindowSetElement;
72  static const String WindowFactoryElement;
74  static const String WindowAliasElement;
76  static const String FalagardMappingElement;
78  static const String LookNFeelElement;
80  static const String NameAttribute;
82  static const String FilenameAttribute;
84  static const String AliasAttribute;
86  static const String TargetAttribute;
88  static const String ResourceGroupAttribute;
90  static const String WindowTypeAttribute;
92  static const String TargetTypeAttribute;
94  static const String LookNFeelAttribute;
96  static const String WindowRendererSetElement;
98  static const String WindowRendererFactoryElement;
100  static const String WindowRendererAttribute;
102  static const String RenderEffectAttribute;
104  static const String SchemeVersionAttribute;
105 
107  void elementGUISchemeStart(const XMLAttributes& attributes);
109  void elementImagesetStart(const XMLAttributes& attributes);
111  void elementImagesetFromImageStart(const XMLAttributes& attributes);
113  void elementFontStart(const XMLAttributes& attributes);
115  void elementWindowSetStart(const XMLAttributes& attributes);
117  void elementWindowFactoryStart(const XMLAttributes& attributes);
119  void elementWindowRendererSetStart(const XMLAttributes& attributes);
121  void elementWindowRendererFactoryStart(const XMLAttributes& attributes);
123  void elementWindowAliasStart(const XMLAttributes& attributes);
125  void elementFalagardMappingStart(const XMLAttributes& attributes);
127  void elementLookNFeelStart(const XMLAttributes& attributes);
129  void elementGUISchemeEnd();
130 
132  void validateSchemeFileVersion(const XMLAttributes& attrs);
133 
135  Scheme* d_scheme;
137  mutable bool d_objectRead;
138 };
139 
140 } // End of CEGUI namespace section
141 
142 #endif // end of guard _CEGUIScheme_xmlHandler_h_