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
00029
00030 #ifndef _CEGUIFontManager_h_
00031 #define _CEGUIFontManager_h_
00032
00033 #include "CEGUIBase.h"
00034 #include "CEGUIString.h"
00035 #include "CEGUISingleton.h"
00036 #include "CEGUIIteratorBase.h"
00037 #include <map>
00038
00039 #if defined(_MSC_VER)
00040 # pragma warning(push)
00041 # pragma warning(disable : 4275)
00042 # pragma warning(disable : 4251)
00043 #endif
00044
00045
00046
00047 namespace CEGUI
00048 {
00058 class CEGUIEXPORT FontManager : public Singleton<FontManager>
00059 {
00060 public:
00065 FontManager(void);
00066
00067
00072 ~FontManager(void);
00073
00074
00095 Font *createFont(const String& filename, const String& resourceGroup = "");
00096
00097
00123 Font *createFont (const String &type, const String& name, const String& fontname,
00124 const String& resourceGroup = "");
00125
00126
00134 Font *createFont (const String &type, const XMLAttributes& attributes);
00135
00136
00147 void destroyFont(const String& name);
00148
00149
00160 void destroyFont(Font* font);
00161
00162
00170 void destroyAllFonts(void);
00171
00172
00183 bool isFontPresent(const String& name) const;
00184
00185
00198 Font* getFont(const String& name) const;
00199
00200
00211 void notifyScreenResolution(const Size& size);
00212
00213
00227 void writeFontToStream(const String& name, OutStream& out_stream) const;
00228
00229
00230 private:
00231
00232
00233
00234 typedef std::map<String, Font*, String::FastLessCompare> FontRegistry;
00235 FontRegistry d_fonts;
00236
00237 public:
00238
00239
00240
00241 typedef ConstBaseIterator<FontRegistry> FontIterator;
00242
00247 FontIterator getIterator (void) const;
00248 };
00249
00250 }
00251
00252
00253 #if defined(_MSC_VER)
00254 # pragma warning(pop)
00255 #endif
00256
00257 #endif // end of guard _CEGUIFontManager_h_