X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d120f8391920145647ec10e84629bc21fa9f1bb..f68c6b523c1117c90c1cf690745c807bc024789d:/src/motif/icon.cpp diff --git a/src/motif/icon.cpp b/src/motif/icon.cpp index 55d70fdd9a..56c10def1c 100644 --- a/src/motif/icon.cpp +++ b/src/motif/icon.cpp @@ -16,14 +16,18 @@ #include "wx/icon.h" #include "wx/window.h" +#ifdef __VMS__ +#pragma message disable nosimpint +#endif #include #include +#ifdef __VMS__ +#pragma message enable nosimpint +#endif #include "wx/motif/private.h" -#if !USE_SHARED_LIBRARIES IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) -#endif /* * Icons @@ -45,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(); @@ -66,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; }