X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..6d693bb4fc299b7375dd4da9d878768d80ceaf55:/include/wx/msw/region.h diff --git a/include/wx/msw/region.h b/include/wx/msw/region.h index c660a62f72..4349debda6 100644 --- a/include/wx/msw/region.h +++ b/include/wx/msw/region.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __REGIONH__ -#define __REGIONH__ +#ifndef _WX_REGION_H_ +#define _WX_REGION_H_ #ifdef __GNUG__ #pragma interface "region.h" @@ -18,6 +18,7 @@ #include "wx/list.h" #include "wx/gdiobj.h" +#include "wx/gdicmn.h" class WXDLLEXPORT wxRect; class WXDLLEXPORT wxPoint; @@ -42,6 +43,7 @@ public: wxRegion(long x, long y, long w, long h); wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); wxRegion(const wxRect& rect); + wxRegion(WXHRGN hRegion); // Hangs on to this region wxRegion(void); ~wxRegion(void); @@ -100,6 +102,9 @@ public: bool Combine(long x, long y, long width, long height, wxRegionOp op); bool Combine(const wxRegion& region, wxRegionOp op); bool Combine(const wxRect& rect, wxRegionOp op); + + // Get internal region handle + WXHRGN GetHRGN() const; }; class WXDLLEXPORT wxRegionIterator : public wxObject { @@ -112,8 +117,11 @@ public: void Reset(void) { m_current = 0; } void Reset(const wxRegion& region); - operator bool (void) const { return m_current < m_numRects; } - bool HaveRects(void) const { return m_current < m_numRects; } +#ifndef __SALFORDC__ + operator bool (void) const { return (m_current < m_numRects); } +#endif + + bool HaveRects(void) const { return (m_current < m_numRects); } void operator ++ (void); void operator ++ (int); @@ -124,6 +132,7 @@ public: long GetWidth(void) const { return GetW(); } long GetH(void) const; long GetHeight(void) const { return GetH(); } + wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); } private: long m_current; @@ -133,4 +142,4 @@ private: }; #endif - // __REGIONH__ + // _WX_REGION_H_