moved wxFloat/DoubleToStringStr from src/*/data.cpp to src/common/utils.cpp; took all String <-> Numebr functions inside WXWIN_COMPATIBILITY_2_4

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-04-10 13:08:46 +00:00
parent b1a28eef7c
commit e12c92c2f7
9 changed files with 16 additions and 30 deletions

View File

@ -127,6 +127,9 @@ WXDLLEXPORT long wxGetCurrentId();
// Various conversions
// ----------------------------------------------------------------------------
// these functions are deprecated, use wxString methods instead!
#if WXWIN_COMPATIBILITY_2_4
WXDLLEXPORT_DATA(extern const wxChar*) wxFloatToStringStr;
WXDLLEXPORT_DATA(extern const wxChar*) wxDoubleToStringStr;
@ -139,6 +142,8 @@ WXDLLEXPORT void StringToLong(const wxChar *s, long *number);
WXDLLEXPORT wxChar* IntToString(int number);
WXDLLEXPORT wxChar* LongToString(long number);
#endif // WXWIN_COMPATIBILITY_2_4
// Convert 2-digit hex number to decimal
WXDLLEXPORT int wxHexToDec(const wxString& buf);

View File

@ -133,6 +133,15 @@ wxRegisterId (long id)
wxCurrentId = id + 1;
}
// ----------------------------------------------------------------------------
// String <-> Number conversions (deprecated)
// ----------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_4
WXDLLEXPORT_DATA(const wxChar *) wxFloatToStringStr = wxT("%.2f");
WXDLLEXPORT_DATA(const wxChar *) wxDoubleToStringStr = wxT("%.2f");
void
StringToFloat (const wxChar *s, float *number)
{
@ -197,6 +206,8 @@ LongToString (long number)
return buf;
}
#endif // WXWIN_COMPATIBILITY_2_4
// Array used in DecToHex conversion routine.
static wxChar hexArray[] = wxT("0123456789ABCDEF");

View File

@ -126,10 +126,6 @@ const wxChar *wxTreeCtrlNameStr = wxT("treeCtrl");
const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
// See wx/utils.h
const wxChar *wxFloatToStringStr = wxT("%.2f");
const wxChar *wxDoubleToStringStr = wxT("%.2f");
#if wxUSE_SHARED_LIBRARY
///// Event tables (also must be in one, statically-linked file for shared libraries)

View File

@ -126,10 +126,6 @@ const wxChar *wxTreeCtrlNameStr = wxT("treeCtrl");
const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
// See wx/utils.h
const wxChar *wxFloatToStringStr = wxT("%.2f");
const wxChar *wxDoubleToStringStr = wxT("%.2f");
#if wxUSE_SHARED_LIBRARY
///// Event tables (also must be in one, statically-linked file for shared libraries)

View File

@ -168,10 +168,6 @@ const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl");
/* See wx/utils.h */
const wxChar *wxFloatToStringStr = wxT("%.2f");
const wxChar *wxDoubleToStringStr = wxT("%.2f");
/* Dafaults for wxWindow etc. */
const wxSize wxDefaultSize(-1, -1);
const wxPoint wxDefaultPosition(-1, -1);

View File

@ -122,10 +122,5 @@ const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl");
const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
// See wx/utils.h
const wxChar *wxFloatToStringStr = wxT("%.2f");
const wxChar *wxDoubleToStringStr = wxT("%.2f");
const wxSize wxDefaultSize(-1, -1);
const wxPoint wxDefaultPosition(-1, -1);

View File

@ -140,10 +140,6 @@ WXDLLEXPORT_DATA(const wxChar *) wxTreeCtrlNameStr = wxT("treeCtrl");
WXDLLEXPORT_DATA(const wxChar *) wxDirDialogNameStr = wxT("wxDirCtrl");
WXDLLEXPORT_DATA(const wxChar *) wxDirDialogDefaultFolderStr = wxT("/");
// See wx/utils.h
WXDLLEXPORT_DATA(const wxChar *) wxFloatToStringStr = wxT("%.2f");
WXDLLEXPORT_DATA(const wxChar *) wxDoubleToStringStr = wxT("%.2f");
#ifdef __WXMSW__
WXDLLEXPORT_DATA(const wxChar *) wxUserResourceStr = wxT("TEXT");
#endif

View File

@ -150,10 +150,6 @@ const wxChar* wxPanelClassNameNR = wxT("wxPa
const wxChar* wxCanvasClassName = wxT("wxCanvasClass");
const wxChar* wxCanvasClassNameNR = wxT("wxCanvasClassNR");
// See wx/utils.h
const wxChar *wxFloatToStringStr = wxT("%.2f");
const wxChar *wxDoubleToStringStr = wxT("%.2f");
const wxChar *wxUserResourceStr = wxT("TEXT");
const wxSize wxDefaultSize(-1, -1);

View File

@ -122,10 +122,5 @@ const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl");
/* See wx/utils.h */
const wxChar *wxFloatToStringStr = wxT("%.2f");
const wxChar *wxDoubleToStringStr = wxT("%.2f");
const wxSize wxDefaultSize(-1, -1);
const wxPoint wxDefaultPosition(-1, -1);