00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _CEGUIFont_xmlHandler_h_
00029 #define _CEGUIFont_xmlHandler_h_
00030
00031 #include "CEGUIXMLHandler.h"
00032 #include "CEGUIString.h"
00033
00034
00035 namespace CEGUI
00036 {
00038 class CEGUIEXPORT Font_xmlHandler : public XMLHandler
00039 {
00040 public:
00042 static const String FontSchemaName;
00044 static const String FontElement;
00046 static const String MappingElement;
00048 static const String FontTypeAttribute;
00050 static const String FontNameAttribute;
00052 static const String FontFilenameAttribute;
00054 static const String FontResourceGroupAttribute;
00056 static const String FontAutoScaledAttribute;
00058 static const String FontNativeHorzResAttribute;
00060 static const String FontNativeVertResAttribute;
00062 static const String FontLineSpacingAttribute;
00064 static const String FontSizeAttribute;
00066 static const String FontAntiAliasedAttribute;
00068 static const String MappingCodepointAttribute;
00070 static const String MappingImageAttribute;
00072 static const String MappingHorzAdvanceAttribute;
00074 static const String FontTypeFreeType;
00076 static const String FontTypePixmap;
00077
00079 Font_xmlHandler(const String& filename, const String& resource_group);
00080
00082 ~Font_xmlHandler();
00083
00085 const String& getObjectName() const;
00086
00088 Font& getObject() const;
00089
00090
00091 void elementStart(const String& element, const XMLAttributes& attributes);
00092 void elementEnd(const String& element);
00093
00094 private:
00096 void elementFontStart(const XMLAttributes& attributes);
00098 void elementFontEnd();
00100 void elementMappingStart(const XMLAttributes& attributes);
00102 void createFreeTypeFont(const XMLAttributes& attributes);
00104 void createPixmapFont(const XMLAttributes& attributes);
00105
00107 Font* d_font;
00109 mutable bool d_objectRead;
00110 };
00111
00112 }
00113
00114 #endif