27 #ifndef _CEGUIConfig_xmlHandler_h_
28 #define _CEGUIConfig_xmlHandler_h_
30 #include "CEGUI/Base.h"
31 #include "CEGUI/String.h"
32 #include "CEGUI/Logger.h"
33 #include "CEGUI/XMLHandler.h"
36 #if defined (_MSC_VER)
37 # pragma warning(push)
38 # pragma warning(disable : 4251)
51 static const String CEGUIConfigElement;
52 static const String LoggingElement;
53 static const String AutoLoadElement;
54 static const String ResourceDirectoryElement;
55 static const String DefaultResourceGroupElement;
56 static const String ScriptingElement;
57 static const String XMLParserElement;
58 static const String ImageCodecElement;
59 static const String DefaultFontElement;
60 static const String DefaultMouseCursorElement;
61 static const String DefaultTooltipElement;
63 static const String FilenameAttribute;
64 static const String LevelAttribute;
65 static const String TypeAttribute;
66 static const String GroupAttribute;
67 static const String PatternAttribute;
68 static const String DirectoryAttribute;
69 static const String InitScriptAttribute;
70 static const String TerminateScriptAttribute;
71 static const String ImageAttribute;
72 static const String NameAttribute;
125 struct ResourceDirectory
132 struct DefaultResourceGroup
139 struct AutoLoadResource
148 void handleCEGUIConfigElement(
const XMLAttributes& attr);
149 void handleLoggingElement(
const XMLAttributes& attr);
150 void handleAutoLoadElement(
const XMLAttributes& attr);
151 void handleResourceDirectoryElement(
const XMLAttributes& attr);
152 void handleDefaultResourceGroupElement(
const XMLAttributes& attr);
153 void handleScriptingElement(
const XMLAttributes& attr);
154 void handleXMLParserElement(
const XMLAttributes& attr);
155 void handleImageCodecElement(
const XMLAttributes& attr);
156 void handleDefaultTooltipElement(
const XMLAttributes& attr);
157 void handleDefaultFontElement(
const XMLAttributes& attr);
158 void handleDefaultMouseCursorElement(
const XMLAttributes& attr);
161 ResourceType stringToResourceType(
const String& type)
const;
163 void autoLoadLookNFeels(
const String& pattern,
const String& group)
const;
165 void autoLoadImagesets(
const String& pattern,
const String& group)
const;
168 typedef std::vector<ResourceDirectory
169 CEGUI_VECTOR_ALLOC(ResourceDirectory)> ResourceDirVector;
171 typedef std::vector<DefaultResourceGroup
172 CEGUI_VECTOR_ALLOC(DefaultResourceGroup)> DefaultGroupVector;
174 typedef std::vector<AutoLoadResource
175 CEGUI_VECTOR_ALLOC(AutoLoadResource)> AutoResourceVector;
177 String d_logFileName;
181 String d_xmlParserName;
183 String d_imageCodecName;
185 String d_defaultFont;
187 String d_defaultMouseImage;
189 String d_defaultTooltipType;
191 String d_scriptingInitScript;
193 String d_scriptingTerminateScript;
195 ResourceDirVector d_resourceDirectories;
197 DefaultGroupVector d_defaultResourceGroups;
199 AutoResourceVector d_autoLoadResources;
204 #if defined (_MSC_VER)
205 # pragma warning(pop)
208 #endif // end of guard _CEGUIConfig_xmlHandler_h_
void initialiseDefaultResourceGroups() const
Set default resource groups according to those in the config.
void initialiseDefaultFont() const
initialise the system default font according to the config.
const String & getTerminateScriptName() const
return the name of the terminate script from the config (hacky!)
void loadAutoResources() const
Auto-load all resources specified in the config.
void elementEnd(const String &element)
Method called to notify the handler at the end of each XML element encountered.
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
void executeInitScript() const
execute the init script as specified in the config.
Handler class used to parse the Configuration XML file.
Definition: Config_xmlHandler.h:45
Config_xmlHandler()
Constructor.
Definition: XMLHandler.h:36
const String & getSchemaName() const
Retrieves the schema file name to use with resources handled by this handler.
void initialiseLogger(const String &default_filename) const
Initialise the CEGUI Logger according to info parsed from config.
void initialiseXMLParser() const
Initialise the CEGUI XMLParser according to info parsed from config.
void initialiseDefaulTooltip() const
initialise the system default tooltip according to the config.
static const String CEGUIConfigSchemaName
Name of xsd schema file used for validation.
Definition: Config_xmlHandler.h:49
~Config_xmlHandler()
Destructor.
void initialiseDefaultMouseCursor() const
initialise the system default mouse cursor image according to the config.
void elementStart(const String &element, const XMLAttributes &attributes)
Method called to notify the handler at the start of each XML element encountered. ...
void initialiseResourceGroupDirectories() const
Set resource group dirs read from the config. (DefaultResourceProvider only).
Class representing a block of attributes associated with an XML element.
Definition: XMLAttributes.h:46
void initialiseImageCodec() const
Initialise the CEGUI ImageCodec according to info parsed from config.
LoggingLevel
Enumeration of logging levels.
Definition: Logger.h:56
const String & getDefaultResourceGroup() const
Retrieves the default resource group to be used when handling files.
String class used within the GUI system.
Definition: String.h:62