00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef TEXTBOX_H_
00021 #define TEXTBOX_H_
00022
00023 #include <string>
00024 #include <ft2build.h>
00025 #include FT_FREETYPE_H
00026
00027 #include "types.h"
00028
00030 class TextBox
00031 {
00032 public:
00034 TextBox() {}
00045 void Init (Types::Screen::selector screen,
00046 int bgid, FT_Face face, int size,
00047 int x, int y, int width = 0, int height = 0);
00048
00050 int size () const;
00052 int x () const;
00054 int y () const;
00056 int width () const;
00058 int height () const;
00060 bool floats () const;
00062 bool independent () const;
00064 bool visible () const;
00066 std::string text () const;
00068 Types::Screen::selector screen () const;
00070 int bgid () const;
00071
00073 void SetProperties (int x, int y, int width, int height);
00075 void text (const std::string& str, bool convert_to_romaji = false);
00077 void floats (bool f);
00079 void independent (bool i);
00081 void visible (bool v);
00082
00084 void Move (int x, int y);
00086 void Adjust (int y);
00088 void Print ();
00089
00090 private:
00092 FT_Face face_;
00094 std::string text_;
00095 int size_,
00096 x_,
00097 y_,
00098 width_,
00099 height_;
00100 bool mutable_height_,
00101 floats_,
00102
00103
00104 independent_,
00105
00106
00107
00108 visible_;
00109
00110
00111
00112
00113 Types::Screen::selector screen_;
00114 int bgid_;
00115
00116 std::string ConvertToRomaji (std::string str);
00117 };
00118
00119 #endif // TEXTBOX_H_