UGDK
src/ugdk/graphic/drawable/text.h
Go to the documentation of this file.
00001 #ifndef HORUSEYE_FRAMEWORK_TEXT_H_
00002 #define HORUSEYE_FRAMEWORK_TEXT_H_
00003 
00004 #include <vector>
00005 #include <string>
00006 #include <ugdk/math/vector2D.h>
00007 #include <ugdk/graphic/drawable.h>
00008 
00009 namespace ugdk {
00010 namespace graphic {
00011 
00012 class Font;
00013 class Text : public Drawable {
00014   public:
00015     Text(const std::wstring& message, Font* font);
00016     Text(const std::vector<std::wstring>& message, Font* font);
00017     ~Text() {}
00018 
00019     void SetMessage(const std::wstring& message);
00020     void SetMessage(const std::vector<std::wstring>& message);
00021 
00022     void Update(double dt);
00023     void Draw() const;
00024 
00025     virtual const Vector2D& size() const;
00026 
00027   private:
00028     Font* font_;
00029     std::vector<std::wstring> message_;
00030 
00031     Vector2D size_;
00032     double line_height_;
00033     std::vector<double> line_width_;
00034 };
00035 
00036 }  // namespace graphic
00037 }  // namespace ugdk
00038 
00039 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines