1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/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
);
40 virtual void SetColour(const wxColour
& col
) ;
41 virtual void SetColour(unsigned char r
, unsigned char g
, unsigned char b
) ;
42 virtual void SetStyle(int style
) ;
43 virtual void SetStipple(const wxBitmap
& stipple
) ;
44 virtual void MacSetTheme(short macThemeBrush
) ;
45 virtual void MacSetThemeBackground(unsigned long macThemeBackground
, WXRECTPTR extent
) ;
47 bool operator == (const wxBrush
& brush
) const;
48 bool operator != (const wxBrush
& brush
) const
49 { return !(*this == brush
); }
51 wxMacBrushKind
MacGetBrushKind() const ;
53 unsigned long MacGetThemeBackground(WXRECTPTR extent
) const ;
54 short MacGetTheme() const ;
55 wxColour
& GetColour() const ;
56 virtual int GetStyle() const ;
57 wxBitmap
*GetStipple() const ;
59 virtual bool Ok() const { return IsOk(); }
60 virtual bool IsOk() const { return (m_refData
!= NULL
) ; }
64 // Useful helper: create the brush resource
65 bool RealizeResource();
68 virtual wxObjectRefData
* CreateRefData() const;
69 virtual wxObjectRefData
* CloneRefData(const wxObjectRefData
* data
) const;