1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxBrush class
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "brush.h"
19 #include "wx/gdicmn.h"
20 #include "wx/gdiobj.h"
21 #include "wx/bitmap.h"
23 class WXDLLEXPORT wxBrush
;
29 kwxMacBrushThemeBackground
33 class WXDLLEXPORT wxBrush
: public wxGDIObject
35 DECLARE_DYNAMIC_CLASS(wxBrush
)
39 wxBrush(short macThemeBrush
) ;
40 wxBrush(const wxColour
& col
, int style
);
41 wxBrush(const wxBitmap
& stipple
);
42 wxBrush(const wxBrush
& brush
)
47 virtual void SetColour(const wxColour
& col
) ;
48 virtual void SetColour(unsigned char r
, unsigned char g
, unsigned char b
) ;
49 virtual void SetStyle(int style
) ;
50 virtual void SetStipple(const wxBitmap
& stipple
) ;
51 virtual void SetMacTheme(short macThemeBrush
) ;
52 virtual void SetMacThemeBackground(unsigned long macThemeBackground
, WXRECTPTR extent
) ;
54 wxBrush
& operator = (const wxBrush
& brush
)
55 { if (*this == brush
) return (*this); Ref(brush
); return *this; }
56 bool operator == (const wxBrush
& brush
)
57 { return m_refData
== brush
.m_refData
; }
58 bool operator != (const wxBrush
& brush
)
59 { return m_refData
!= brush
.m_refData
; }
61 wxMacBrushKind
MacGetBrushKind() const ;
63 unsigned long GetMacThemeBackground(WXRECTPTR extent
) const ;
64 short GetMacTheme() const ;
65 wxColour
& GetColour() const ;
66 int GetStyle() const ;
67 wxBitmap
*GetStipple() const ;
69 virtual bool Ok() const { return (m_refData
!= NULL
) ; }
73 // Useful helper: create the brush resource
74 bool RealizeResource();
76 // When setting properties, we must make sure we're not changing