surround deprecated wxImage methods in WXWIN_COMPATIBILITY_2_2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-03-25 23:25:53 +00:00
parent a3399e6cbe
commit ef8f37e0db
2 changed files with 24 additions and 21 deletions

View File

@@ -115,7 +115,7 @@ public:
wxImage( const wxImage& image ); wxImage( const wxImage& image );
wxImage( const wxImage* image ); wxImage( const wxImage* image );
#if wxUSE_GUI #if WXWIN_COMPATIBILITY_2_2 && wxUSE_GUI
// convertion to/from wxBitmap (deprecated, use wxBitmap's methods instead): // convertion to/from wxBitmap (deprecated, use wxBitmap's methods instead):
wxImage( const wxBitmap &bitmap ); wxImage( const wxBitmap &bitmap );
wxBitmap ConvertToBitmap() const; wxBitmap ConvertToBitmap() const;

View File

@@ -1298,10 +1298,10 @@ bool wxImageHandler::CanRead( const wxString& name )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxBitmap convertion routines // Deprecated wxBitmap convertion routines
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if wxUSE_GUI #if WXWIN_COMPATIBILITY_2_2 && wxUSE_GUI
#ifdef __WXGTK__ #ifdef __WXGTK__
wxBitmap wxImage::ConvertToMonoBitmap( unsigned char red, unsigned char green, unsigned char blue ) const wxBitmap wxImage::ConvertToMonoBitmap( unsigned char red, unsigned char green, unsigned char blue ) const
@@ -1323,24 +1323,7 @@ wxImage::wxImage( const wxBitmap &bitmap )
*this = bitmap.ConvertToImage(); *this = bitmap.ConvertToImage();
} }
#endif #endif // WXWIN_COMPATIBILITY_2_2 && wxUSE_GUI
// A module to allow wxImage initialization/cleanup
// without calling these functions from app.cpp or from
// the user's application.
class wxImageModule: public wxModule
{
DECLARE_DYNAMIC_CLASS(wxImageModule)
public:
wxImageModule() {}
bool OnInit() { wxImage::InitStandardHandlers(); return TRUE; };
void OnExit() { wxImage::CleanUpHandlers(); };
};
IMPLEMENT_DYNAMIC_CLASS(wxImageModule, wxModule)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -1667,4 +1650,24 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
return rotated; return rotated;
} }
// A module to allow wxImage initialization/cleanup
// without calling these functions from app.cpp or from
// the user's application.
class wxImageModule: public wxModule
{
DECLARE_DYNAMIC_CLASS(wxImageModule)
public:
wxImageModule() {}
bool OnInit() { wxImage::InitStandardHandlers(); return TRUE; };
void OnExit() { wxImage::CleanUpHandlers(); };
};
IMPLEMENT_DYNAMIC_CLASS(wxImageModule, wxModule)
#endif // wxUSE_IMAGE #endif // wxUSE_IMAGE