]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/brush.h
fix shared msw builds
[wxWidgets.git] / include / wx / cocoa / brush.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: include/wx/cocoa/brush.h
3 // Purpose: wxBrush class
4 // Author: David Elliott <dfe@cox.net>
5 // Modified by:
6 // Created: 2003/07/03
7 // RCS-ID: $Id$
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __WX_COCOA_BRUSH_H__
13 #define __WX_COCOA_BRUSH_H__
14
15 #include "wx/gdicmn.h"
16 #include "wx/gdiobj.h"
17 #include "wx/bitmap.h"
18
19 class WXDLLEXPORT wxBrush;
20
21 // ========================================================================
22 // wxBrush
23 // ========================================================================
24 class WXDLLEXPORT wxBrush: public wxGDIObject
25 {
26 DECLARE_DYNAMIC_CLASS(wxBrush)
27 // ------------------------------------------------------------------------
28 // initialization
29 // ------------------------------------------------------------------------
30 public:
31 wxBrush();
32 wxBrush(const wxColour& col, int style = wxSOLID);
33 wxBrush(const wxBitmap& stipple);
34 wxBrush(const wxBrush& brush)
35 : wxGDIObject()
36 { Ref(brush); }
37 ~wxBrush();
38
39 // ------------------------------------------------------------------------
40 // Implementation
41 // ------------------------------------------------------------------------
42 virtual void SetColour(const wxColour& col) ;
43 virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
44 virtual void SetStyle(int style) ;
45 virtual void SetStipple(const wxBitmap& stipple) ;
46
47 // assignment
48 wxBrush& operator = (const wxBrush& brush)
49 { if (*this == brush) return (*this); Ref(brush); return *this; }
50
51 // comparison
52 bool operator == (const wxBrush& brush)
53 { return m_refData == brush.m_refData; }
54 bool operator != (const wxBrush& brush)
55 { return m_refData != brush.m_refData; }
56
57 // accessors
58 wxColour GetColour() const;
59 int GetStyle() const;
60 wxBitmap *GetStipple() const;
61
62 bool IsHatch() const
63 { return (GetStyle()>=wxBDIAGONAL_HATCH) && (GetStyle()<=wxVERTICAL_HATCH); }
64
65 virtual bool Ok() const
66 { return (m_refData != NULL); }
67
68 // wxObjectRefData
69 wxObjectRefData *CreateRefData() const;
70 wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
71
72 // wxCocoa
73 WX_NSColor GetNSColor();
74 };
75
76 #endif // __WX_COCOA_BRUSH_H__