X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac7d3dd1578d298a301638b7ef862f1e308321d0..c2d4ceaf57203bb8ed83f899fdd851f29832bd06:/src/gtk/region.cpp diff --git a/src/gtk/region.cpp b/src/gtk/region.cpp index 33ee658dbd..669dc09424 100644 --- a/src/gtk/region.cpp +++ b/src/gtk/region.cpp @@ -32,7 +32,7 @@ // wxRegionRefData: private class containing the information about the region // ---------------------------------------------------------------------------- -class wxRegionRefData : public wxObjectRefData +class wxRegionRefData : public wxGDIRefData { public: wxRegionRefData() @@ -41,7 +41,7 @@ public: } wxRegionRefData(const wxRegionRefData& refData) - : wxObjectRefData() + : wxGDIRefData() { m_region = gdk_region_copy(refData.m_region); } @@ -90,7 +90,8 @@ wxRegion::wxRegion( GdkRegion *region ) M_REGIONDATA->m_region = gdk_region_copy( region ); } -wxRegion::wxRegion( size_t n, const wxPoint *points, int fillStyle ) +wxRegion::wxRegion( size_t n, const wxPoint *points, + wxPolygonFillMode fillStyle ) { GdkPoint *gdkpoints = new GdkPoint[n]; for ( size_t i = 0 ; i < n ; i++ ) @@ -119,12 +120,12 @@ wxRegion::~wxRegion() // m_refData unrefed in ~wxObject } -wxObjectRefData *wxRegion::CreateRefData() const +wxGDIRefData *wxRegion::CreateGDIRefData() const { return new wxRegionRefData; } -wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const +wxGDIRefData *wxRegion::CloneGDIRefData(const wxGDIRefData *data) const { return new wxRegionRefData(*(wxRegionRefData *)data); } @@ -178,7 +179,7 @@ bool wxRegion::DoUnionWithRect(const wxRect& r) bool wxRegion::DoUnionWithRegion( const wxRegion& region ) { - wxCHECK_MSG( region.Ok(), false, _T("invalid region") ); + wxCHECK_MSG( region.IsOk(), false, wxT("invalid region") ); if (!m_refData) { @@ -197,7 +198,7 @@ bool wxRegion::DoUnionWithRegion( const wxRegion& region ) bool wxRegion::DoIntersect( const wxRegion& region ) { - wxCHECK_MSG( region.Ok(), false, _T("invalid region") ); + wxCHECK_MSG( region.IsOk(), false, wxT("invalid region") ); if (!m_refData) { @@ -214,7 +215,7 @@ bool wxRegion::DoIntersect( const wxRegion& region ) bool wxRegion::DoSubtract( const wxRegion& region ) { - wxCHECK_MSG( region.Ok(), false, _T("invalid region") ); + wxCHECK_MSG( region.IsOk(), false, wxT("invalid region") ); if (!m_refData) { @@ -231,7 +232,7 @@ bool wxRegion::DoSubtract( const wxRegion& region ) bool wxRegion::DoXor( const wxRegion& region ) { - wxCHECK_MSG( region.Ok(), false, _T("invalid region") ); + wxCHECK_MSG( region.IsOk(), false, wxT("invalid region") ); if (!m_refData) { @@ -327,7 +328,7 @@ wxRegionContain wxRegion::DoContainsRect(const wxRect& r) const GdkRegion *wxRegion::GetRegion() const { if (!m_refData) - return (GdkRegion*) NULL; + return NULL; return M_REGIONDATA->m_region; } @@ -421,28 +422,28 @@ wxRegionIterator wxRegionIterator::operator ++ (int) wxCoord wxRegionIterator::GetX() const { - wxCHECK_MSG( HaveRects(), 0, _T("invalid wxRegionIterator") ); + wxCHECK_MSG( HaveRects(), 0, wxT("invalid wxRegionIterator") ); return m_rects[m_current].x; } wxCoord wxRegionIterator::GetY() const { - wxCHECK_MSG( HaveRects(), 0, _T("invalid wxRegionIterator") ); + wxCHECK_MSG( HaveRects(), 0, wxT("invalid wxRegionIterator") ); return m_rects[m_current].y; } wxCoord wxRegionIterator::GetW() const { - wxCHECK_MSG( HaveRects(), 0, _T("invalid wxRegionIterator") ); + wxCHECK_MSG( HaveRects(), 0, wxT("invalid wxRegionIterator") ); return m_rects[m_current].width; } wxCoord wxRegionIterator::GetH() const { - wxCHECK_MSG( HaveRects(), 0, _T("invalid wxRegionIterator") ); + wxCHECK_MSG( HaveRects(), 0, wxT("invalid wxRegionIterator") ); return m_rects[m_current].height; } @@ -465,7 +466,7 @@ wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri) if ( m_numRects ) { m_rects = new wxRect[m_numRects]; - for ( long n = 0; n < m_numRects; n++ ) + for ( unsigned int n = 0; n < m_numRects; n++ ) m_rects[n] = ri.m_rects[n]; } else