1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/region.h
3 // Purpose: wxRegion class
4 // Author: David Elliott
8 // Copyright: (c) 2004 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_COCOA_REGION_H__
13 #define _WX_COCOA_REGION_H__
15 #include "wx/generic/region.h"
17 #if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
18 typedef struct CGRect NSRect
;
20 typedef struct _NSRect NSRect
;
23 class WXDLLIMPEXP_CORE wxRegion
: public wxRegionGeneric
26 wxRegion(wxCoord x
, wxCoord y
, wxCoord w
, wxCoord h
)
27 : wxRegionGeneric(x
,y
,w
,h
)
29 wxRegion(const wxPoint
& topLeft
, const wxPoint
& bottomRight
)
30 : wxRegionGeneric(topLeft
, bottomRight
)
32 wxRegion(const wxRect
& rect
)
33 : wxRegionGeneric(rect
)
36 wxRegion(const wxBitmap
& bmp
)
39 wxRegion(const wxBitmap
& bmp
,
40 const wxColour
& transColour
, int tolerance
= 0)
42 { Union(bmp
, transColour
, tolerance
); }
43 virtual ~wxRegion() {}
44 wxRegion(const wxRegion
& r
)
47 wxRegion
& operator= (const wxRegion
& r
)
48 { return *(wxRegion
*)&(this->wxRegionGeneric::operator=(r
)); }
50 // Cocoa-specific creation
51 wxRegion(const NSRect
& rect
);
52 wxRegion(const NSRect
*rects
, int count
);
55 DECLARE_DYNAMIC_CLASS(wxRegion
);
58 class WXDLLIMPEXP_CORE wxRegionIterator
: public wxRegionIteratorGeneric
60 // DECLARE_DYNAMIC_CLASS(wxRegionIteratorGeneric);
63 wxRegionIterator(const wxRegion
& region
)
64 : wxRegionIteratorGeneric(region
)
66 wxRegionIterator(const wxRegionIterator
& iterator
)
67 : wxRegionIteratorGeneric(iterator
)
69 virtual ~wxRegionIterator() {}
71 wxRegionIterator
& operator=(const wxRegionIterator
& iter
)
72 { return *(wxRegionIterator
*)&(this->wxRegionIteratorGeneric::operator=(iter
)); }
76 //ndef _WX_COCOA_REGION_H__