00001 #include "API/Core/System/clanstring.h" 00002 #include "API/Core/Resources/resource_manager.h" 00003 #include <Display/Font/resource_font_generic.h> 00004 00005 class CL_Font_TTF; 00006 00007 class CL_Res_Font_TTF : public CL_Res_Font_Generic 00008 { 00009 public: 00010 CL_Res_Font_TTF(); 00011 00012 private: 00013 00014 friend CL_ResourceManager; 00015 virtual CL_Resource *create_from_location( 00016 std::string name, 00017 std::string location, 00018 CL_ResourceOptions *options, 00019 CL_ResourceManager *parent); 00020 00021 virtual CL_Resource *create_from_serialization( 00022 std::string name, 00023 CL_ResourceManager *parent); 00024 00025 00026 }; 00027 00028 class CL_Font_Resource_TTF : public CL_Font_Resource_Generic 00029 { 00030 public: 00031 00032 CL_Font_Resource_TTF( 00033 std::string name, 00034 std::string location, 00035 CL_ResourceOptions *options, 00036 CL_ResourceManager *parent); 00037 00038 CL_Font_Resource_TTF( 00039 std::string name, 00040 CL_ResourceManager *parent); 00041 00042 void serialize_save(CL_OutputSource *output); 00043 void load(); 00044 void unload(); 00045 00046 private: 00047 00048 CL_Font_TTF *ttf; 00049 00050 void load_from_datafile(); 00051 void load_from_file(); 00052 //These load mem with the actual font. 00053 void load_from_memory(); 00054 //This on the other hand preps the implementation and creates the fonts 00055 00056 00057 };
1.2.6 written by Dimitri van Heesch,
© 1997-2001