From 40ff126ac4ff57ab4aa22a5c7c7ce621479e8739 Mon Sep 17 00:00:00 2001
From: =?utf8?q?W=C5=82odzimierz=20Skiba?= <abx@abx.art.pl>
Date: Fri, 14 Apr 2006 17:01:16 +0000
Subject: [PATCH] Deprecated and obsolete parts marked up for backward
 compatibility.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 contrib/src/deprecated/resource.cpp   |  2 ++
 contrib/utils/convertrc/wxr2xml.cpp   |  6 +-----
 include/wx/app.h                      |  9 +++++++--
 include/wx/gauge.h                    |  6 ++++--
 include/wx/listbox.h                  | 11 +++++++++--
 include/wx/mstream.h                  | 14 +++++++++++---
 include/wx/msw/dialog.h               |  5 ++---
 include/wx/msw/listctrl.h             |  5 +++--
 include/wx/os2/dialog.h               |  8 ++++----
 include/wx/slider.h                   |  7 ++++---
 include/wx/splitter.h                 |  8 +++++---
 include/wx/stopwatch.h                | 17 ++++++++---------
 include/wx/stream.h                   | 19 +++++++++++++++----
 include/wx/textctrl.h                 |  8 +++++---
 include/wx/thread.h                   | 10 ++++++++--
 include/wx/treebase.h                 |  9 +++++++--
 include/wx/txtstrm.h                  |  7 +++++--
 include/wx/window.h                   |  7 +++++--
 samples/widgets/textctrl.cpp          |  2 +-
 src/common/txtstrm.cpp                |  6 +++++-
 src/common/valgen.cpp                 | 27 +++++++++++++--------------
 src/common/variant.cpp                |  2 +-
 src/msw/dialog.cpp                    |  8 ++++++++
 src/msw/gauge95.cpp                   |  3 ++-
 src/msw/listctrl.cpp                  |  4 ++++
 src/msw/textctrl.cpp                  | 16 ++++++++--------
 src/palmos/gauge.cpp                  |  2 --
 src/palmos/textctrl.cpp               |  2 +-
 src/univ/textctrl.cpp                 |  2 +-
 src/xrc/xh_gauge.cpp                  |  4 +++-
 src/xrc/xh_split.cpp                  |  4 +++-
 src/xrc/xh_text.cpp                   |  5 ++++-
 utils/configtool/src/propeditor.cpp   |  2 +-
 utils/configtool/src/wxconfigtool.pjd |  9 ++++-----
 utils/tex2rtf/src/tex2rtf.cpp         |  6 +++---
 35 files changed, 167 insertions(+), 95 deletions(-)

diff --git a/contrib/src/deprecated/resource.cpp b/contrib/src/deprecated/resource.cpp
index c3ba599219..61cfa9570a 100644
--- a/contrib/src/deprecated/resource.cpp
+++ b/contrib/src/deprecated/resource.cpp
@@ -2105,7 +2105,9 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
     { wxT("wxCB_SORT"), wxCB_SORT },
 
     /* wxGauge */
+#if WXWIN_COMPATIBILITY_2_6
     { wxT("wxGA_PROGRESSBAR"), wxGA_PROGRESSBAR },
+#endif // WXWIN_COMPATIBILITY_2_6
     { wxT("wxGA_HORIZONTAL"), wxGA_HORIZONTAL },
     { wxT("wxGA_VERTICAL"), wxGA_VERTICAL },
 
diff --git a/contrib/utils/convertrc/wxr2xml.cpp b/contrib/utils/convertrc/wxr2xml.cpp
index ff46932f3b..ad9cf55656 100644
--- a/contrib/utils/convertrc/wxr2xml.cpp
+++ b/contrib/utils/convertrc/wxr2xml.cpp
@@ -1,7 +1,7 @@
 // wxr2xml.cpp: implementation of the wxr2xml class.
 // 8/30/00  Brian Gavin
 // only tested on wxMSW so far
-//License: wxWindows Liscense
+// License: wxWindows Liscense
 // ////////////////////////////////////////////////////////////////////
 
 /*
@@ -31,12 +31,10 @@ trans->Convert("Myfile.wxr","Myfile.xml");
 
 wxr2xml::wxr2xml()
 {
-
 }
 
 wxr2xml::~wxr2xml()
 {
-
 }
 
 bool wxr2xml::Convert(wxString wxrfile, wxString xmlfile)
@@ -466,8 +464,6 @@ wxString wxr2xml::GetStyles(wxItemResource * res)
             s += _T("wxGA_HORIZONTAL|");
         if (style & wxGA_VERTICAL)
             s += _T("wxGA_VERTICAL|");
-        if (style & wxGA_PROGRESSBAR)
-            s += _T("wxGA_PROGRESSBAR|");
     // windows only
         if (style & wxGA_SMOOTH)
             s += _T("wxGA_SMOOTH|");
diff --git a/include/wx/app.h b/include/wx/app.h
index 02e57755fa..4fc847b33c 100644
--- a/include/wx/app.h
+++ b/include/wx/app.h
@@ -503,10 +503,12 @@ public:
     // deactivated
     virtual void SetActive(bool isActive, wxWindow *lastFocus);
 
+#if WXWIN_COMPATIBILITY_2_6
     // OBSOLETE: don't use, always returns true
     //
     // returns true if the program is successfully initialized
-    bool Initialized() { return true; }
+    wxDEPRECATED( bool Initialized() );
+#endif // WXWIN_COMPATIBILITY_2_6
 
     // perform standard OnIdle behaviour, ensure that this is always called
     void OnIdle(wxIdleEvent& event);
@@ -549,6 +551,10 @@ protected:
     DECLARE_NO_COPY_CLASS(wxAppBase)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    inline bool wxAppBase::Initialized() { return true; }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 #endif // wxUSE_GUI
 
 // ----------------------------------------------------------------------------
@@ -694,4 +700,3 @@ extern wxAppConsole *wxCreateApp();
 extern wxAppInitializer wxTheAppInitializer;
 
 #endif // _WX_APP_H_BASE_
-
diff --git a/include/wx/gauge.h b/include/wx/gauge.h
index 31757e87c9..cb1cffb25b 100644
--- a/include/wx/gauge.h
+++ b/include/wx/gauge.h
@@ -28,8 +28,10 @@
 // Win32 only, is default (and only) on some other platforms
 #define wxGA_SMOOTH          0x0020
 
-// obsolete style
-#define wxGA_PROGRESSBAR     0
+#if WXWIN_COMPATIBILITY_2_6
+    // obsolete style
+    #define wxGA_PROGRESSBAR     0
+#endif // WXWIN_COMPATIBILITY_2_6
 
 
 extern WXDLLEXPORT_DATA(const wxChar) wxGaugeNameStr[];
diff --git a/include/wx/listbox.h b/include/wx/listbox.h
index 219eccff38..c3bab9220b 100644
--- a/include/wx/listbox.h
+++ b/include/wx/listbox.h
@@ -103,12 +103,14 @@ public:
     // event.GetExtraLong())
     void Command(wxCommandEvent& event);
 
+#if WXWIN_COMPATIBILITY_2_6
     // compatibility - these functions are deprecated, use the new ones
     // instead
-    bool Selected(int n) const { return IsSelected(n); }
+    wxDEPRECATED( bool Selected(int n) const );
 
     // returns the item number at a point or wxNOT_FOUND
-    int HitTest(const wxPoint& point) const { return DoListHitTest(point); }
+    wxDEPRECATED( int HitTest(const wxPoint& point) const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     // NB: due to wxGTK implementation details, DoInsert() is implemented
@@ -132,6 +134,11 @@ protected:
     DECLARE_NO_COPY_CLASS(wxListBoxBase)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    inline bool wxListBoxBase::Selected(int n) const { return IsSelected(n); }
+    inline int wxListBoxBase::HitTest(const wxPoint& point) const { return DoListHitTest(point); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 // ----------------------------------------------------------------------------
 // include the platform-specific class declaration
 // ----------------------------------------------------------------------------
diff --git a/include/wx/mstream.h b/include/wx/mstream.h
index 2857dc074d..ef344236c3 100644
--- a/include/wx/mstream.h
+++ b/include/wx/mstream.h
@@ -33,8 +33,10 @@ public:
 
     wxStreamBuffer *GetInputStreamBuffer() const { return m_i_streambuf; }
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, compatibility only
-    wxStreamBuffer *InputStreamBuffer() const { return m_i_streambuf; }
+    wxDEPRECATED( wxStreamBuffer *InputStreamBuffer() const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     wxStreamBuffer *m_i_streambuf;
@@ -62,8 +64,10 @@ public:
 
     wxStreamBuffer *GetOutputStreamBuffer() const { return m_o_streambuf; }
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, compatibility only
-    wxStreamBuffer *OutputStreamBuffer() const { return m_o_streambuf; }
+    wxDEPRECATED( wxStreamBuffer *OutputStreamBuffer() const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     wxStreamBuffer *m_o_streambuf;
@@ -76,9 +80,13 @@ protected:
     DECLARE_NO_COPY_CLASS(wxMemoryOutputStream)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    inline wxStreamBuffer *wxMemoryInputStream::InputStreamBuffer() const { return m_i_streambuf; }
+    inline wxStreamBuffer *wxMemoryOutputStream::OutputStreamBuffer() const { return m_o_streambuf; }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 #endif
   // wxUSE_STREAMS
 
 #endif
   // _WX_WXMMSTREAM_H__
-
diff --git a/include/wx/msw/dialog.h b/include/wx/msw/dialog.h
index 6d26a72c9f..2553a5b2bc 100644
--- a/include/wx/msw/dialog.h
+++ b/include/wx/msw/dialog.h
@@ -108,9 +108,7 @@ public:
     // Windows callbacks
     WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
 
-    // obsolete methods
-    // ----------------
-
+#if WXWIN_COMPATIBILITY_2_6
     // use the other ctor
     wxDEPRECATED( wxDialog(wxWindow *parent,
              const wxString& title, bool modal,
@@ -123,6 +121,7 @@ public:
 
     // use IsModal()
     wxDEPRECATED( bool IsModalShowing() const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
     // handle Escape here
     virtual bool MSWProcessMessage(WXMSG* pMsg);
diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h
index 895adaea48..92adaffc37 100644
--- a/include/wx/msw/listctrl.h
+++ b/include/wx/msw/listctrl.h
@@ -363,8 +363,10 @@ public:
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 
 
+#if WXWIN_COMPATIBILITY_2_6
     // obsolete stuff, for compatibility only -- don't use
     wxDEPRECATED( int GetItemSpacing(bool isSmall) const);
+#endif // WXWIN_COMPATIBILITY_2_6
 
     // convert our styles to Windows
     virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
@@ -413,7 +415,7 @@ protected:
     virtual wxString OnGetItemText(long item, long column) const;
 
     // return the icon for the given item. In report view, OnGetItemImage will
-    // only be called for the first column. See OnGetItemColumnImage for 
+    // only be called for the first column. See OnGetItemColumnImage for
     // details.
     virtual int OnGetItemImage(long item) const;
 
@@ -435,4 +437,3 @@ private:
 #endif // wxUSE_LISTCTRL
 
 #endif // _WX_LISTCTRL_H_
-
diff --git a/include/wx/os2/dialog.h b/include/wx/os2/dialog.h
index 0c4001e1a3..d4ae70e32c 100644
--- a/include/wx/os2/dialog.h
+++ b/include/wx/os2/dialog.h
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        dialog.h
+// Name:        wx/os2/dialog.h
 // Purpose:     wxDialog class
 // Author:      David Webster
 // Modified by:
@@ -90,8 +90,7 @@ public:
                                   ,WXWPARAM wParam
                                   ,WXLPARAM lParam
                                  );
-    // obsolete methods
-    // ----------------
+#if WXWIN_COMPATIBILITY_2_6
 
     // Constructor with a modal flag, but no window id - the old convention
     wxDEPRECATED( wxDialog( wxWindow*       pParent
@@ -111,6 +110,8 @@ public:
     // use IsModal()
     wxDEPRECATED( bool IsModalShowing() const );
 
+#endif // WXWIN_COMPATIBILITY_2_6
+
 protected:
     //
     // find the window to use as parent for this dialog if none has been
@@ -147,4 +148,3 @@ private:
 }; // end of CLASS wxDialog
 
 #endif // _WX_DIALOG_H_
-
diff --git a/include/wx/slider.h b/include/wx/slider.h
index a3c114f064..6c31343bd7 100644
--- a/include/wx/slider.h
+++ b/include/wx/slider.h
@@ -40,9 +40,10 @@
 #define wxSL_SELRANGE        0x0800
 #define wxSL_INVERSE         0x1000
 
-// obsolete
-#define wxSL_NOTIFY_DRAG     0x0000
-
+#if WXWIN_COMPATIBILITY_2_6
+    // obsolete
+    #define wxSL_NOTIFY_DRAG     0x0000
+#endif // WXWIN_COMPATIBILITY_2_6
 
 extern WXDLLEXPORT_DATA(const wxChar) wxSliderNameStr[];
 
diff --git a/include/wx/splitter.h b/include/wx/splitter.h
index b2a7cad532..ae14d386a6 100644
--- a/include/wx/splitter.h
+++ b/include/wx/splitter.h
@@ -28,9 +28,11 @@
 #define wxSP_BORDER           wxSP_3DBORDER
 #define wxSP_3D               (wxSP_3DBORDER | wxSP_3DSASH)
 
-// obsolete styles, don't do anything
-#define wxSP_SASH_AQUA        0
-#define wxSP_FULLSASH         0
+#if WXWIN_COMPATIBILITY_2_6
+    // obsolete styles, don't do anything
+    #define wxSP_SASH_AQUA        0
+    #define wxSP_FULLSASH         0
+#endif // WXWIN_COMPATIBILITY_2_6
 
 BEGIN_DECLARE_EVENT_TYPES()
     DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, 850)
diff --git a/include/wx/stopwatch.h b/include/wx/stopwatch.h
index 75f789592b..dcb5542f20 100644
--- a/include/wx/stopwatch.h
+++ b/include/wx/stopwatch.h
@@ -66,17 +66,17 @@ private:
 
 #endif // wxUSE_STOPWATCH
 
-#if wxUSE_LONGLONG
+#if wxUSE_LONGLONG && WXWIN_COMPATIBILITY_2_6
 
-// Starts a global timer
-// -- DEPRECATED: use wxStopWatch instead
-void WXDLLIMPEXP_BASE wxStartTimer();
+    // Starts a global timer
+    // -- DEPRECATED: use wxStopWatch instead
+    wxDEPRECATED( void WXDLLIMPEXP_BASE wxStartTimer() );
 
-// Gets elapsed milliseconds since last wxStartTimer or wxGetElapsedTime
-// -- DEPRECATED: use wxStopWatch instead
-long WXDLLIMPEXP_BASE wxGetElapsedTime(bool resetTimer = true);
+    // Gets elapsed milliseconds since last wxStartTimer or wxGetElapsedTime
+    // -- DEPRECATED: use wxStopWatch instead
+    wxDEPRECATED( long WXDLLIMPEXP_BASE wxGetElapsedTime(bool resetTimer = true) );
 
-#endif // wxUSE_LONGLONG
+#endif // wxUSE_LONGLONG && WXWIN_COMPATIBILITY_2_6
 
 // ----------------------------------------------------------------------------
 // global time functions
@@ -100,4 +100,3 @@ extern wxMilliClock_t WXDLLIMPEXP_BASE wxGetLocalTimeMillis();
 #define wxGetCurrentTime() wxGetLocalTime()
 
 #endif // _WX_STOPWATCH_H_
-
diff --git a/include/wx/stream.h b/include/wx/stream.h
index 02ecb32f9b..ca3b84eb57 100644
--- a/include/wx/stream.h
+++ b/include/wx/stream.h
@@ -388,8 +388,10 @@ public:
     wxInputStream *GetInputStream() const;
     wxOutputStream *GetOutputStream() const;
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, for compatibility only
-    wxStreamBase *Stream() { return m_stream; }
+    wxDEPRECATED( wxStreamBase *Stream() );
+#endif // WXWIN_COMPATIBILITY_2_6
 
     // this constructs a dummy wxStreamBuffer, used by (and exists for)
     // wxMemoryStreams only, don't use!
@@ -465,8 +467,10 @@ public:
     void SetInputStreamBuffer(wxStreamBuffer *buffer);
     wxStreamBuffer *GetInputStreamBuffer() const { return m_i_streambuf; }
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, for compatibility only
-    wxStreamBuffer *InputStreamBuffer() const { return m_i_streambuf; }
+    wxDEPRECATED( wxStreamBuffer *InputStreamBuffer() const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     virtual size_t OnSysRead(void *buffer, size_t bufsize);
@@ -506,8 +510,10 @@ public:
     void SetOutputStreamBuffer(wxStreamBuffer *buffer);
     wxStreamBuffer *GetOutputStreamBuffer() const { return m_o_streambuf; }
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, for compatibility only
-    wxStreamBuffer *OutputStreamBuffer() const { return m_o_streambuf; }
+    wxDEPRECATED( wxStreamBuffer *OutputStreamBuffer() const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     virtual size_t OnSysWrite(const void *buffer, size_t bufsize);
@@ -519,7 +525,12 @@ protected:
     DECLARE_NO_COPY_CLASS(wxBufferedOutputStream)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    inline wxStreamBase *wxStreamBuffer::Stream() { return m_stream; }
+    inline wxStreamBuffer *wxBufferedInputStream::InputStreamBuffer() const { return m_i_streambuf; }
+    inline wxStreamBuffer *wxBufferedOutputStream::OutputStreamBuffer() const { return m_o_streambuf; }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 #endif // wxUSE_STREAMS
 
 #endif // _WX_WXSTREAM_H__
-
diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h
index 808239a853..03223d6957 100644
--- a/include/wx/textctrl.h
+++ b/include/wx/textctrl.h
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        textctrl.h
+// Name:        wx/textctrl.h
 // Purpose:     wxTextCtrlBase class - the interface of wxTextCtrl
 // Author:      Vadim Zeitlin
 // Modified by:
@@ -116,8 +116,10 @@ const wxTextCoord wxInvalidTextCoord    = -2;
 #define wxTE_WORDWRAP       0x0001  // wrap only at words boundaries
 #define wxTE_BESTWRAP       0x0000  // this is the default
 
-// obsolete synonym
-#define wxTE_LINEWRAP       wxTE_CHARWRAP
+#if WXWIN_COMPATIBILITY_2_6
+    // obsolete synonym
+    #define wxTE_LINEWRAP       wxTE_CHARWRAP
+#endif // WXWIN_COMPATIBILITY_2_6
 
 // force using RichEdit version 2.0 or 3.0 instead of 1.0 (default) for
 // wxTE_RICH controls - can be used together with or instead of wxTE_RICH
diff --git a/include/wx/thread.h b/include/wx/thread.h
index 3ef7e47ade..036b3d0adb 100644
--- a/include/wx/thread.h
+++ b/include/wx/thread.h
@@ -349,9 +349,10 @@ public:
     wxCondError Broadcast();
 
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated version, don't use
-    bool Wait(unsigned long milliseconds)
-        { return WaitTimeout(milliseconds) == wxCOND_NO_ERROR; }
+    wxDEPRECATED( bool Wait(unsigned long milliseconds) );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 private:
     wxConditionInternal *m_internal;
@@ -359,6 +360,11 @@ private:
     DECLARE_NO_COPY_CLASS(wxCondition)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    inline bool wxCondition::Wait(unsigned long milliseconds)
+        { return WaitTimeout(milliseconds) == wxCOND_NO_ERROR; }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 // ----------------------------------------------------------------------------
 // wxSemaphore: a counter limiting the number of threads concurrently accessing
 //              a shared resource
diff --git a/include/wx/treebase.h b/include/wx/treebase.h
index 445b4c28bc..92c7644412 100644
--- a/include/wx/treebase.h
+++ b/include/wx/treebase.h
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        treebase.h
+// Name:        wx/treebase.h
 // Purpose:     wxTreeCtrl base classes and types
 // Author:      Julian Smart et al
 // Modified by:
@@ -24,6 +24,8 @@
 #include "wx/event.h"
 #include "wx/dynarray.h"
 
+#if WXWIN_COMPATIBILITY_2_6
+
 // flags for deprecated `Expand(int action)', will be removed in next versions
 enum
 {
@@ -33,6 +35,8 @@ enum
     wxTREE_EXPAND_TOGGLE
 };
 
+#endif // WXWIN_COMPATIBILITY_2_6
+
 // ----------------------------------------------------------------------------
 // wxTreeItemId identifies an element of the tree. In this implementation, it's
 // just a trivial wrapper around Win32 HTREEITEM or a pointer to some private
@@ -179,9 +183,11 @@ enum wxTreeItemIcon
 #define wxTR_DEFAULT_STYLE           (wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT)
 #endif
 
+#if WXWIN_COMPATIBILITY_2_6
 // deprecated, don't use
 #define wxTR_MAC_BUTTONS             0
 #define wxTR_AQUA_BUTTONS            0
+#endif // WXWIN_COMPATIBILITY_2_6
 
 
 // values for the `flags' parameter of wxTreeCtrl::HitTest() which determine
@@ -413,4 +419,3 @@ END_DECLARE_EVENT_TYPES()
 #endif // wxUSE_TREECTRL
 
 #endif // _WX_TREEBASE_H_
-
diff --git a/include/wx/txtstrm.h b/include/wx/txtstrm.h
index b5d94c749f..248af2453a 100644
--- a/include/wx/txtstrm.h
+++ b/include/wx/txtstrm.h
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        txtstrm.h
+// Name:        wx/txtstrm.h
 // Purpose:     Text stream classes
 // Author:      Guilhem Lavaux
 // Modified by:
@@ -52,7 +52,6 @@ public:
     wxInt16  Read16S(int base = 10);
     wxInt8   Read8S(int base = 10);
     double   ReadDouble();
-    wxString ReadString();  // deprecated: use ReadLine or ReadWord instead
     wxString ReadLine();
     wxString ReadWord();
     wxChar   GetChar() { wxChar c = NextChar(); return (wxChar)(c != wxEOT ? c : 0); }
@@ -75,6 +74,10 @@ public:
 
     wxTextInputStream& operator>>( __wxTextInputManip func) { return func(*this); }
 
+#if WXWIN_COMPATIBILITY_2_6
+    wxDEPRECATED( wxString ReadString() );  // use ReadLine or ReadWord instead
+#endif // WXWIN_COMPATIBILITY_2_6
+
 protected:
     wxInputStream &m_input;
     wxString m_separators;
diff --git a/include/wx/window.h b/include/wx/window.h
index bb3c632505..9f38ecb22d 100644
--- a/include/wx/window.h
+++ b/include/wx/window.h
@@ -1448,8 +1448,11 @@ extern WXDLLEXPORT wxWindow *wxGetActiveWindow();
 // get the (first) top level parent window
 WXDLLEXPORT wxWindow* wxGetTopLevelParent(wxWindow *win);
 
-// deprecated (doesn't start with 'wx' prefix), use wxWindow::NewControlId()
-inline int NewControlId() { return wxWindowBase::NewControlId(); }
+#if WXWIN_COMPATIBILITY_2_6
+    // deprecated (doesn't start with 'wx' prefix), use wxWindow::NewControlId()
+    wxDEPRECATED( int NewControlId() );
+    inline int NewControlId() { return wxWindowBase::NewControlId(); }
+#endif // WXWIN_COMPATIBILITY_2_6
 
 #if wxUSE_ACCESSIBILITY
 // ----------------------------------------------------------------------------
diff --git a/samples/widgets/textctrl.cpp b/samples/widgets/textctrl.cpp
index c3b4392181..3a6c35f698 100644
--- a/samples/widgets/textctrl.cpp
+++ b/samples/widgets/textctrl.cpp
@@ -633,7 +633,7 @@ void TextWidgetsPage::CreateText()
             break;
 
         case WrapStyle_Char:
-            flags |= wxTE_LINEWRAP;
+            flags |= wxTE_CHARWRAP;
             break;
 
         case WrapStyle_Best:
diff --git a/src/common/txtstrm.cpp b/src/common/txtstrm.cpp
index 20b583604c..1894757f21 100644
--- a/src/common/txtstrm.cpp
+++ b/src/common/txtstrm.cpp
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        txtstrm.cpp
+// Name:        src/common/txtstrm.cpp
 // Purpose:     Text stream classes
 // Author:      Guilhem Lavaux
 // Modified by:
@@ -178,11 +178,15 @@ double wxTextInputStream::ReadDouble()
     return wxStrtod(word.c_str(), 0);
 }
 
+#if WXWIN_COMPATIBILITY_2_6
+
 wxString wxTextInputStream::ReadString()
 {
     return ReadLine();
 }
 
+#endif // WXWIN_COMPATIBILITY_2_6
+
 wxString wxTextInputStream::ReadLine()
 {
     wxString line;
diff --git a/src/common/valgen.cpp b/src/common/valgen.cpp
index 505d8321a9..ff8d3faf6f 100644
--- a/src/common/valgen.cpp
+++ b/src/common/valgen.cpp
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        valgen.cpp
+// Name:        src/common/valgen.cpp
 // Purpose:     wxGenericValidator class
 // Author:      Kevin Smith
 // Modified by:
@@ -131,11 +131,11 @@ bool wxGenericValidator::TransferToWindow(void)
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxToggleButton)) )
     {
         wxToggleButton * pControl = (wxToggleButton *) m_validatorWindow;
-	if (m_pBool)
-	{
-	    pControl->SetValue(*m_pBool);
-	    return true;
-	}
+        if (m_pBool)
+        {
+            pControl->SetValue(*m_pBool);
+            return true;
+        }
     } else
 #endif
 
@@ -375,12 +375,12 @@ bool wxGenericValidator::TransferFromWindow(void)
 #if wxUSE_TOGGLEBTN
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxToggleButton)) )
     {
-	wxToggleButton *pControl = (wxToggleButton *) m_validatorWindow;
-	if (m_pBool)
-	{
-	    *m_pBool = pControl->GetValue() ;
-	    return true;
-	}
+        wxToggleButton *pControl = (wxToggleButton *) m_validatorWindow;
+        if (m_pBool)
+        {
+            *m_pBool = pControl->GetValue() ;
+            return true;
+        }
     } else
 #endif
 
@@ -567,7 +567,7 @@ bool wxGenericValidator::TransferFromWindow(void)
                    count = pControl->GetCount();
             for ( i = 0; i < count; i++ )
             {
-                if (pControl->Selected(i))
+                if (pControl->IsSelected(i))
                     m_pArrayInt->Add(i);
             }
 
@@ -595,4 +595,3 @@ void wxGenericValidator::Initialize()
 
 #endif
   // wxUSE_VALIDATORS
-
diff --git a/src/common/variant.cpp b/src/common/variant.cpp
index 7afa1c3183..5df645bb83 100644
--- a/src/common/variant.cpp
+++ b/src/common/variant.cpp
@@ -797,7 +797,7 @@ bool wxVariantDataString::Read(wxInputStream& str)
 {
     wxTextInputStream s(str);
 
-    m_value = s.ReadString();
+    m_value = s.ReadLine();
     return true;
 }
 #endif // wxUSE_STREAMS
diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp
index 96d9a13b64..b01e767cfb 100644
--- a/src/msw/dialog.cpp
+++ b/src/msw/dialog.cpp
@@ -200,6 +200,8 @@ bool wxDialog::Create(wxWindow *parent,
     return true;
 }
 
+#if WXWIN_COMPATIBILITY_2_6
+
 // deprecated ctor
 wxDialog::wxDialog(wxWindow *parent,
                    const wxString& title,
@@ -221,6 +223,8 @@ void wxDialog::SetModal(bool WXUNUSED(flag))
     // nothing to do, obsolete method
 }
 
+#endif // WXWIN_COMPATIBILITY_2_6
+
 wxDialog::~wxDialog()
 {
     m_isBeingDeleted = true;
@@ -233,11 +237,15 @@ wxDialog::~wxDialog()
 // showing the dialogs
 // ----------------------------------------------------------------------------
 
+#if WXWIN_COMPATIBILITY_2_6
+
 bool wxDialog::IsModalShowing() const
 {
     return IsModal();
 }
 
+#endif // WXWIN_COMPATIBILITY_2_6
+
 wxWindow *wxDialog::FindSuitableParent() const
 {
     // first try to use the currently active window
diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp
index e3ea695d8a..2c7a7e6bec 100644
--- a/src/msw/gauge95.cpp
+++ b/src/msw/gauge95.cpp
@@ -95,7 +95,9 @@ wxBEGIN_FLAGS( wxGaugeStyle )
 
     wxFLAGS_MEMBER(wxGA_HORIZONTAL)
     wxFLAGS_MEMBER(wxGA_VERTICAL)
+#if WXWIN_COMPATIBILITY_2_6
     wxFLAGS_MEMBER(wxGA_PROGRESSBAR)
+#endif // WXWIN_COMPATIBILITY_2_6
     wxFLAGS_MEMBER(wxGA_SMOOTH)
 
 wxEND_FLAGS( wxGaugeStyle )
@@ -217,4 +219,3 @@ bool wxGauge95::SetBackgroundColour(const wxColour& col)
 }
 
 #endif // wxUSE_GAUGE
-
diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp
index 3524895a5f..64051935b0 100644
--- a/src/msw/listctrl.cpp
+++ b/src/msw/listctrl.cpp
@@ -1063,11 +1063,15 @@ wxSize wxListCtrl::GetItemSpacing() const
     return wxSize(LOWORD(spacing), HIWORD(spacing));
 }
 
+#if WXWIN_COMPATIBILITY_2_6
+
 int wxListCtrl::GetItemSpacing(bool isSmall) const
 {
     return ListView_GetItemSpacing(GetHwnd(), (BOOL) isSmall);
 }
 
+#endif // WXWIN_COMPATIBILITY_2_6
+
 void wxListCtrl::SetItemTextColour( long item, const wxColour &col )
 {
     wxListItem info;
diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp
index 9630d087b9..c2c88e5525 100644
--- a/src/msw/textctrl.cpp
+++ b/src/msw/textctrl.cpp
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        msw/textctrl.cpp
+// Name:        src/msw/textctrl.cpp
 // Purpose:     wxTextCtrl
 // Author:      Julian Smart
 // Modified by:
@@ -206,7 +206,7 @@ wxBEGIN_FLAGS( wxTextCtrlStyle )
     wxFLAGS_MEMBER(wxTE_CENTRE)
     wxFLAGS_MEMBER(wxTE_RIGHT)
     wxFLAGS_MEMBER(wxTE_DONTWRAP)
-    wxFLAGS_MEMBER(wxTE_LINEWRAP)
+    wxFLAGS_MEMBER(wxTE_CHARWRAP)
     wxFLAGS_MEMBER(wxTE_WORDWRAP)
 
 wxEND_FLAGS( wxTextCtrlStyle )
@@ -372,7 +372,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
         if (!IsInkEdit())
         {
             if ( m_verRichEdit == 2 )
-            {            
+            {
                 if ( wxRichEditModule::Load(wxRichEditModule::Version_41) )
                 {
                     // yes, class name for version 4.1 really is 5.0
@@ -414,7 +414,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
                     m_verRichEdit = 0;
                 }
             }
-        } // !useInkEdit 
+        } // !useInkEdit
     }
 #endif // wxUSE_RICHEDIT
 
@@ -441,12 +441,12 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
             // Pass IEM_InsertText (0) as wParam, in order to have the ink always
             // converted to text.
             ::SendMessage(GetHwnd(), EM_SETINKINSERTMODE, 0, 0);
-            
+
             // Make sure the mouse can be used for input
             ::SendMessage(GetHwnd(), EM_SETUSEMOUSEFORINPUT, 1, 0);
         }
 #endif
-        
+
         // enable the events we're interested in: we want to get EN_CHANGE as
         // for the normal controls
         LPARAM mask = ENM_CHANGE;
@@ -2773,9 +2773,9 @@ bool wxRichEditModule::LoadInkEdit()
     static bool             ms_inkEditLibLoadAttemped;
     if (ms_inkEditLibLoadAttemped)
         ms_inkEditLib.IsLoaded();
-    
+
     ms_inkEditLibLoadAttemped = true;
-    
+
     wxLogNull logNull;
     return ms_inkEditLib.Load(wxT("inked"));
 }
diff --git a/src/palmos/gauge.cpp b/src/palmos/gauge.cpp
index 8cc132983f..157c7b9294 100644
--- a/src/palmos/gauge.cpp
+++ b/src/palmos/gauge.cpp
@@ -90,7 +90,6 @@ wxBEGIN_FLAGS( wxGaugeStyle )
 
     wxFLAGS_MEMBER(wxGA_HORIZONTAL)
     wxFLAGS_MEMBER(wxGA_VERTICAL)
-    wxFLAGS_MEMBER(wxGA_PROGRESSBAR)
     wxFLAGS_MEMBER(wxGA_SMOOTH)
 
 wxEND_FLAGS( wxGaugeStyle )
@@ -170,4 +169,3 @@ bool wxGauge::SetBackgroundColour(const wxColour& col)
 }
 
 #endif // wxUSE_GAUGE
-
diff --git a/src/palmos/textctrl.cpp b/src/palmos/textctrl.cpp
index d6473c6d3c..1e572769a5 100644
--- a/src/palmos/textctrl.cpp
+++ b/src/palmos/textctrl.cpp
@@ -134,7 +134,7 @@ wxBEGIN_FLAGS( wxTextCtrlStyle )
     wxFLAGS_MEMBER(wxTE_CENTRE)
     wxFLAGS_MEMBER(wxTE_RIGHT)
     wxFLAGS_MEMBER(wxTE_DONTWRAP)
-    wxFLAGS_MEMBER(wxTE_LINEWRAP)
+    wxFLAGS_MEMBER(wxTE_CHARWRAP)
     wxFLAGS_MEMBER(wxTE_WORDWRAP)
 
 wxEND_FLAGS( wxTextCtrlStyle )
diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp
index 1d7c6567d9..e6543e5bd1 100644
--- a/src/univ/textctrl.cpp
+++ b/src/univ/textctrl.cpp
@@ -2683,7 +2683,7 @@ size_t wxTextCtrl::GetPartOfWrappedLine(const wxChar* text,
                 //else: we can just see it
 
                 // wrap at any character or only at words boundaries?
-                if ( !(GetWindowStyle() & wxTE_LINEWRAP) )
+                if ( !(GetWindowStyle() & wxTE_CHARWRAP) )
                 {
                     // find the (last) not word char before this word
                     wxTextCoord colWordStart;
diff --git a/src/xrc/xh_gauge.cpp b/src/xrc/xh_gauge.cpp
index 832c7e3960..2b8a9b9791 100644
--- a/src/xrc/xh_gauge.cpp
+++ b/src/xrc/xh_gauge.cpp
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        xh_gauge.cpp
+// Name:        src/xrc/xh_gauge.cpp
 // Purpose:     XRC resource for wxGauge
 // Author:      Bob Mitchell
 // Created:     2000/03/21
@@ -27,7 +27,9 @@ wxGaugeXmlHandler::wxGaugeXmlHandler()
 {
     XRC_ADD_STYLE(wxGA_HORIZONTAL);
     XRC_ADD_STYLE(wxGA_VERTICAL);
+#if WXWIN_COMPATIBILITY_2_6
     XRC_ADD_STYLE(wxGA_PROGRESSBAR);
+#endif // WXWIN_COMPATIBILITY_2_6
     XRC_ADD_STYLE(wxGA_SMOOTH);   // windows only
     AddWindowStyles();
 }
diff --git a/src/xrc/xh_split.cpp b/src/xrc/xh_split.cpp
index b3ba2adec8..f9e89a36bd 100644
--- a/src/xrc/xh_split.cpp
+++ b/src/xrc/xh_split.cpp
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        xh_split.cpp
+// Name:        src/xrc/xh_split.cpp
 // Purpose:     XRC resource for wxSplitterWindow
 // Author:      panga@freemail.hu, Vaclav Slavik
 // Created:     2003/01/26
@@ -28,7 +28,9 @@ wxSplitterWindowXmlHandler::wxSplitterWindowXmlHandler() : wxXmlResourceHandler(
     XRC_ADD_STYLE(wxSP_3D);
     XRC_ADD_STYLE(wxSP_3DSASH);
     XRC_ADD_STYLE(wxSP_3DBORDER);
+#if WXWIN_COMPATIBILITY_2_6
     XRC_ADD_STYLE(wxSP_FULLSASH);
+#endif // WXWIN_COMPATIBILITY_2_6
     XRC_ADD_STYLE(wxSP_BORDER);
     XRC_ADD_STYLE(wxSP_NOBORDER);
     XRC_ADD_STYLE(wxSP_PERMIT_UNSPLIT);
diff --git a/src/xrc/xh_text.cpp b/src/xrc/xh_text.cpp
index 7adc43d65a..fa824f48cb 100644
--- a/src/xrc/xh_text.cpp
+++ b/src/xrc/xh_text.cpp
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        xh_text.cpp
+// Name:        src/xrc/xh_text.cpp
 // Purpose:     XRC resource for wxTextCtrl
 // Author:      Aleksandras Gluchovas
 // Created:     2000/03/21
@@ -40,7 +40,10 @@ wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler()
     XRC_ADD_STYLE(wxTE_CENTRE);
     XRC_ADD_STYLE(wxTE_RIGHT);
     XRC_ADD_STYLE(wxTE_DONTWRAP);
+#if WXWIN_COMPATIBILITY_2_6
     XRC_ADD_STYLE(wxTE_LINEWRAP);
+#endif // WXWIN_COMPATIBILITY_2_6
+    XRC_ADD_STYLE(wxTE_CHARWRAP);
     XRC_ADD_STYLE(wxTE_WORDWRAP);
     AddWindowStyles();
 }
diff --git a/utils/configtool/src/propeditor.cpp b/utils/configtool/src/propeditor.cpp
index 286f9d438e..db938dfd65 100644
--- a/utils/configtool/src/propeditor.cpp
+++ b/utils/configtool/src/propeditor.cpp
@@ -81,7 +81,7 @@ void ctPropertyEditor::CreateControls(wxWindow* parent)
     // TODO: find sash pos from last time
     int sashPos = 100;
 
-    m_splitterWindow = new wxSplitterWindow(parent, ctID_PROPERTY_EDITOR_SPLITTER, wxDefaultPosition, wxSize(500, 400), wxSP_3DSASH|wxSP_FULLSASH/*|wxCLIP_CHILDREN*/ |wxBORDER_NONE|wxNO_FULL_REPAINT_ON_RESIZE);
+    m_splitterWindow = new wxSplitterWindow(parent, ctID_PROPERTY_EDITOR_SPLITTER, wxDefaultPosition, wxSize(500, 400), wxSP_3DSASH/*|wxCLIP_CHILDREN*/ |wxBORDER_NONE|wxNO_FULL_REPAINT_ON_RESIZE);
     m_splitterWindow->SetMinimumPaneSize(10);
 
     m_propertyDescriptionWindow = new wxHtmlWindow(m_splitterWindow, ctID_ATTRIBUTE_EDITOR_DESCRIPTION, wxDefaultPosition, wxSize(200, 60), wxSUNKEN_BORDER);
diff --git a/utils/configtool/src/wxconfigtool.pjd b/utils/configtool/src/wxconfigtool.pjd
index a4db7112c0..2f2c8d591b 100644
--- a/utils/configtool/src/wxconfigtool.pjd
+++ b/utils/configtool/src/wxconfigtool.pjd
@@ -891,7 +891,7 @@ list below.</value>
 							<value name="proxy-wxTE_CENTRE" type="bool">FALSE</value>
 							<value name="proxy-wxTE_RIGHT" type="bool">FALSE</value>
 							<value name="proxy-wxHSCROLL" type="bool">FALSE</value>
-							<value name="proxy-wxTE_LINEWRAP" type="bool">FALSE</value>
+							<value name="proxy-wxTE_CHARWRAP" type="bool">FALSE</value>
 							<value name="proxy-wxTE_WORDWRAP" type="bool">FALSE</value>
 							<value name="proxy-wxNO_BORDER" type="bool">FALSE</value>
 							<value name="proxy-wxSIMPLE_BORDER" type="bool">FALSE</value>
@@ -1450,7 +1450,7 @@ list below.</value>
 							<value name="proxy-wxTE_CENTRE" type="bool">FALSE</value>
 							<value name="proxy-wxTE_RIGHT" type="bool">FALSE</value>
 							<value name="proxy-wxHSCROLL" type="bool">FALSE</value>
-							<value name="proxy-wxTE_LINEWRAP" type="bool">FALSE</value>
+							<value name="proxy-wxTE_CHARWRAP" type="bool">FALSE</value>
 							<value name="proxy-wxTE_WORDWRAP" type="bool">FALSE</value>
 							<value name="proxy-wxNO_BORDER" type="bool">FALSE</value>
 							<value name="proxy-wxSIMPLE_BORDER" type="bool">FALSE</value>
@@ -2238,7 +2238,7 @@ list below.</value>
 											<value name="proxy-wxTE_CENTRE" type="bool">FALSE</value>
 											<value name="proxy-wxTE_RIGHT" type="bool">FALSE</value>
 											<value name="proxy-wxHSCROLL" type="bool">FALSE</value>
-											<value name="proxy-wxTE_LINEWRAP" type="bool">FALSE</value>
+											<value name="proxy-wxTE_CHARWRAP" type="bool">FALSE</value>
 											<value name="proxy-wxTE_WORDWRAP" type="bool">FALSE</value>
 											<value name="proxy-wxNO_BORDER" type="bool">FALSE</value>
 											<value name="proxy-wxSIMPLE_BORDER" type="bool">FALSE</value>
@@ -2714,7 +2714,6 @@ list below.</value>
 						<value name="proxy-wxSP_3DBORDER" type="bool">TRUE</value>
 						<value name="proxy-wxSP_BORDER" type="bool">FALSE</value>
 						<value name="proxy-wxSP_3DSASH" type="bool">TRUE</value>
-						<value name="proxy-wxSP_FULLSASH" type="bool">FALSE</value>
 						<value name="proxy-wxSP_PERMIT_UNSPLIT" type="bool">FALSE</value>
 						<value name="proxy-wxSP_LIVE_UPDATE " type="bool">FALSE</value>
 						<value name="proxy-wxNO_BORDER" type="bool">TRUE</value>
@@ -3175,7 +3174,7 @@ list below.</value>
 									<value name="proxy-wxTE_CENTRE" type="bool">FALSE</value>
 									<value name="proxy-wxTE_RIGHT" type="bool">FALSE</value>
 									<value name="proxy-wxHSCROLL" type="bool">FALSE</value>
-									<value name="proxy-wxTE_LINEWRAP" type="bool">FALSE</value>
+									<value name="proxy-wxTE_CHARWRAP" type="bool">FALSE</value>
 									<value name="proxy-wxTE_WORDWRAP" type="bool">FALSE</value>
 									<value name="proxy-wxNO_BORDER" type="bool">FALSE</value>
 									<value name="proxy-wxSIMPLE_BORDER" type="bool">FALSE</value>
diff --git a/utils/tex2rtf/src/tex2rtf.cpp b/utils/tex2rtf/src/tex2rtf.cpp
index e92fc999cc..75a889fb4f 100644
--- a/utils/tex2rtf/src/tex2rtf.cpp
+++ b/utils/tex2rtf/src/tex2rtf.cpp
@@ -955,7 +955,7 @@ bool Go(void)
     frame->SetTitle(buf);
   }
 
-  wxStartTimer();
+  wxLongLong localTime = wxGetLocalTimeMillis();
 #endif
 
   // Find extension-less filename
@@ -1057,8 +1057,8 @@ bool Go(void)
 
     wxString buf;
 #ifndef NO_GUI
-    long tim = wxGetElapsedTime();
-    buf.Printf(_T("Finished PASS #%d in %ld seconds.\n"), passNumber, (long)(tim/1000.0));
+    wxLongLong elapsed = wxGetLocalTimeMillis() - localTime;
+    buf.Printf(_T("Finished PASS #%d in %ld seconds.\n"), passNumber, (long)(elapsed.GetLo()/1000.0));
     OnInform((wxChar *)buf.c_str());
 
     if (errorCount)
-- 
2.47.2