]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gdi.i
More little demo updates
[wxWidgets.git] / wxPython / src / gdi.i
index 7544659159a201588beb8e9e1addbbd252350861..0e75af1efeadbd67b244995ab3522072f154821d 100644 (file)
@@ -234,6 +234,7 @@ public:
 // Declarations of some alternate "constructors"
 %new wxIcon* wxEmptyIcon();
 %new wxIcon* wxIconFromXPMData(PyObject* listOfStrings);
+%new wxIcon* wxIconFromBitmap(const wxBitmap& bmp);
 
 %{ // Implementations of some alternate "constructors"
     wxIcon* wxEmptyIcon() {
@@ -251,6 +252,12 @@ public:
         delete [] cArray;
         return icon;
     }
+
+    wxIcon* wxIconFromBitmap(const wxBitmap& bmp) {
+        wxIcon* icon = new wxIcon();
+        icon->CopyFromBitmap(bmp);
+        return icon;
+    }
 %}
 
 //---------------------------------------------------------------------------