X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..f2dec5b10d6fb8d05cadcf73ff53b5ed99de9c4e:/src/motif/icon.cpp diff --git a/src/motif/icon.cpp b/src/motif/icon.cpp index fb9802ebfa..56c10def1c 100644 --- a/src/motif/icon.cpp +++ b/src/motif/icon.cpp @@ -49,18 +49,29 @@ wxIcon::wxIcon(char **data) (void) Create((void*) data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0); } -wxIcon::wxIcon(const wxString& icon_file, long flags, +wxIcon::wxIcon(const char **data) +{ + (void) Create((void*) data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0); +} + +wxIcon::wxIcon(const wxString& icon_file, wxBitmapType type, int desiredWidth, int desiredHeight) { - LoadFile(icon_file, flags, desiredWidth, desiredHeight); + LoadFile(icon_file, type, desiredWidth, desiredHeight); +} + +void wxIcon::CopyFromBitmap(const wxBitmap& bmp) +{ + wxIcon *icon = (wxIcon*)(&bmp); + *this = *icon; } wxIcon::~wxIcon() { } -bool wxIcon::LoadFile(const wxString& filename, long type, +bool wxIcon::LoadFile(const wxString& filename, wxBitmapType type, int desiredWidth, int desiredHeight) { UnRef(); @@ -70,7 +81,8 @@ bool wxIcon::LoadFile(const wxString& filename, long type, wxBitmapHandler *handler = FindHandler(type); if ( handler ) - return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight); + return handler->LoadFile(this, filename, type, + desiredWidth, desiredHeight); else return FALSE; }