From 2d67974d248156678a45aded725f5b92c69f502a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Skiba?= Date: Fri, 7 Jan 2005 20:03:22 +0000 Subject: [PATCH] Old API clearly deprecated. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/ctrlsub.h | 2 +- include/wx/dynload.h | 2 +- include/wx/process.h | 3 +-- include/wx/scrolwin.h | 2 +- include/wx/stream.h | 4 ++-- include/wx/wizard.h | 12 ++++++------ src/common/ctrlsub.cpp | 9 +++++++++ src/common/process.cpp | 9 +++++++++ src/common/stream.cpp | 14 ++++++++++++++ src/generic/scrlwing.cpp | 9 +++++++++ 10 files changed, 53 insertions(+), 13 deletions(-) diff --git a/include/wx/ctrlsub.h b/include/wx/ctrlsub.h index 0036c21f46..dbf7e9884b 100644 --- a/include/wx/ctrlsub.h +++ b/include/wx/ctrlsub.h @@ -99,7 +99,7 @@ public: #if WXWIN_COMPATIBILITY_2_2 // compatibility - these functions are deprecated, use the new ones // instead - int Number() const { return GetCount(); } + wxDEPRECATED( int Number() const ); #endif // WXWIN_COMPATIBILITY_2_2 protected: diff --git a/include/wx/dynload.h b/include/wx/dynload.h index 6223cc385b..d70c8cfa1f 100644 --- a/include/wx/dynload.h +++ b/include/wx/dynload.h @@ -116,7 +116,7 @@ public: // macro because it's of arguable use outside of that. #if WXWIN_COMPATIBILITY_2_2 - static wxPluginLibrary *GetObjectFromHandle(wxDllType handle); + wxDEPRECATED( static wxPluginLibrary *GetObjectFromHandle(wxDllType handle) ); #endif // Instance methods. diff --git a/include/wx/process.h b/include/wx/process.h index fc7049d404..6b54ca0a67 100644 --- a/include/wx/process.h +++ b/include/wx/process.h @@ -107,8 +107,7 @@ public: // for backwards compatibility only, don't use #if WXWIN_COMPATIBILITY_2_2 - wxProcess(wxEvtHandler *parent, bool redirect) - { Init(parent, wxID_ANY, redirect ? wxPROCESS_REDIRECT : wxPROCESS_DEFAULT); } + wxDEPRECATED( wxProcess(wxEvtHandler *parent, bool redirect) ); #endif // WXWIN_COMPATIBILITY_2_2 protected: diff --git a/include/wx/scrolwin.h b/include/wx/scrolwin.h index aae769bea4..cf9a27f234 100644 --- a/include/wx/scrolwin.h +++ b/include/wx/scrolwin.h @@ -142,7 +142,7 @@ public: #if WXWIN_COMPATIBILITY_2_2 // Compatibility only, don't use - void ViewStart(int *x, int *y) const { GetViewStart( x, y ); } + wxDEPRECATED( void ViewStart(int *x, int *y) const ); #endif // WXWIN_COMPATIBILITY_2_2 protected: diff --git a/include/wx/stream.h b/include/wx/stream.h index 5799895fe0..41d8b5372f 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -87,8 +87,8 @@ public: #if WXWIN_COMPATIBILITY_2_2 // deprecated, for compatibility only - wxStreamError LastError() const { return m_lasterror; } - size_t StreamSize() const { return GetSize(); } + wxDEPRECATED( wxStreamError LastError() const ); + wxDEPRECATED( size_t StreamSize() const ); #endif // WXWIN_COMPATIBILITY_2_2 protected: diff --git a/include/wx/wizard.h b/include/wx/wizard.h index 9fc4e423cb..9bf871e1e3 100644 --- a/include/wx/wizard.h +++ b/include/wx/wizard.h @@ -221,12 +221,12 @@ public: // wxWizard should be created using "new wxWizard" now, not with Create() #if WXWIN_COMPATIBILITY_2_2 - static wxWizard *Create(wxWindow *parent, - int id = wxID_ANY, - const wxString& title = wxEmptyString, - const wxBitmap& bitmap = wxNullBitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize); + wxDEPRECATED( static wxWizard *Create(wxWindow *parent, + int id = wxID_ANY, + const wxString& title = wxEmptyString, + const wxBitmap& bitmap = wxNullBitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize) ); #endif // WXWIN_COMPATIBILITY_2_2 // the methods below may be overridden by the derived classes to provide diff --git a/src/common/ctrlsub.cpp b/src/common/ctrlsub.cpp index 777737f6c3..cf913548e0 100644 --- a/src/common/ctrlsub.cpp +++ b/src/common/ctrlsub.cpp @@ -156,4 +156,13 @@ wxControlWithItems::~wxControlWithItems() // this destructor is required for Darwin } +#if WXWIN_COMPATIBILITY_2_2 + +int wxItemContainer::Number() const +{ + return GetCount(); +} + +#endif // WXWIN_COMPATIBILITY_2_2 + #endif // wxUSE_CONTROLS diff --git a/src/common/process.cpp b/src/common/process.cpp index 3127c762c6..518549e660 100644 --- a/src/common/process.cpp +++ b/src/common/process.cpp @@ -47,6 +47,15 @@ IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) // wxProcess creation // ---------------------------------------------------------------------------- +#if WXWIN_COMPATIBILITY_2_2 + +wxProcess::wxProcess(wxEvtHandler *parent, bool redirect) +{ + Init(parent, wxID_ANY, redirect ? wxPROCESS_REDIRECT : wxPROCESS_DEFAULT); +} + +#endif // WXWIN_COMPATIBILITY_2_2 + void wxProcess::Init(wxEvtHandler *parent, int id, int flags) { if ( parent ) diff --git a/src/common/stream.cpp b/src/common/stream.cpp index 62a8e98e7d..e797ad3f67 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -673,6 +673,20 @@ wxFileOffset wxStreamBase::OnSysTell() const return wxInvalidOffset; } +#if WXWIN_COMPATIBILITY_2_2 + +wxStreamError wxStreamBase::LastError() const +{ + return m_lasterror; +} + +size_t wxStreamBase::StreamSize() const +{ + return GetSize(); +} + +#endif // WXWIN_COMPATIBILITY_2_2 + // ---------------------------------------------------------------------------- // wxInputStream // ---------------------------------------------------------------------------- diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index ba82747eb1..1fe62de7bf 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -902,6 +902,15 @@ void wxScrollHelper::GetViewStart (int *x, int *y) const *y = m_yScrollPosition; } +#if WXWIN_COMPATIBILITY_2_2 + +void wxScrollHelper::ViewStart(int *x, int *y) const +{ + GetViewStart( x, y ); +} + +#endif // WXWIN_COMPATIBILITY_2_2 + void wxScrollHelper::DoCalcScrolledPosition(int x, int y, int *xx, int *yy) const { if ( xx )