1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/region.h
3 // Purpose: wxRegion class
4 // Author: David Elliott
7 // Copyright: (c) 2004 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_COCOA_REGION_H__
12 #define _WX_COCOA_REGION_H__
14 #include "wx/generic/region.h"
16 #if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
17 typedef struct CGRect NSRect
;
19 typedef struct _NSRect NSRect
;
22 class WXDLLIMPEXP_CORE wxRegion
: public wxRegionGeneric
25 wxRegion(wxCoord x
, wxCoord y
, wxCoord w
, wxCoord h
)
26 : wxRegionGeneric(x
,y
,w
,h
)
28 wxRegion(const wxPoint
& topLeft
, const wxPoint
& bottomRight
)
29 : wxRegionGeneric(topLeft
, bottomRight
)
31 wxRegion(const wxRect
& rect
)
32 : wxRegionGeneric(rect
)
35 wxRegion(const wxBitmap
& bmp
)
38 wxRegion(const wxBitmap
& bmp
,
39 const wxColour
& transColour
, int tolerance
= 0)
41 { Union(bmp
, transColour
, tolerance
); }
42 virtual ~wxRegion() {}
43 wxRegion(const wxRegion
& r
)
46 wxRegion
& operator= (const wxRegion
& r
)
47 { return *(wxRegion
*)&(this->wxRegionGeneric::operator=(r
)); }
49 // Cocoa-specific creation
50 wxRegion(const NSRect
& rect
);
51 wxRegion(const NSRect
*rects
, int count
);
54 DECLARE_DYNAMIC_CLASS(wxRegion
);
57 class WXDLLIMPEXP_CORE wxRegionIterator
: public wxRegionIteratorGeneric
59 // DECLARE_DYNAMIC_CLASS(wxRegionIteratorGeneric);
62 wxRegionIterator(const wxRegion
& region
)
63 : wxRegionIteratorGeneric(region
)
65 wxRegionIterator(const wxRegionIterator
& iterator
)
66 : wxRegionIteratorGeneric(iterator
)
68 virtual ~wxRegionIterator() {}
70 wxRegionIterator
& operator=(const wxRegionIterator
& iter
)
71 { return *(wxRegionIterator
*)&(this->wxRegionIteratorGeneric::operator=(iter
)); }
75 //ndef _WX_COCOA_REGION_H__