UGDK  0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
text.h
Go to the documentation of this file.
1 #ifndef HORUSEYE_FRAMEWORK_TEXT_H_
2 #define HORUSEYE_FRAMEWORK_TEXT_H_
3 
4 #include <vector>
5 #include <string>
6 #include <ugdk/math/vector2D.h>
8 
9 namespace ugdk {
10 namespace graphic {
11 
12 class Font;
13 class Text : public Drawable {
14  public:
15  Text(const std::wstring& message, Font* font);
16  Text(const std::vector<std::wstring>& message, Font* font);
17  ~Text() {}
18 
19  void SetMessage(const std::wstring& message);
20  void SetMessage(const std::vector<std::wstring>& message);
21 
22  void Update(double dt);
23  void Draw() const;
24 
25  virtual const Vector2D& size() const;
26 
27  private:
28  Font* font_;
29  std::vector<std::wstring> message_;
30 
31  Vector2D size_;
32  double line_height_;
33  std::vector<double> line_width_;
34 };
35 
36 } // namespace graphic
37 } // namespace ugdk
38 
39 #endif