Old API deprecated. Use new and remove old usage where necessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-01-10 17:21:16 +00:00
parent e896726a47
commit eecb33b018
9 changed files with 289 additions and 319 deletions

View File

@@ -206,12 +206,12 @@ public:
// user-defined class (default implementation creates a wxLogGui
// object) -- this log object is used by default by all wxLogXXX()
// functions.
virtual wxLog *CreateLogTarget();
wxDEPRECATED( virtual wxLog *CreateLogTarget() );
#endif // wxUSE_LOG
// similar to CreateLogTarget() but for the global wxMessageOutput
// object
virtual wxMessageOutput *CreateMessageOutput();
wxDEPRECATED( virtual wxMessageOutput *CreateMessageOutput() );
#endif // WXWIN_COMPATIBILITY_2_4
@@ -278,10 +278,7 @@ public:
static bool CheckBuildOptions(const char *optionsSignature,
const char *componentName);
#if WXWIN_COMPATIBILITY_2_4
static bool CheckBuildOptions(const wxBuildOptions& buildOptions)
{
return CheckBuildOptions(buildOptions.m_signature, "your program");
}
wxDEPRECATED( static bool CheckBuildOptions(const wxBuildOptions& buildOptions) );
#endif
// implementation only from now on

View File

@@ -160,7 +160,7 @@ public:
// once you are done with it. Will return NULL if the
// ArrayString was empty.
#if WXWIN_COMPATIBILITY_2_4
wxString* GetStringArray() const;
wxDEPRECATED( wxString* GetStringArray() const );
#endif
// item management
@@ -180,7 +180,7 @@ public:
void Remove(const wxChar *sz);
// remove item by index
#if WXWIN_COMPATIBILITY_2_4
void Remove(size_t nIndex, size_t nRemove = 1) { RemoveAt(nIndex, nRemove); }
wxDEPRECATED( void Remove(size_t nIndex, size_t nRemove = 1) );
#endif
void RemoveAt(size_t nIndex, size_t nRemove = 1);

View File

@@ -84,9 +84,9 @@ public:
// The arrays will contain an equal number of items found before the error.
// wildCard is in the form:
// "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
static int ParseWildcard(const wxString& wildCard,
wxArrayString& descriptions,
wxArrayString& filters);
wxDEPRECATED( static int ParseWildcard(const wxString& wildCard,
wxArrayString& descriptions,
wxArrayString& filters) );
#endif // WXWIN_COMPATIBILITY_2_4
// Append first extension to filePath from a ';' separated extensionList

View File

@@ -27,12 +27,6 @@
#include "wx/treebase.h"
#include "wx/hashmap.h"
#ifdef __GNUWIN32__
// Cygwin windows.h defines these identifiers
#undef GetFirstChild
#undef GetNextSibling
#endif // Cygwin
// fwd decl
class WXDLLEXPORT wxImageList;
class WXDLLEXPORT wxDragImage;
@@ -363,42 +357,6 @@ public:
wxRect& rect,
bool textOnly = false) const;
// deprecated
// ----------
#if WXWIN_COMPATIBILITY_2_4
// these methods are deprecated and will be removed in future versions of
// wxWidgets, they're here for compatibility only, don't use them in new
// code (the comments indicate why these methods are now useless and how to
// replace them)
// use Expand, Collapse, CollapseAndReset or Toggle
wxDEPRECATED( void ExpandItem(const wxTreeItemId& item, int action) );
// use AddRoot, PrependItem or AppendItem
wxDEPRECATED( wxTreeItemId InsertItem(const wxTreeItemId& parent,
const wxString& text,
int image = -1, int selImage = -1,
long insertAfter = wxTREE_INSERT_LAST) );
// use Set/GetImageList and Set/GetStateImageList
wxImageList *GetImageList(int) const { return GetImageList(); }
void SetImageList(wxImageList *imageList, int) { SetImageList(imageList); }
// use Set/GetItemImage directly
int GetItemSelectedImage(const wxTreeItemId& item) const
{ return GetItemImage(item, wxTreeItemIcon_Selected); }
void SetItemSelectedImage(const wxTreeItemId& item, int image)
{ SetItemImage(item, image, wxTreeItemIcon_Selected); }
// use the versions taking wxTreeItemIdValue cookies
wxDEPRECATED( wxTreeItemId GetFirstChild(const wxTreeItemId& item,
long& cookie) const );
wxDEPRECATED( wxTreeItemId GetNextChild(const wxTreeItemId& item,
long& cookie) const );
#endif // WXWIN_COMPATIBILITY_2_4
// implementation
// --------------
@@ -462,7 +420,7 @@ private:
void DeleteTextCtrl();
// support for additional item images which we implement using
// wxTreeItemIndirectData technique - see the comments in msw/treectrl.cpp
// wxTreeItemIndirectData technique
void SetIndirectItemData(const wxTreeItemId& item,
class wxTreeItemIndirectData *data);
bool HasIndirectData(const wxTreeItemId& item) const;
@@ -493,5 +451,4 @@ private:
#endif // wxUSE_TREECTRL
#endif
// _WX_TREECTRL_H_
#endif // _WX_TREECTRL_H_

View File

@@ -79,7 +79,7 @@ class WXDLLIMPEXP_CORE wxPoint;
// Make a copy of this string using 'new'
#if WXWIN_COMPATIBILITY_2_4
WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s);
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s) );
#endif
// A shorter way of using strcmp
@@ -146,14 +146,14 @@ WXDLLEXPORT long wxGetCurrentId();
WXDLLIMPEXP_DATA_BASE(extern const wxChar*) wxFloatToStringStr;
WXDLLIMPEXP_DATA_BASE(extern const wxChar*) wxDoubleToStringStr;
WXDLLIMPEXP_BASE void StringToFloat(const wxChar *s, float *number);
WXDLLIMPEXP_BASE wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr);
WXDLLIMPEXP_BASE void StringToDouble(const wxChar *s, double *number);
WXDLLIMPEXP_BASE wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr);
WXDLLIMPEXP_BASE void StringToInt(const wxChar *s, int *number);
WXDLLIMPEXP_BASE void StringToLong(const wxChar *s, long *number);
WXDLLIMPEXP_BASE wxChar* IntToString(int number);
WXDLLIMPEXP_BASE wxChar* LongToString(long number);
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToFloat(const wxChar *s, float *number) );
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr) );
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToDouble(const wxChar *s, double *number) );
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr) );
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToInt(const wxChar *s, int *number) );
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToLong(const wxChar *s, long *number) );
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* IntToString(int number) );
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* LongToString(long number) );
#endif // WXWIN_COMPATIBILITY_2_4