1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/brush.h
3 // Purpose: wxBrush class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/gdicmn.h"
16 #include "wx/gdiobj.h"
17 #include "wx/bitmap.h"
19 class WXDLLIMPEXP_FWD_CORE wxBrush
;
21 // ----------------------------------------------------------------------------
23 // ----------------------------------------------------------------------------
25 class WXDLLEXPORT wxBrush
: public wxBrushBase
29 wxBrush(const wxColour
& col
, int style
= wxSOLID
);
30 wxBrush(const wxBitmap
& stipple
);
33 virtual void SetColour(const wxColour
& col
);
34 virtual void SetColour(unsigned char r
, unsigned char g
, unsigned char b
);
35 virtual void SetStyle(int style
);
36 virtual void SetStipple(const wxBitmap
& stipple
);
38 bool operator==(const wxBrush
& brush
) const;
39 bool operator!=(const wxBrush
& brush
) const { return !(*this == brush
); }
41 wxColour
GetColour() const;
42 virtual int GetStyle() const;
43 wxBitmap
*GetStipple() const;
45 bool Ok() const { return IsOk(); }
46 bool IsOk() const { return m_refData
!= NULL
; }
48 // return the HBRUSH for this brush
49 virtual WXHANDLE
GetResourceHandle() const;
52 virtual wxObjectRefData
*CreateRefData() const;
53 virtual wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
56 DECLARE_DYNAMIC_CLASS(wxBrush
)