]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/region.h
wxGraphicContext --> wxGraphicsContext
[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 typedef struct _NSRect NSRect;
18
19 class WXDLLEXPORT wxRegion : public wxRegionGeneric
20 {
21 public:
22 wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
23 : wxRegionGeneric(x,y,w,h)
24 {}
25 wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight)
26 : wxRegionGeneric(topLeft, bottomRight)
27 {}
28 wxRegion(const wxRect& rect)
29 : wxRegionGeneric(rect)
30 {}
31 wxRegion() {}
32 wxRegion(const wxBitmap& bmp)
33 : wxRegionGeneric()
34 { Union(bmp); }
35 wxRegion(const wxBitmap& bmp,
36 const wxColour& transColour, int tolerance = 0)
37 : wxRegionGeneric()
38 { Union(bmp, transColour, tolerance); }
39 virtual ~wxRegion() {}
40 wxRegion(const wxRegion& r)
41 : wxRegionGeneric(r)
42 {}
43 wxRegion& operator= (const wxRegion& r)
44 { return *(wxRegion*)&(this->wxRegionGeneric::operator=(r)); }
45
46 // Cocoa-specific creation
47 wxRegion(const NSRect& rect);
48 wxRegion(const NSRect *rects, int count);
49
50 private:
51 DECLARE_DYNAMIC_CLASS(wxRegion);
52 };
53
54 class WXDLLEXPORT wxRegionIterator : public wxRegionIteratorGeneric
55 {
56 // DECLARE_DYNAMIC_CLASS(wxRegionIteratorGeneric);
57 public:
58 wxRegionIterator() {}
59 wxRegionIterator(const wxRegion& region)
60 : wxRegionIteratorGeneric(region)
61 {}
62 wxRegionIterator(const wxRegionIterator& iterator)
63 : wxRegionIteratorGeneric(iterator)
64 {}
65 virtual ~wxRegionIterator() {}
66
67 wxRegionIterator& operator=(const wxRegionIterator& iter)
68 { return *(wxRegionIterator*)&(this->wxRegionIteratorGeneric::operator=(iter)); }
69 };
70
71 #endif
72 //ndef _WX_COCOA_REGION_H__