• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

CEGUIFont_xmlHandler.h

00001 /***********************************************************************
00002     filename:   CEGUIFont_xmlHandler.h
00003     created:    Sun Jul 19 2009
00004     author:     Paul D Turner <paul@cegui.org.uk>
00005 *************************************************************************/
00006 /***************************************************************************
00007  *   Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
00008  *
00009  *   Permission is hereby granted, free of charge, to any person obtaining
00010  *   a copy of this software and associated documentation files (the
00011  *   "Software"), to deal in the Software without restriction, including
00012  *   without limitation the rights to use, copy, modify, merge, publish,
00013  *   distribute, sublicense, and/or sell copies of the Software, and to
00014  *   permit persons to whom the Software is furnished to do so, subject to
00015  *   the following conditions:
00016  *
00017  *   The above copyright notice and this permission notice shall be
00018  *   included in all copies or substantial portions of the Software.
00019  *
00020  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00021  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00022  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00023  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00024  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00025  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00026  *   OTHER DEALINGS IN THE SOFTWARE.
00027  ***************************************************************************/
00028 #ifndef _CEGUIFont_xmlHandler_h_
00029 #define _CEGUIFont_xmlHandler_h_
00030 
00031 #include "CEGUIXMLHandler.h"
00032 #include "CEGUIString.h"
00033 
00034 // Start of CEGUI namespace section
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     // XMLHandler overrides
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 } // End of  CEGUI namespace section
00113 
00114 #endif

Generated on Fri Nov 19 2010 12:01:19 for Crazy Eddies GUI System by  doxygen 1.7.2