From 053ac76fa2b4bd461c88258ab642f7804da88e80 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 28 Jun 2008 18:18:54 +0000 Subject: [PATCH] deprecate wxTE_AUTO_SCROLL as it's always on in the ports which support it anyhow (#2176) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 2 +- docs/doxygen/overviews/changes_since28.h | 4 ++++ include/wx/textctrl.h | 6 +++++- src/generic/grid.cpp | 5 +---- src/xrc/xh_text.cpp | 7 ++++++- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 650b4af487..2debff6ff7 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -225,7 +225,7 @@ Deprecated methods and their replacements passed to it was interpreted in physical, not logical, coordinates. Replace it with SetDeviceClippingRegion() if this was the correct thing to do in your code. - +- wxTE_AUTO_SCROLL style is deprecated as it's always on by default anyhow. Major new features in this release diff --git a/docs/doxygen/overviews/changes_since28.h b/docs/doxygen/overviews/changes_since28.h index 286671a76a..b8b087624e 100644 --- a/docs/doxygen/overviews/changes_since28.h +++ b/docs/doxygen/overviews/changes_since28.h @@ -149,5 +149,9 @@ Finally, a few structure fields, notable @c wxCmdLineEntryDesc::shortName, Of course, this will change the format of the wxConfig output which may be undesirable. + +- wxTE_AUTO_SCROLL style is deprecated as it's always on by default anyhow in + the ports which support it so you should simply remove any mentions of it + from your code. */ diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index 0aae25a479..d92157292a 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -65,7 +65,6 @@ const wxTextCoord wxInvalidTextCoord = -2; // ---------------------------------------------------------------------------- #define wxTE_NO_VSCROLL 0x0002 -#define wxTE_AUTO_SCROLL 0x0008 #define wxTE_READONLY 0x0010 #define wxTE_MULTILINE 0x0020 @@ -108,6 +107,11 @@ const wxTextCoord wxInvalidTextCoord = -2; #define wxTE_LINEWRAP wxTE_CHARWRAP #endif // WXWIN_COMPATIBILITY_2_6 +#if WXWIN_COMPATIBILITY_2_8 + // this style is (or at least should be) on by default now, don't use it + #define wxTE_AUTO_SCROLL 0 +#endif // WXWIN_COMPATIBILITY_2_8 + // 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 #define wxTE_RICH2 0x8000 diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index e6eb4b3a83..bc42be31a1 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -672,10 +672,7 @@ void wxGridCellTextEditor::DoCreate(wxWindow* parent, wxEvtHandler* evtHandler, long style) { - style |= wxTE_PROCESS_ENTER | - wxTE_PROCESS_TAB | - wxTE_AUTO_SCROLL | - wxNO_BORDER; + style |= wxTE_PROCESS_ENTER | wxTE_PROCESS_TAB | wxNO_BORDER; m_control = new wxTextCtrl(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, diff --git a/src/xrc/xh_text.cpp b/src/xrc/xh_text.cpp index e369cb4f79..c9ffadfcc9 100644 --- a/src/xrc/xh_text.cpp +++ b/src/xrc/xh_text.cpp @@ -28,7 +28,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxTextCtrlXmlHandler, wxXmlResourceHandler) wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler() { XRC_ADD_STYLE(wxTE_NO_VSCROLL); - XRC_ADD_STYLE(wxTE_AUTO_SCROLL); XRC_ADD_STYLE(wxTE_PROCESS_ENTER); XRC_ADD_STYLE(wxTE_PROCESS_TAB); XRC_ADD_STYLE(wxTE_MULTILINE); @@ -48,6 +47,12 @@ wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler() #endif // WXWIN_COMPATIBILITY_2_6 XRC_ADD_STYLE(wxTE_CHARWRAP); XRC_ADD_STYLE(wxTE_WORDWRAP); + + // this style doesn't exist since wx 2.9.0 but we still support it (by + // ignoring it silently) in XRC files to avoid unimportant warnings when + // using XRC produced by old tools + AddStyle(_T("wxTE_AUTO_SCROLL"), 0); + AddWindowStyles(); } -- 2.45.2