X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..625cb8c0b1ac12f26265cae2c69d7f510de0edb1:/src/gtk1/region.cpp?ds=inline diff --git a/src/gtk1/region.cpp b/src/gtk1/region.cpp index 2c4be00d6d..2c31667721 100644 --- a/src/gtk1/region.cpp +++ b/src/gtk1/region.cpp @@ -87,6 +87,7 @@ wxRegionRefData::wxRegionRefData(const wxRegionRefData& refData) m_region = regCopy; #endif +#if OLDCODE wxNode *node = refData.m_rects.First(); while (node) { @@ -94,6 +95,7 @@ wxRegionRefData::wxRegionRefData(const wxRegionRefData& refData) m_rects.Append( (wxObject*) new wxRect(*r) ); node = node->Next(); } +#endif } wxRegionRefData::~wxRegionRefData() @@ -117,8 +119,6 @@ wxRegionRefData::~wxRegionRefData() #define M_REGIONDATA ((wxRegionRefData *)m_refData) -IMPLEMENT_DYNAMIC_CLASS(wxRegion,wxGDIObject); - wxRegion::wxRegion() { } @@ -351,6 +351,7 @@ bool wxRegion::Intersect( const wxRegion& region ) } // we need to update the rect list as well +#if OLDCODE wxList& list = *GetRectList(); wxNode *node = list.First(); while (node) @@ -372,7 +373,7 @@ bool wxRegion::Intersect( const wxRegion& region ) node = node->Next(); } - +#endif return TRUE; } @@ -566,8 +567,6 @@ wxList *wxRegion::GetRectList() const #if OLDCODE -IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject); - wxRegionIterator::wxRegionIterator() { Reset(); @@ -701,8 +700,6 @@ void wxRIRefData::CreateRects( const wxRegion& region ) } } -IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject); - wxRegionIterator::wxRegionIterator() { m_refData = new wxRIRefData(); @@ -769,10 +766,8 @@ wxCoord wxRegionIterator::GetH() const wxRect wxRegionIterator::GetRect() const { wxRect r; - wxNode *node = m_region.GetRectList()->Nth( m_current ); - - if (node) - r = *((wxRect*)node->Data()); + if( HaveRects() ) + r = ((wxRIRefData*)m_refData)->m_rects[m_current]; return r; }