1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/classic/brush.h
3 // Purpose: wxBrush class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/gdicmn.h"
16 #include "wx/gdiobj.h"
17 #include "wx/bitmap.h"
19 class WXDLLEXPORT wxBrush
;
25 kwxMacBrushThemeBackground
29 class WXDLLEXPORT wxBrush
: public wxBrushBase
31 DECLARE_DYNAMIC_CLASS(wxBrush
)
35 wxBrush(short macThemeBrush
) ;
36 wxBrush(const wxColour
& col
, int style
= wxSOLID
);
37 wxBrush(const wxBitmap
& stipple
);
38 wxBrush(const wxBrush
& brush
)
43 virtual void SetColour(const wxColour
& col
) ;
44 virtual void SetColour(unsigned char r
, unsigned char g
, unsigned char b
) ;
45 virtual void SetStyle(int style
) ;
46 virtual void SetStipple(const wxBitmap
& stipple
) ;
47 virtual void SetMacTheme(short macThemeBrush
) ;
48 virtual void SetMacThemeBackground(unsigned long macThemeBackground
, WXRECTPTR extent
) ;
50 wxBrush
& operator = (const wxBrush
& brush
)
51 { if (*this == brush
) return (*this); Ref(brush
); return *this; }
52 bool operator == (const wxBrush
& brush
) const
53 { return m_refData
== brush
.m_refData
; }
54 bool operator != (const wxBrush
& brush
) const
55 { return m_refData
!= brush
.m_refData
; }
57 wxMacBrushKind
MacGetBrushKind() const ;
59 unsigned long GetMacThemeBackground(WXRECTPTR extent
) const ;
60 short GetMacTheme() const ;
61 wxColour
& GetColour() const ;
62 virtual int GetStyle() const ;
63 wxBitmap
*GetStipple() const ;
65 virtual bool Ok() const { return (m_refData
!= NULL
) ; }
69 // Useful helper: create the brush resource
70 bool RealizeResource();
72 // When setting properties, we must make sure we're not changing