00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #pragma once
00016 #include <background_wnd/detail/include.hpp>
00017 #include <background_wnd/painter_base.hpp>
00018
00019
00020 namespace win32 { namespace gui {
00021
00022 class text_painter : public painter_base
00023 {
00024 public:
00025
00026 struct font_info;
00027
00028 typedef const std::string& param0;
00029 typedef const font_info& param1;
00030
00031
00032 text_painter(const std::string& str, const font_info& info);
00033
00034
00035 text_painter* clone() const;
00036 void draw(HDC hDC, int cx, int cy);
00037
00038
00039 void text(const std::string& str);
00040 std::string text() const;
00041 void info(const font_info& info);
00042 font_info info() const;
00043 void draw_text_options(unsigned flags);
00044 unsigned draw_text_options() const;
00045 int last_used_text_height() const;
00046
00047 struct font_info
00048 {
00049 font_info(LOGFONT lf, int min_font_height, int max_font_height, COLORREF cr = RGB(0, 0, 0));
00050
00051 LOGFONT lf_;
00052 int min_font_height_;
00053 int max_font_height_;
00054 COLORREF cr_;
00055 };
00056
00057 private:
00058 font_info info_;
00059 std::string str_;
00060 unsigned draw_text_options_;
00061 };
00062
00063 } }