From 1d94e268dd7bc0e8edcec0c3d5668d872f2c0349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Skiba?= Date: Fri, 14 Apr 2006 19:54:51 +0000 Subject: [PATCH] Deprecated and obsolete parts marked up for backward compatibility. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/deprecated/resource.cpp | 2 ++ contrib/src/stc/PlatWX.cpp | 13 +++++++++++-- src/stc/PlatWX.cpp | 13 +++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/contrib/src/deprecated/resource.cpp b/contrib/src/deprecated/resource.cpp index 61cfa9570a..0a567750bf 100644 --- a/contrib/src/deprecated/resource.cpp +++ b/contrib/src/deprecated/resource.cpp @@ -2225,7 +2225,9 @@ static wxResourceBitListStruct wxResourceBitListTable[] = { wxT("wxSYSTEM_MENU"), wxSYSTEM_MENU}, { wxT("wxMINIMIZE_BOX"), wxMINIMIZE_BOX}, { wxT("wxMAXIMIZE_BOX"), wxMAXIMIZE_BOX}, +#if WXWIN_COMPATIBILITY_2_6 { wxT("wxRESIZE_BOX"), wxRESIZE_BOX}, +#endif // WXWIN_COMPATIBILITY_2_6 { wxT("wxDEFAULT_FRAME_STYLE"), wxDEFAULT_FRAME_STYLE}, { wxT("wxDEFAULT_FRAME"), wxDEFAULT_FRAME_STYLE}, { wxT("wxDEFAULT_DIALOG_STYLE"), wxDEFAULT_DIALOG_STYLE}, diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 6f8763df77..f0d9d17603 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -1342,11 +1342,20 @@ int Platform::DBCSCharMaxLength() { //---------------------------------------------------------------------- ElapsedTime::ElapsedTime() { - wxStartTimer(); + wxLongLong localTime = wxGetLocalTimeMillis(); + littleBit = localTime.GetLo(); + bigBit = localTime.GetHi(); } double ElapsedTime::Duration(bool reset) { - double result = wxGetElapsedTime(reset); + wxLongLong prevTime(bigBit, littleBit); + wxLongLong localTime = wxGetLocalTimeMillis(); + if(reset) { + littleBit = localTime.GetLo(); + bigBit = localTime.GetHi(); + } + wxLongLong duration = localTime - prevTime; + double result = duration.ToDouble(); result /= 1000.0; return result; } diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 6f8763df77..f0d9d17603 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -1342,11 +1342,20 @@ int Platform::DBCSCharMaxLength() { //---------------------------------------------------------------------- ElapsedTime::ElapsedTime() { - wxStartTimer(); + wxLongLong localTime = wxGetLocalTimeMillis(); + littleBit = localTime.GetLo(); + bigBit = localTime.GetHi(); } double ElapsedTime::Duration(bool reset) { - double result = wxGetElapsedTime(reset); + wxLongLong prevTime(bigBit, littleBit); + wxLongLong localTime = wxGetLocalTimeMillis(); + if(reset) { + littleBit = localTime.GetLo(); + bigBit = localTime.GetHi(); + } + wxLongLong duration = localTime - prevTime; + double result = duration.ToDouble(); result /= 1000.0; return result; }