]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/brush.h
ccc307e1188d231e9f10edee67a2e9053d282ef7
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 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "brush.h"
19 #include "wx/gdicmn.h"
20 #include "wx/gdiobj.h"
21 #include "wx/bitmap.h"
23 class WXDLLEXPORT wxBrush
;
25 // ----------------------------------------------------------------------------
27 // ----------------------------------------------------------------------------
29 class WXDLLEXPORT wxBrush
: public wxGDIObject
33 wxBrush(const wxColour
& col
, int style
);
34 wxBrush(const wxBitmap
& stipple
);
35 wxBrush(const wxBrush
& brush
) { Ref(brush
); }
38 virtual void SetColour(const wxColour
& col
);
39 virtual void SetColour(unsigned char r
, unsigned char g
, unsigned char b
);
40 virtual void SetStyle(int style
);
41 virtual void SetStipple(const wxBitmap
& stipple
);
43 wxBrush
& operator=(const wxBrush
& brush
);
44 bool operator==(const wxBrush
& brush
) const;
45 bool operator!=(const wxBrush
& brush
) const { return !(*this == brush
); }
47 wxColour
GetColour() const;
49 wxBitmap
*GetStipple() const;
51 bool Ok() const { return m_refData
!= NULL
; }
53 // create (if necessary) and return the HBRUSH for this brush
54 WXHBRUSH
GetResourceHandle() const;
57 virtual wxObjectRefData
*CreateRefData() const;
58 virtual wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
61 DECLARE_DYNAMIC_CLASS(wxBrush
)