]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/brush.h
4452e29c241274cb2d34145e7940674660bf790f
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 WXDLLEXPORT wxBrush
;
21 // ----------------------------------------------------------------------------
23 // ----------------------------------------------------------------------------
25 class WXDLLEXPORT wxBrush
: public wxBrushBase
29 wxBrush(const wxColour
& col
, int style
= wxSOLID
);
30 wxBrush(const wxBitmap
& stipple
);
31 wxBrush(const wxBrush
& brush
) : wxBrushBase(brush
) { Ref(brush
); }
34 virtual void SetColour(const wxColour
& col
);
35 virtual void SetColour(const unsigned char r
, const unsigned char g
, const unsigned char b
);
36 virtual void SetStyle(int style
);
37 virtual void SetStipple(const wxBitmap
& stipple
);
39 wxBrush
& operator=(const wxBrush
& brush
);
40 bool operator==(const wxBrush
& brush
) const;
41 bool operator!=(const wxBrush
& brush
) const { return !(*this == brush
); }
43 wxColour
GetColour() const;
44 virtual int GetStyle() const;
45 wxBitmap
*GetStipple() const;
47 bool Ok() const { return m_refData
!= NULL
; }
49 // return the HBRUSH for this brush
50 virtual WXHANDLE
GetResourceHandle() const;
53 virtual wxObjectRefData
*CreateRefData() const;
54 virtual wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
57 DECLARE_DYNAMIC_CLASS(wxBrush
)