]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/brush.h
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
;
26 class WXDLLEXPORT wxBrush
: public wxGDIObject
28 DECLARE_DYNAMIC_CLASS(wxBrush
)
32 wxBrush(const wxColour
& col
, int style
);
33 wxBrush(const wxBitmap
& stipple
);
34 wxBrush(const wxBrush
& brush
)
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
) ;
44 wxBrush
& operator = (const wxBrush
& brush
)
45 { if (*this == brush
) return (*this); Ref(brush
); return *this; }
46 bool operator == (const wxBrush
& brush
)
47 { return m_refData
== brush
.m_refData
; }
48 bool operator != (const wxBrush
& brush
)
49 { return m_refData
!= brush
.m_refData
; }
51 wxColour
& GetColour() const ;
52 int GetStyle() const ;
53 wxBitmap
*GetStipple() const ;
55 virtual bool Ok() const { return (m_refData
!= NULL
) ; }
59 // Useful helper: create the brush resource
60 bool RealizeResource();
62 // When setting properties, we must make sure we're not changing