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