00001 00002 /* Copyright 2009 Diego Barrios Romero 00003 * 00004 * This file is part of DSMemorizer. 00005 * 00006 * DSMemorizer is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * DSMemorizer distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with DSMemorizer. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 #ifndef TEXTBOXHANDLER_H_ 00021 #define TEXTBOXHANDLER_H_ 00022 00023 #include <ft2build.h> 00024 #include FT_FREETYPE_H 00025 #include <vector> 00026 #include "types.h" 00027 00029 class TextBoxHandler 00030 { 00031 public: 00033 TextBoxHandler() {} 00035 void Init(); 00036 00048 TextBox* NewTextBox (Types::Screen::selector screen, 00049 int bgid, Types::Font font, int size, int x, int y, 00050 int width = 0, int height = 0); 00051 00053 void DestroyTextBox (TextBox* tb); 00055 void PrintTextBox (TextBox* tb); 00057 void PrintAll (Types::Screen::selector); 00059 ~TextBoxHandler(); 00060 00061 private: 00063 FT_Library library_; 00064 00066 Types::Font font_; 00068 std::vector< FT_Face > faces_; 00070 std::vector< TextBox* > text_boxes_; 00071 }; 00072 00073 #endif // TEXTBOXHANDLER_H_ 00074 00075
1.5.8