X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96de41c2c53c013293d452e3af55dd9c76e7030a..e5dd90b1376345cc27f13c5ab028d0441d05c4ba:/wxPython/src/gdi.i diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index 7544659159..0e75af1efe 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -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; + } %} //---------------------------------------------------------------------------