+ return Contains( pt.x, pt.y );
+}
+
+wxRegionContain wxRegion::Contains(const wxRect& rect) const
+{
+ return Contains( rect.x, rect.y, rect.width, rect.height );
+}
+
+GdkRegion *wxRegion::GetRegion() const
+{
+ return M_REGIONDATA->m_region;
+}
+
+wxList *wxRegion::GetRectList() const
+{
+ return &(M_REGIONDATA->m_rects);
+}
+
+//-----------------------------------------------------------------------------
+// wxRegion
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject);
+
+wxRegionIterator::wxRegionIterator()
+{
+ m_current = 0;
+}
+
+wxRegionIterator::wxRegionIterator( const wxRegion& region )
+{
+ m_region = region;
+ m_current = 0;
+}
+
+void wxRegionIterator::Reset( const wxRegion& region )
+{
+ m_region = region;
+ m_current = 0;
+}
+
+wxRegionIterator::operator bool () const
+{
+ return m_current < m_region.GetRectList()->Number();
+}
+
+bool wxRegionIterator::HaveRects() const
+{
+ return m_current < m_region.GetRectList()->Number();
+}
+
+void wxRegionIterator::operator ++ ()
+{
+ if (m_current < m_region.GetRectList()->Number()) ++m_current;
+}
+
+void wxRegionIterator::operator ++ (int)
+{
+ if (m_current < m_region.GetRectList()->Number()) ++m_current;
+}
+
+wxCoord wxRegionIterator::GetX() const
+{
+ wxNode *node = m_region.GetRectList()->Nth( m_current );
+ if (!node) return 0;
+ wxRect *r = (wxRect*)node->Data();
+ return r->x;
+}
+
+wxCoord wxRegionIterator::GetY() const
+{
+ wxNode *node = m_region.GetRectList()->Nth( m_current );
+ if (!node) return 0;
+ wxRect *r = (wxRect*)node->Data();
+ return r->y;
+}
+
+wxCoord wxRegionIterator::GetW() const
+{
+ wxNode *node = m_region.GetRectList()->Nth( m_current );
+ if (!node) return 0;
+ wxRect *r = (wxRect*)node->Data();
+ return r->width;
+}
+
+wxCoord wxRegionIterator::GetH() const
+{
+ wxNode *node = m_region.GetRectList()->Nth( m_current );
+ if (!node) return 0;
+ wxRect *r = (wxRect*)node->Data();
+ return r->height;
+}
+