Added a wxIconFromBitmap "constructor" for wxIcon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-03-08 23:04:56 +00:00
parent 4aebbc599e
commit 7248a051ef
3 changed files with 53 additions and 0 deletions

View 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;
}
%}
//---------------------------------------------------------------------------