]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/region.h
Removed SetPropertiesFlag() (high-level function using 'undocumented' wxPGProperty...
[wxWidgets.git] / include / wx / cocoa / region.h
CommitLineData
a24aff65 1/////////////////////////////////////////////////////////////////////////////
53dbce23 2// Name: wx/cocoa/region.h
a24aff65 3// Purpose: wxRegion class
53dbce23 4// Author: David Elliott
1b88201f 5// Modified by:
53dbce23 6// Created: 2004/04/12
a24aff65 7// RCS-ID: $Id$
53dbce23 8// Copyright: (c) 2004 David Elliott
1b88201f 9// Licence: wxWindows licence
a24aff65
DE
10/////////////////////////////////////////////////////////////////////////////
11
53dbce23
DE
12#ifndef _WX_COCOA_REGION_H__
13#define _WX_COCOA_REGION_H__
a24aff65 14
53dbce23 15#include "wx/generic/region.h"
a24aff65 16
4799f3ba
DE
17#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
18typedef struct CGRect NSRect;
19#else
e9ec987a 20typedef struct _NSRect NSRect;
4799f3ba 21#endif
e9ec987a 22
53a2db12 23class WXDLLIMPEXP_CORE wxRegion : public wxRegionGeneric
53dbce23 24{
a24aff65 25public:
53dbce23
DE
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() {}
85f6b408
VS
36 wxRegion(const wxBitmap& bmp)
37 : wxRegionGeneric()
38 { Union(bmp); }
53dbce23 39 wxRegion(const wxBitmap& bmp,
85f6b408 40 const wxColour& transColour, int tolerance = 0)
53dbce23 41 : wxRegionGeneric()
85f6b408 42 { Union(bmp, transColour, tolerance); }
d3c7fc99 43 virtual ~wxRegion() {}
a24aff65 44 wxRegion(const wxRegion& r)
53dbce23
DE
45 : wxRegionGeneric(r)
46 {}
47 wxRegion& operator= (const wxRegion& r)
48 { return *(wxRegion*)&(this->wxRegionGeneric::operator=(r)); }
1542ea39 49
e9ec987a
DE
50 // Cocoa-specific creation
51 wxRegion(const NSRect& rect);
52 wxRegion(const NSRect *rects, int count);
53
8a16d737
VZ
54private:
55 DECLARE_DYNAMIC_CLASS(wxRegion);
a24aff65
DE
56};
57
53a2db12 58class WXDLLIMPEXP_CORE wxRegionIterator : public wxRegionIteratorGeneric
a24aff65 59{
53dbce23 60// DECLARE_DYNAMIC_CLASS(wxRegionIteratorGeneric);
a24aff65 61public:
53dbce23
DE
62 wxRegionIterator() {}
63 wxRegionIterator(const wxRegion& region)
64 : wxRegionIteratorGeneric(region)
65 {}
66 wxRegionIterator(const wxRegionIterator& iterator)
67 : wxRegionIteratorGeneric(iterator)
68 {}
d3c7fc99 69 virtual ~wxRegionIterator() {}
53dbce23
DE
70
71 wxRegionIterator& operator=(const wxRegionIterator& iter)
72 { return *(wxRegionIterator*)&(this->wxRegionIteratorGeneric::operator=(iter)); }
a24aff65
DE
73};
74
1b88201f
WS
75#endif
76 //ndef _WX_COCOA_REGION_H__