]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/region.h
made wxTLW::SetIcon() non-virtual, it was already implemented in terms of
[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
e9ec987a
DE
17typedef struct _NSRect NSRect;
18
53dbce23
DE
19class WXDLLEXPORT wxRegion : public wxRegionGeneric
20{
a24aff65 21public:
53dbce23
DE
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() {}
85f6b408
VS
32 wxRegion(const wxBitmap& bmp)
33 : wxRegionGeneric()
34 { Union(bmp); }
53dbce23 35 wxRegion(const wxBitmap& bmp,
85f6b408 36 const wxColour& transColour, int tolerance = 0)
53dbce23 37 : wxRegionGeneric()
85f6b408 38 { Union(bmp, transColour, tolerance); }
d3c7fc99 39 virtual ~wxRegion() {}
a24aff65 40 wxRegion(const wxRegion& r)
53dbce23
DE
41 : wxRegionGeneric(r)
42 {}
43 wxRegion& operator= (const wxRegion& r)
44 { return *(wxRegion*)&(this->wxRegionGeneric::operator=(r)); }
1542ea39 45
e9ec987a
DE
46 // Cocoa-specific creation
47 wxRegion(const NSRect& rect);
48 wxRegion(const NSRect *rects, int count);
49
8a16d737
VZ
50private:
51 DECLARE_DYNAMIC_CLASS(wxRegion);
a24aff65
DE
52};
53
53dbce23 54class WXDLLEXPORT wxRegionIterator : public wxRegionIteratorGeneric
a24aff65 55{
53dbce23 56// DECLARE_DYNAMIC_CLASS(wxRegionIteratorGeneric);
a24aff65 57public:
53dbce23
DE
58 wxRegionIterator() {}
59 wxRegionIterator(const wxRegion& region)
60 : wxRegionIteratorGeneric(region)
61 {}
62 wxRegionIterator(const wxRegionIterator& iterator)
63 : wxRegionIteratorGeneric(iterator)
64 {}
d3c7fc99 65 virtual ~wxRegionIterator() {}
53dbce23
DE
66
67 wxRegionIterator& operator=(const wxRegionIterator& iter)
68 { return *(wxRegionIterator*)&(this->wxRegionIteratorGeneric::operator=(iter)); }
a24aff65
DE
69};
70
1b88201f
WS
71#endif
72 //ndef _WX_COCOA_REGION_H__