Crazy Eddie's GUI System 0.8.7
Loading...
Searching...
No Matches
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
34namespace CEGUI
35{
37class CEGUIEXPORT Scheme_xmlHandler : public XMLHandler
38{
39public:
42
45
47 const String& getObjectName() const;
48
50 Scheme& getObject() const;
51
52 // XMLHandler overrides
53 const String& getSchemaName() const;
55 void elementStart(const String& element, const XMLAttributes& attributes);
56 void elementEnd(const String& element);
57
58private:
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_
Handler class used to parse the Scheme XML files using SAX2.
Definition Scheme_xmlHandler.h:38
const String & getDefaultResourceGroup() const
Retrieves the default resource group to be used when handling files.
Scheme & getObject() const
Return reference to the created Scheme object.
const String & getSchemaName() const
Retrieves the schema file name to use with resources handled by this handler.
const String & getObjectName() const
Return string holding the name of the created Imageset.
Scheme_xmlHandler()
Constructor.
~Scheme_xmlHandler()
Destructor.
void elementStart(const String &element, const XMLAttributes &attributes)
Method called to notify the handler at the start of each XML element encountered.
void elementEnd(const String &element)
Method called to notify the handler at the end of each XML element encountered.
A class that groups a set of GUI elements and initialises the system to access those elements.
Definition Scheme.h:60
String class used within the GUI system.
Definition String.h:64
base class for properties able to do native set/get
Definition TypedProperty.h:50
Class representing a block of attributes associated with an XML element.
Definition XMLAttributes.h:48
Definition XMLHandler.h:37
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1