-IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject);
-IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject);
-
-// ============================================================================
-// implementation
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// wxRegionRefData
-// ----------------------------------------------------------------------------
-
-wxRegionRefData::wxRegionRefData()
-{
- m_region = (GdkRegion *) NULL;
-}
-
-wxRegionRefData::wxRegionRefData(const wxRegionRefData& refData)
-{
-#ifdef __WXGTK20__
- m_region = gdk_region_copy(refData.m_region);
-#else
- m_region = gdk_region_new();
- GdkRegion *regCopy = gdk_regions_union(m_region, refData.m_region);
- gdk_region_destroy(m_region);
- m_region = regCopy;
-#endif
-
- wxNode *node = refData.m_rects.First();
- while (node)
- {
- wxRect *r = (wxRect*)node->Data();
- m_rects.Append( (wxObject*) new wxRect(*r) );
- node = node->Next();
- }
-}
-
-wxRegionRefData::~wxRegionRefData()
-{
- if (m_region) gdk_region_destroy( m_region );
-
-#if OLDCODE
- wxNode *node = m_rects.First();
- while (node)
- {
- wxRect *r = (wxRect*)node->Data();
- delete r;
- node = node->Next();
- }
-#endif
-}
+IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
+IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject)