]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/region.h
Add wxDEPRECATED_MSG() and use it in a couple of places.
[wxWidgets.git] / include / wx / cocoa / region.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/region.h
3 // Purpose: wxRegion class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2004/04/12
7 // Copyright: (c) 2004 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_COCOA_REGION_H__
12 #define _WX_COCOA_REGION_H__
13
14 #include "wx/generic/region.h"
15
16 #if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
17 typedef struct CGRect NSRect;
18 #else
19 typedef struct _NSRect NSRect;
20 #endif
21
22 class WXDLLIMPEXP_CORE wxRegion : public wxRegionGeneric
23 {
24 public:
25 wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
26 : wxRegionGeneric(x,y,w,h)
27 {}
28 wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight)
29 : wxRegionGeneric(topLeft, bottomRight)
30 {}
31 wxRegion(const wxRect& rect)
32 : wxRegionGeneric(rect)
33 {}
34 wxRegion() {}
35 wxRegion(const wxBitmap& bmp)
36 : wxRegionGeneric()
37 { Union(bmp); }
38 wxRegion(const wxBitmap& bmp,
39 const wxColour& transColour, int tolerance = 0)
40 : wxRegionGeneric()
41 { Union(bmp, transColour, tolerance); }
42 virtual ~wxRegion() {}
43 wxRegion(const wxRegion& r)
44 : wxRegionGeneric(r)
45 {}
46 wxRegion& operator= (const wxRegion& r)
47 { return *(wxRegion*)&(this->wxRegionGeneric::operator=(r)); }
48
49 // Cocoa-specific creation
50 wxRegion(const NSRect& rect);
51 wxRegion(const NSRect *rects, int count);
52
53 private:
54 DECLARE_DYNAMIC_CLASS(wxRegion);
55 };
56
57 class WXDLLIMPEXP_CORE wxRegionIterator : public wxRegionIteratorGeneric
58 {
59 // DECLARE_DYNAMIC_CLASS(wxRegionIteratorGeneric);
60 public:
61 wxRegionIterator() {}
62 wxRegionIterator(const wxRegion& region)
63 : wxRegionIteratorGeneric(region)
64 {}
65 wxRegionIterator(const wxRegionIterator& iterator)
66 : wxRegionIteratorGeneric(iterator)
67 {}
68 virtual ~wxRegionIterator() {}
69
70 wxRegionIterator& operator=(const wxRegionIterator& iter)
71 { return *(wxRegionIterator*)&(this->wxRegionIteratorGeneric::operator=(iter)); }
72 };
73
74 #endif
75 //ndef _WX_COCOA_REGION_H__