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 _CEGUIFontManager_h_
00029 #define _CEGUIFontManager_h_
00030
00031 #include "CEGUISingleton.h"
00032 #include "CEGUINamedXMLResourceManager.h"
00033 #include "CEGUIFont.h"
00034 #include "CEGUIFont_xmlHandler.h"
00035 #include "CEGUIIteratorBase.h"
00036
00037 #if defined(_MSC_VER)
00038 # pragma warning(push)
00039 # pragma warning(disable : 4275)
00040 # pragma warning(disable : 4251)
00041 #endif
00042
00043
00044 namespace CEGUI
00045 {
00046 class FreeTypeFont;
00047 class PixmapFont;
00048
00058 class CEGUIEXPORT FontManager :
00059 public Singleton<FontManager>,
00060 public NamedXMLResourceManager<Font, Font_xmlHandler>
00061 {
00062 public:
00064 FontManager();
00065
00067 ~FontManager();
00068
00111 Font& createFreeTypeFont(const String& font_name, const float point_size,
00112 const bool anti_aliased,
00113 const String& font_filename,
00114 const String& resource_group = "",
00115 const bool auto_scaled = false,
00116 const float native_horz_res = 640.0f,
00117 const float native_vert_res = 480.0f,
00118 XMLResourceExistsAction action = XREA_RETURN);
00119
00160 Font& createPixmapFont(const String& font_name,
00161 const String& imageset_filename,
00162 const String& resource_group = "",
00163 const bool auto_scaled = false,
00164 const float native_horz_res = 640.0f,
00165 const float native_vert_res = 480.0f,
00166 XMLResourceExistsAction action = XREA_RETURN);
00167
00175 void notifyDisplaySizeChanged(const Size& size);
00176
00188 void writeFontToStream(const String& name, OutStream& out_stream) const;
00189
00191 typedef ConstBaseIterator<ObjectRegistry> FontIterator;
00192
00198 FontIterator getIterator() const;
00199
00200
00201 using NamedXMLResourceManager<Font, Font_xmlHandler>::create;
00202
00203 protected:
00204
00205 void doPostObjectAdditionAction(Font& object);
00206 };
00207
00208 }
00209
00210
00211 #if defined(_MSC_VER)
00212 # pragma warning(pop)
00213 #endif
00214
00215 #endif // end of guard _CEGUIFontManager_h_