X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d171743ed3ddbf0178a9d68cf78999a3ca999826..09d350c0bc105653e7cd59a8290684a3c4e70d7e:/src/x11/bitmap.cpp diff --git a/src/x11/bitmap.cpp b/src/x11/bitmap.cpp index deb6241645..d2901ad3b3 100644 --- a/src/x11/bitmap.cpp +++ b/src/x11/bitmap.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "bitmap.h" #endif @@ -41,7 +41,7 @@ bool wxGetImageFromDrawable(GR_DRAW_ID drawable, int srcX, int srcY, int width, #include "wx/wfstream.h" #endif #endif -#include +#include "wx/math.h" //----------------------------------------------------------------------------- // wxMask @@ -366,7 +366,7 @@ bool wxBitmap::Create(void *data, wxBitmapType type, wxBitmapHandler *handler = FindHandler(type); if ( handler == NULL ) { - wxLogWarning("no data bitmap handler for type %ld defined.", + wxLogWarning(wxT("no data bitmap handler for type %ld defined."), (long)type); return FALSE; @@ -417,7 +417,7 @@ bool wxBitmap::Create(WXPixmap pixmap) bool wxBitmap::CreateFromXpm( const char **bits ) { - wxCHECK_MSG( bits, FALSE, _T("NULL pointer in wxBitmap::CreateFromXpm") ); + wxCHECK_MSG( bits, FALSE, wxT("NULL pointer in wxBitmap::CreateFromXpm") ); return Create(bits, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0); } @@ -427,7 +427,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) #if wxUSE_NANOX if (!image.Ok()) { - wxASSERT_MSG(image.Ok(), "Invalid wxImage passed to wxBitmap::CreateFromImage."); + wxASSERT_MSG(image.Ok(), wxT("Invalid wxImage passed to wxBitmap::CreateFromImage.")); return FALSE; } @@ -558,7 +558,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) if (depth == 1) { - wxFAIL_MSG( "mono images later" ); + wxFAIL_MSG( wxT("mono images later") ); } else { @@ -623,7 +623,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) int b_mask = image.GetMaskBlue(); unsigned char* data = image.GetData(); - wxASSERT_MSG( data, "No image data" ); + wxASSERT_MSG( data, wxT("No image data") ); unsigned char *colorCube = wxTheApp->GetVisualInfo(M_BMPDATA->m_display)->m_colorCube; @@ -1316,13 +1316,13 @@ IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandler, wxBitmapHandlerBase); class wxXPMFileHandler : public wxBitmapHandler { - DECLARE_DYNAMIC_CLASS(wxXPMFileHandler); + DECLARE_DYNAMIC_CLASS(wxXPMFileHandler) public: wxXPMFileHandler() { - m_name = "XPM file"; - m_extension = "xpm"; - m_type = wxBITMAP_TYPE_XPM; + SetName( wxT("XPM file") ); + SetExtension( wxT("xpm") ); + SetType( wxBITMAP_TYPE_XPM ); }; virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, @@ -1424,13 +1424,13 @@ bool wxXPMFileHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, class wxXPMDataHandler : public wxBitmapHandler { - DECLARE_DYNAMIC_CLASS(wxXPMDataHandler); + DECLARE_DYNAMIC_CLASS(wxXPMDataHandler) public: wxXPMDataHandler() { - m_name = "XPM data"; - m_extension = "xpm"; - m_type = wxBITMAP_TYPE_XPM_DATA; + SetName( wxT("XPM data") ); + SetExtension( wxT("xpm") ); + SetType( wxBITMAP_TYPE_XPM_DATA ); }; virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, @@ -1529,9 +1529,9 @@ class WXDLLEXPORT wxXBMDataHandler: public wxBitmapHandler public: inline wxXBMDataHandler() { - m_name = "XBM data"; - m_extension = "xbm"; - m_type = wxBITMAP_TYPE_XBM_DATA; + SetName( wxT("XBM data") ); + SetExtension( wxT("xbm") ); + SetType( wxBITMAP_TYPE_XBM_DATA ); }; virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,