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 color_painter : public painter_base
00023 {
00024 LOGPEN pen_;
00025 LOGBRUSH br_;
00026
00027 public:
00028 typedef LOGBRUSH param0;
00029 typedef LOGPEN param1;
00030
00031
00032 color_painter();
00033 color_painter(LOGBRUSH brush);
00034 color_painter(LOGBRUSH brush, LOGPEN pen);
00035
00036
00037 color_painter* clone() const;
00038 void draw(HDC hDC, int cx, int cy);
00039 bool is_opaque(int cx, int cy) const;
00040
00041
00042 void brush(LOGBRUSH brush);
00043 LOGBRUSH brush() const;
00044 void pen(LOGPEN pen);
00045 LOGPEN pen() const;
00046
00047 static LOGBRUSH make_brush(COLORREF cr = GetSysColor(COLOR_WINDOW), unsigned style = BS_SOLID, long hatch = 0);
00048 static LOGPEN make_pen(COLORREF cr = GetSysColor(COLOR_WINDOWTEXT), unsigned style = PS_SOLID, unsigned width = 1);
00049 };
00050
00051 } }