]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/region.h
fixing 10.5 only compiles
[wxWidgets.git] / include / wx / generic / region.h
CommitLineData
4c3c3844
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/generic/region.h
3// Purpose: generic wxRegion class
4// Author: David Elliott
5// Modified by:
6// Created: 2004/04/12
7// RCS-ID: $Id$
8// Copyright: (c) 2004 David Elliott
ca65c044 9// Licence: wxWindows licence
4c3c3844
DE
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_GENERIC_REGION_H__
13#define _WX_GENERIC_REGION_H__
14
8a16d737 15class WXDLLEXPORT wxRegionGeneric : public wxRegionBase
4c3c3844 16{
4c3c3844
DE
17public:
18 wxRegionGeneric(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
19 wxRegionGeneric(const wxPoint& topLeft, const wxPoint& bottomRight);
20 wxRegionGeneric(const wxRect& rect);
21 wxRegionGeneric();
d3c7fc99 22 virtual ~wxRegionGeneric();
4c3c3844 23
8a16d737
VZ
24 // wxRegionBase pure virtuals
25 virtual void Clear();
26 virtual bool IsEmpty() const;
9a6384ca 27
4c3c3844
DE
28protected:
29 virtual wxObjectRefData *CreateRefData() const;
30 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
8a16d737
VZ
31
32 // wxRegionBase pure virtuals
33 virtual bool DoIsEqual(const wxRegion& region) const;
34 virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const;
35 virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const;
36 virtual wxRegionContain DoContainsRect(const wxRect& rect) const;
37
38 virtual bool DoOffset(wxCoord x, wxCoord y);
39 virtual bool DoUnionWithRect(const wxRect& rect);
40 virtual bool DoUnionWithRegion(const wxRegion& region);
41 virtual bool DoIntersect(const wxRegion& region);
42 virtual bool DoSubtract(const wxRegion& region);
43 virtual bool DoXor(const wxRegion& region);
44
b5dbe15d 45 friend class WXDLLIMPEXP_FWD_CORE wxRegionIteratorGeneric;
4c3c3844
DE
46};
47
48class WXDLLEXPORT wxRegionIteratorGeneric : public wxObject
49{
4c3c3844
DE
50public:
51 wxRegionIteratorGeneric();
52 wxRegionIteratorGeneric(const wxRegionGeneric& region);
53 wxRegionIteratorGeneric(const wxRegionIteratorGeneric& iterator);
d3c7fc99 54 virtual ~wxRegionIteratorGeneric();
4c3c3844
DE
55
56 wxRegionIteratorGeneric& operator=(const wxRegionIteratorGeneric& iterator);
57
58 void Reset() { m_current = 0; }
59 void Reset(const wxRegionGeneric& region);
60
61 operator bool () const { return HaveRects(); }
62 bool HaveRects() const;
63
64 wxRegionIteratorGeneric& operator++();
65 wxRegionIteratorGeneric operator++(int);
66
67 long GetX() const;
68 long GetY() const;
69 long GetW() const;
70 long GetWidth() const { return GetW(); }
71 long GetH() const;
72 long GetHeight() const { return GetH(); }
73 wxRect GetRect() const;
74private:
75 long m_current;
76 wxRegionGeneric m_region;
77};
78
8a16d737 79#endif // _WX_GENERIC_REGION_H__