1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/x11/brush.h
3 // Purpose: wxBrush class
4 // Author: Julian Smart, Robert Roebling
8 // Copyright: (c) Julian Smart, Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/gdiobj.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 class WXDLLIMPEXP_CORE wxBrush
;
22 class WXDLLIMPEXP_CORE wxColour
;
23 class WXDLLIMPEXP_CORE wxBitmap
;
25 //-----------------------------------------------------------------------------
27 //-----------------------------------------------------------------------------
29 class WXDLLIMPEXP_CORE wxBrush
: public wxBrushBase
34 wxBrush( const wxColour
&colour
, int style
= wxSOLID
);
35 wxBrush( const wxBitmap
&stippleBitmap
);
38 bool Ok() const { return m_refData
!= NULL
; }
40 bool operator == ( const wxBrush
& brush
) const;
41 bool operator != (const wxBrush
& brush
) const { return !(*this == brush
); }
43 virtual int GetStyle() const;
44 wxColour
&GetColour() const;
45 wxBitmap
*GetStipple() const;
47 void SetColour( const wxColour
& col
);
48 void SetColour( unsigned char r
, unsigned char g
, unsigned char b
);
49 void SetStyle( int style
);
50 void SetStipple( const wxBitmap
& stipple
);
54 virtual wxObjectRefData
*CreateRefData() const;
55 virtual wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
57 DECLARE_DYNAMIC_CLASS(wxBrush
)