]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/brush.h
fix memory leak in Freeze
[wxWidgets.git] / include / wx / cocoa / brush.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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 wxBrushBase
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 virtual ~wxBrush();
35
36 // ------------------------------------------------------------------------
37 // Implementation
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) ;
43
44 // comparison
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; }
49
50 // accessors
51 wxColour GetColour() const;
52 virtual int GetStyle() const;
53 wxBitmap *GetStipple() const;
54
55 virtual bool Ok() const { return IsOk(); }
56 virtual bool IsOk() const
57 { return (m_refData != NULL); }
58
59 // wxObjectRefData
60 wxObjectRefData *CreateRefData() const;
61 wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
62
63 // wxCocoa
64 WX_NSColor GetNSColor();
65 };
66
67 #endif // __WX_COCOA_BRUSH_H__