]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/region.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[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
53dbce23 7// Copyright: (c) 2004 David Elliott
1b88201f 8// Licence: wxWindows licence
a24aff65
DE
9/////////////////////////////////////////////////////////////////////////////
10
53dbce23
DE
11#ifndef _WX_COCOA_REGION_H__
12#define _WX_COCOA_REGION_H__
a24aff65 13
53dbce23 14#include "wx/generic/region.h"
a24aff65 15
4799f3ba
DE
16#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
17typedef struct CGRect NSRect;
18#else
e9ec987a 19typedef struct _NSRect NSRect;
4799f3ba 20#endif
e9ec987a 21
53a2db12 22class WXDLLIMPEXP_CORE wxRegion : public wxRegionGeneric
53dbce23 23{
a24aff65 24public:
53dbce23
DE
25 wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
26 : wxRegionGeneric(x,y,w,h)
27 {}
28 wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight)
29 : wxRegionGeneric(topLeft, bottomRight)
30 {}
31 wxRegion(const wxRect& rect)
32 : wxRegionGeneric(rect)
33 {}
34 wxRegion() {}
85f6b408
VS
35 wxRegion(const wxBitmap& bmp)
36 : wxRegionGeneric()
37 { Union(bmp); }
53dbce23 38 wxRegion(const wxBitmap& bmp,
85f6b408 39 const wxColour& transColour, int tolerance = 0)
53dbce23 40 : wxRegionGeneric()
85f6b408 41 { Union(bmp, transColour, tolerance); }
d3c7fc99 42 virtual ~wxRegion() {}
a24aff65 43 wxRegion(const wxRegion& r)
53dbce23
DE
44 : wxRegionGeneric(r)
45 {}
46 wxRegion& operator= (const wxRegion& r)
47 { return *(wxRegion*)&(this->wxRegionGeneric::operator=(r)); }
1542ea39 48
e9ec987a
DE
49 // Cocoa-specific creation
50 wxRegion(const NSRect& rect);
51 wxRegion(const NSRect *rects, int count);
52
8a16d737
VZ
53private:
54 DECLARE_DYNAMIC_CLASS(wxRegion);
a24aff65
DE
55};
56
53a2db12 57class WXDLLIMPEXP_CORE wxRegionIterator : public wxRegionIteratorGeneric
a24aff65 58{
53dbce23 59// DECLARE_DYNAMIC_CLASS(wxRegionIteratorGeneric);
a24aff65 60public:
53dbce23
DE
61 wxRegionIterator() {}
62 wxRegionIterator(const wxRegion& region)
63 : wxRegionIteratorGeneric(region)
64 {}
65 wxRegionIterator(const wxRegionIterator& iterator)
66 : wxRegionIteratorGeneric(iterator)
67 {}
d3c7fc99 68 virtual ~wxRegionIterator() {}
53dbce23
DE
69
70 wxRegionIterator& operator=(const wxRegionIterator& iter)
71 { return *(wxRegionIterator*)&(this->wxRegionIteratorGeneric::operator=(iter)); }
a24aff65
DE
72};
73
1b88201f
WS
74#endif
75 //ndef _WX_COCOA_REGION_H__