]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/region.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / gtk / region.h
index 846f1946cff755585b9f92c84977ce613f161a8c..a2231a19504a1c8557a3c4467a0838bad9f1cc0e 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        wx/gtk/region.h
 // Purpose:
 // Author:      Robert Roebling
 // Name:        wx/gtk/region.h
 // Purpose:
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -10,6 +9,10 @@
 #ifndef _WX_GTK_REGION_H_
 #define _WX_GTK_REGION_H_
 
 #ifndef _WX_GTK_REGION_H_
 #define _WX_GTK_REGION_H_
 
+#ifdef __WXGTK3__
+typedef struct _cairo_region cairo_region_t;
+#endif
+
 // ----------------------------------------------------------------------------
 // wxRegion
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxRegion
 // ----------------------------------------------------------------------------
@@ -35,7 +38,8 @@ public:
         InitRect(rect.x, rect.y, rect.width, rect.height);
     }
 
         InitRect(rect.x, rect.y, rect.width, rect.height);
     }
 
-    wxRegion( size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE );
+    wxRegion( size_t n, const wxPoint *points,
+              wxPolygonFillMode fillStyle = wxODDEVEN_RULE );
 
 #if wxUSE_IMAGE
     wxRegion( const wxBitmap& bmp)
 
 #if wxUSE_IMAGE
     wxRegion( const wxBitmap& bmp)
@@ -55,12 +59,12 @@ public:
     virtual void Clear();
     virtual bool IsEmpty() const;
 
     virtual void Clear();
     virtual bool IsEmpty() const;
 
-public:
-    // Init with GdkRegion, set ref count to 2 so that
-    // the C++ class will not destroy the region!
-    wxRegion( GdkRegion *region );
-
+#ifdef __WXGTK3__
+    cairo_region_t* GetRegion() const;
+#else
+    wxRegion(const GdkRegion* region);
     GdkRegion *GetRegion() const;
     GdkRegion *GetRegion() const;
+#endif
 
 protected:
     virtual wxGDIRefData *CreateGDIRefData() const;
 
 protected:
     virtual wxGDIRefData *CreateGDIRefData() const;
@@ -121,13 +125,11 @@ private:
     void Init();
     void CreateRects( const wxRegion& r );
 
     void Init();
     void CreateRects( const wxRegion& r );
 
-    size_t   m_current;
     wxRegion m_region;
     wxRegion m_region;
-
     wxRect *m_rects;
     wxRect *m_rects;
-    size_t  m_numRects;
+    int m_numRects;
+    int m_current;
 
 
-private:
     DECLARE_DYNAMIC_CLASS(wxRegionIterator)
 };
 
     DECLARE_DYNAMIC_CLASS(wxRegionIterator)
 };