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:
@@ -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;
|
||||
}
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user