1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/brush.h
3 // Purpose: wxBrush class
4 // Author: David Elliott <dfe@cox.net>
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_BRUSH_H__
13 #define __WX_COCOA_BRUSH_H__
15 #include "wx/gdicmn.h"
16 #include "wx/gdiobj.h"
17 #include "wx/bitmap.h"
19 class WXDLLIMPEXP_FWD_CORE wxBrush
;
21 // ========================================================================
23 // ========================================================================
24 class WXDLLEXPORT wxBrush
: public wxBrushBase
26 DECLARE_DYNAMIC_CLASS(wxBrush
)
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
32 wxBrush(const wxColour
& col
, int style
= wxSOLID
);
33 wxBrush(const wxBitmap
& stipple
);
36 // ------------------------------------------------------------------------
38 // ------------------------------------------------------------------------
39 virtual void SetColour(const wxColour
& col
) ;
40 virtual void SetColour(unsigned char r
, unsigned char g
, unsigned char b
) ;
41 virtual void SetStyle(int style
) ;
42 virtual void SetStipple(const wxBitmap
& stipple
) ;
45 bool operator == (const wxBrush
& brush
) const
46 { return m_refData
== brush
.m_refData
; }
47 bool operator != (const wxBrush
& brush
) const
48 { return m_refData
!= brush
.m_refData
; }
51 wxColour
GetColour() const;
52 virtual int GetStyle() const;
53 wxBitmap
*GetStipple() const;
55 virtual bool Ok() const { return IsOk(); }
56 virtual bool IsOk() const
57 { return (m_refData
!= NULL
); }
60 wxObjectRefData
*CreateRefData() const;
61 wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
64 WX_NSColor
GetNSColor();
67 #endif // __WX_COCOA_BRUSH_H__