]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/regiong.cpp
fixed wxXmlResource::Load's detection of filenames to be done as early as possible
[wxWidgets.git] / src / generic / regiong.cpp
index 845df56ce07041a924712cbe9f8a97a8a38fba28..6c358e10addc16dc402a3b6266b2e01015342a84 100644 (file)
@@ -176,12 +176,12 @@ protected:
 // wxRegionRefData
 // ========================================================================
 
 // wxRegionRefData
 // ========================================================================
 
-class wxRegionRefData : public wxObjectRefData,
+class wxRegionRefData : public wxGDIRefData,
                         public REGION
 {
 public:
     wxRegionRefData()
                         public REGION
 {
 public:
     wxRegionRefData()
-        : wxObjectRefData(),
+        : wxGDIRefData(),
           REGION()
     {
         size = 1;
           REGION()
     {
         size = 1;
@@ -194,7 +194,7 @@ public:
     }
 
     wxRegionRefData(const wxPoint& topLeft, const wxPoint& bottomRight)
     }
 
     wxRegionRefData(const wxPoint& topLeft, const wxPoint& bottomRight)
-        : wxObjectRefData(),
+        : wxGDIRefData(),
           REGION()
     {
         rects = (BOX*)malloc(sizeof(BOX));
           REGION()
     {
         rects = (BOX*)malloc(sizeof(BOX));
@@ -208,7 +208,7 @@ public:
     }
 
     wxRegionRefData(const wxRect& rect)
     }
 
     wxRegionRefData(const wxRect& rect)
-        : wxObjectRefData(),
+        : wxGDIRefData(),
           REGION(rect)
     {
         rects = (BOX*)malloc(sizeof(BOX));
           REGION(rect)
     {
         rects = (BOX*)malloc(sizeof(BOX));
@@ -216,7 +216,7 @@ public:
     }
 
     wxRegionRefData(const wxRegionRefData& refData)
     }
 
     wxRegionRefData(const wxRegionRefData& refData)
-        : wxObjectRefData(),
+        : wxGDIRefData(),
           REGION()
     {
         size = refData.size;
           REGION()
     {
         size = refData.size;
@@ -271,17 +271,34 @@ wxRegionGeneric::wxRegionGeneric(const wxPoint& topLeft, const wxPoint& bottomRi
     m_refData = new wxRegionRefData(topLeft, bottomRight);
 }
 
     m_refData = new wxRegionRefData(topLeft, bottomRight);
 }
 
+wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp) 
+{
+    wxFAIL_MSG("NOT IMPLEMENTED: wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp)");
+}
+
+wxRegionGeneric::wxRegionGeneric(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle)
+{
+    wxFAIL_MSG("NOT IMPLEMENTED: wxRegionGeneric::wxRegionGeneric(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle)");
+}
+
+wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp, const wxColour& transp, int tolerance)
+{
+    wxFAIL_MSG("NOT IMPLEMENTED: wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp, const wxColour& transp, int tolerance)");
+}
+
 void wxRegionGeneric::Clear()
 {
     UnRef();
 void wxRegionGeneric::Clear()
 {
     UnRef();
+    if (!m_refData)
+        m_refData = new wxRegionRefData(wxRect(0,0,0,0));
 }
 
 }
 
-wxObjectRefData *wxRegionGeneric::CreateRefData() const
+wxGDIRefData *wxRegionGeneric::CreateGDIRefData() const
 {
     return new wxRegionRefData;
 }
 
 {
     return new wxRegionRefData;
 }
 
-wxObjectRefData *wxRegionGeneric::CloneRefData(const wxObjectRefData *data) const
+wxGDIRefData *wxRegionGeneric::CloneGDIRefData(const wxGDIRefData *data) const
 {
     return new wxRegionRefData(*(wxRegionRefData *)data);
 }
 {
     return new wxRegionRefData(*(wxRegionRefData *)data);
 }