+ wxRegionRefData()
+ {
+ m_region = XCreateRegion();
+ m_usingRects = FALSE;
+ m_rects = (wxRect*) NULL;
+ m_rectCount = 0;
+ }
+
+ wxRegionRefData(const wxRegionRefData& data)
+ {
+ m_region = XCreateRegion();
+ m_rects = (wxRect*) NULL;
+ m_rectCount = 0;
+ XUnionRegion(m_region, data.m_region, m_region);
+
+ SetRects(data.m_rectCount, data.m_rects);
+ }
+
+ ~wxRegionRefData()
+ {
+ XDestroyRegion(m_region);
+ DeleteRects();
+ }
+
+ wxRect* GetRects() { return m_rects; };
+ void SetRects(const wxRectList& rectList);
+ void SetRects(int count, const wxRect* rects);
+ bool UsingRects() const { return m_usingRects; }
+ int GetRectCount() const { return m_rectCount; }
+
+ void DeleteRects();
+
+ Region m_region;
+ wxRect* m_rects;
+ int m_rectCount;
+ bool m_usingRects; // TRUE if we're using the above.