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 typedef struct _NSRect NSRect
;
19 class WXDLLEXPORT wxRegion
: public wxRegionGeneric
22 wxRegion(wxCoord x
, wxCoord y
, wxCoord w
, wxCoord h
)
23 : wxRegionGeneric(x
,y
,w
,h
)
25 wxRegion(const wxPoint
& topLeft
, const wxPoint
& bottomRight
)
26 : wxRegionGeneric(topLeft
, bottomRight
)
28 wxRegion(const wxRect
& rect
)
29 : wxRegionGeneric(rect
)
32 wxRegion(const wxBitmap
& bmp
)
35 wxRegion(const wxBitmap
& bmp
,
36 const wxColour
& transColour
, int tolerance
= 0)
38 { Union(bmp
, transColour
, tolerance
); }
39 virtual ~wxRegion() {}
40 wxRegion(const wxRegion
& r
)
43 wxRegion
& operator= (const wxRegion
& r
)
44 { return *(wxRegion
*)&(this->wxRegionGeneric::operator=(r
)); }
46 // Cocoa-specific creation
47 wxRegion(const NSRect
& rect
);
48 wxRegion(const NSRect
*rects
, int count
);
51 DECLARE_DYNAMIC_CLASS(wxRegion
);
54 class WXDLLEXPORT wxRegionIterator
: public wxRegionIteratorGeneric
56 // DECLARE_DYNAMIC_CLASS(wxRegionIteratorGeneric);
59 wxRegionIterator(const wxRegion
& region
)
60 : wxRegionIteratorGeneric(region
)
62 wxRegionIterator(const wxRegionIterator
& iterator
)
63 : wxRegionIteratorGeneric(iterator
)
65 virtual ~wxRegionIterator() {}
67 wxRegionIterator
& operator=(const wxRegionIterator
& iter
)
68 { return *(wxRegionIterator
*)&(this->wxRegionIteratorGeneric::operator=(iter
)); }
71 #endif //ndef _WX_COCOA_REGION_H__