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
00033
00034 namespace CEGUI
00035 {
00037 class CEGUIEXPORT Font_xmlHandler : public XMLHandler
00038 {
00039 public:
00041 static const String FontSchemaName;
00043 static const String FontElement;
00045 static const String MappingElement;
00047 static const String FontTypeAttribute;
00049 static const String FontNameAttribute;
00051 static const String FontFilenameAttribute;
00053 static const String FontResourceGroupAttribute;
00055 static const String FontAutoScaledAttribute;
00057 static const String FontNativeHorzResAttribute;
00059 static const String FontNativeVertResAttribute;
00061 static const String FontSizeAttribute;
00063 static const String FontAntiAliasedAttribute;
00065 static const String MappingCodepointAttribute;
00067 static const String MappingImageAttribute;
00069 static const String MappingHorzAdvanceAttribute;
00071 static const String FontTypeFreeType;
00073 static const String FontTypePixmap;
00074
00076 Font_xmlHandler(const String& filename, const String& resource_group);
00077
00079 ~Font_xmlHandler();
00080
00082 const String& getObjectName() const;
00083
00085 Font& getObject() const;
00086
00087
00088 void elementStart(const String& element, const XMLAttributes& attributes);
00089 void elementEnd(const String& element);
00090
00091 private:
00093 void elementFontStart(const XMLAttributes& attributes);
00095 void elementFontEnd();
00097 void elementMappingStart(const XMLAttributes& attributes);
00099 void createFreeTypeFont(const XMLAttributes& attributes);
00101 void createPixmapFont(const XMLAttributes& attributes);
00102
00104 Font* d_font;
00106 mutable bool d_objectRead;
00107 };
00108
00109 }
00110
00111 #endif