X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48850fa74dee8ace36f70059f1938488c4196a97..b9f933ab5d4a293790d0f5186c434229678c76ea:/include/wx/gtk/region.h diff --git a/include/wx/gtk/region.h b/include/wx/gtk/region.h index b7fd0acf9e..1b7f06cf85 100644 --- a/include/wx/gtk/region.h +++ b/include/wx/gtk/region.h @@ -53,7 +53,7 @@ class wxRegion : public wxGDIObject { public: wxRegion() { } - + wxRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h ) { InitRect(x, y, w, h); @@ -71,13 +71,17 @@ public: } wxRegion( size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE ); - virtual ~wxRegion(); + ~wxRegion(); - wxRegion( const wxRegion& r ) { Ref(r); } - wxRegion& operator = ( const wxRegion& r ) { Ref(r); return *this; } + wxRegion( const wxRegion& region ) + : wxGDIObject() + { Ref(region); } + wxRegion& operator = ( const wxRegion& region ) { Ref(region); return *this; } + + bool Ok() const { return m_refData != NULL; } bool operator == ( const wxRegion& region ); - bool operator != ( const wxRegion& region ); + bool operator != ( const wxRegion& region ) { return !(*this == region); } void Clear(); @@ -111,6 +115,10 @@ public: wxRegionContain Contains(const wxRect& rect) const; public: + // Init with GdkRegion, set ref count to 2 so that + // the C++ class will not destroy the region! + wxRegion( GdkRegion *region ); + GdkRegion *GetRegion() const; protected: