]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/brush.h
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 WXDLLEXPORT 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
);
34 wxBrush(const wxBrush
& brush
)
39 // ------------------------------------------------------------------------
41 // ------------------------------------------------------------------------
42 virtual void SetColour(const wxColour
& col
) ;
43 virtual void SetColour(const unsigned char r
, const unsigned char g
, const unsigned char b
) ;
44 virtual void SetStyle(int style
) ;
45 virtual void SetStipple(const wxBitmap
& stipple
) ;
48 wxBrush
& operator = (const wxBrush
& brush
)
49 { 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
; }
58 wxColour
GetColour() const;
59 virtual int GetStyle() const;
60 wxBitmap
*GetStipple() const;
62 virtual bool Ok() const
63 { return (m_refData
!= NULL
); }
66 wxObjectRefData
*CreateRefData() const;
67 wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
70 WX_NSColor
GetNSColor();
73 #endif // __WX_COCOA_BRUSH_H__