From 55b43eaa025408453e90a6c01f64215a9203da9a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 4 Aug 2006 11:10:53 +0000 Subject: [PATCH] undid last change and removed wxTE/CB_FILENAME style, after looking at GTK+ API it seems that this is not the correct way to do this git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 - docs/latex/wx/combobox.tex | 3 --- docs/latex/wx/text.tex | 3 --- include/wx/defs.h | 1 - include/wx/pickerbase.h | 3 +-- include/wx/textctrl.h | 1 - samples/widgets/combobox.cpp | 8 ++++++-- samples/widgets/textctrl.cpp | 8 ++++++-- src/common/filepickercmn.cpp | 2 +- src/common/pickerbase.cpp | 5 ++--- src/xrc/xh_combo.cpp | 1 - src/xrc/xh_text.cpp | 1 - 12 files changed, 16 insertions(+), 21 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 10e7fb172b..9f6a4f3084 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -99,7 +99,6 @@ All (GUI): - Added wxDC::GradientFillLinear/Concentric(). - Added wxHyperlinkCtrl (Francesco Montorsi). - Added clipboard events (wxEVT_COMMAND_TEXT_COPY/CUT/PASTE). -- Added wxTE_FILENAME and wxCB_FILENAME (MSW-only for now) - Allow to reorder wxGrid columns by drag-and-drop (Santiago Palacios). - Added wxRadioBox::SetItemToolTip(). - Added support for CMYK JPEG images loading (Robert Wruck). diff --git a/docs/latex/wx/combobox.tex b/docs/latex/wx/combobox.tex index 3272ba83a2..c74acfe298 100644 --- a/docs/latex/wx/combobox.tex +++ b/docs/latex/wx/combobox.tex @@ -31,9 +31,6 @@ select (even from a program) a string which is not in the choices list.} the event wxEVT\_COMMAND\_TEXT\_ENTER (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). Windows only.} -\twocolitem{\windowstyle{wxTE\_FILENAME}}{Should be used for the controls -containing file names. This currently just enables file names auto-completion -(and only under Windows for now) but can have other effects in the future.} \end{twocollist} See also \helpref{window styles overview}{windowstyles}. diff --git a/docs/latex/wx/text.tex b/docs/latex/wx/text.tex index e44427d4ff..5992858843 100644 --- a/docs/latex/wx/text.tex +++ b/docs/latex/wx/text.tex @@ -53,9 +53,6 @@ used, so that text won't be wrapped. No effect under wxGTK1.} \twocolitem{\windowstyle{wxTE\_WORDWRAP}}{Wrap the lines too long to be shown entirely at word boundaries (wxUniv and wxGTK2 only).} \twocolitem{\windowstyle{wxTE\_BESTWRAP}}{Wrap the lines at word boundaries or at any other character if there are words longer than the window width (this is the default).} \twocolitem{\windowstyle{wxTE\_CAPITALIZE}}{On PocketPC and Smartphone, causes the first letter to be capitalized.} -\twocolitem{\windowstyle{wxTE\_FILENAME}}{Should be used for the text controls -containing file names. This currently just enables file names auto-completion -(and only under Windows for now) but can have other effects in the future.} \end{twocollist} See also \helpref{window styles overview}{windowstyles} and \helpref{wxTextCtrl::wxTextCtrl}{wxtextctrlctor}. diff --git a/include/wx/defs.h b/include/wx/defs.h index 49d2e48db3..021c098b39 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -1577,7 +1577,6 @@ enum wxBorder #define wxCB_SORT 0x0008 #define wxCB_READONLY 0x0010 #define wxCB_DROPDOWN 0x0020 -#define wxCB_FILENAME 0x0040 /* * wxRadioBox style flags diff --git a/include/wx/pickerbase.h b/include/wx/pickerbase.h index e6a441fc26..9cf2822c60 100644 --- a/include/wx/pickerbase.h +++ b/include/wx/pickerbase.h @@ -48,8 +48,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr, - long textstyle = 0); + const wxString& name = wxButtonNameStr); public: // public API diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index 86079e2ded..83dcaeecb4 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -73,7 +73,6 @@ const wxTextCoord wxInvalidTextCoord = -2; // wxTextCtrl style flags // ---------------------------------------------------------------------------- -#define wxTE_FILENAME 0x0001 #define wxTE_NO_VSCROLL 0x0002 #define wxTE_AUTO_SCROLL 0x0008 diff --git a/samples/widgets/combobox.cpp b/samples/widgets/combobox.cpp index 4d2e59e1c6..5485a1b09f 100644 --- a/samples/widgets/combobox.cpp +++ b/samples/widgets/combobox.cpp @@ -250,6 +250,7 @@ void ComboboxWidgetsPage::CreateContent() m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Sort items")); m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Read only")); m_chkFilename = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&File name")); + m_chkFilename->Disable(); // not implemented yet sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer sizerLeft->Add(m_radioKind, 0, wxGROW | wxALL, 5); @@ -357,8 +358,6 @@ void ComboboxWidgetsPage::CreateCombo() flags |= wxCB_SORT; if ( m_chkReadonly->GetValue() ) flags |= wxCB_READONLY; - if ( m_chkFilename->GetValue() ) - flags |= wxCB_FILENAME; switch ( m_radioKind->GetSelection() ) { @@ -396,6 +395,11 @@ void ComboboxWidgetsPage::CreateCombo() 0, NULL, flags); +#if 0 + if ( m_chkFilename->GetValue() ) + ; +#endif // TODO + unsigned int count = items.GetCount(); for ( unsigned int n = 0; n < count; n++ ) { diff --git a/samples/widgets/textctrl.cpp b/samples/widgets/textctrl.cpp index 7d0536507a..c1e6afb816 100644 --- a/samples/widgets/textctrl.cpp +++ b/samples/widgets/textctrl.cpp @@ -412,6 +412,7 @@ void TextWidgetsPage::CreateContent() m_chkFilename = CreateCheckBoxAndAddToSizer( sizerLeft, _T("&Filename control") ); + m_chkFilename->Disable(); // not implemented yet sizerLeft->AddSpacer(5); static const wxString wrap[] = @@ -641,8 +642,6 @@ void TextWidgetsPage::CreateText() flags |= wxTE_PASSWORD; if ( m_chkReadonly->GetValue() ) flags |= wxTE_READONLY; - if ( m_chkFilename->GetValue() ) - flags |= wxTE_FILENAME; switch ( m_radioWrap->GetSelection() ) { @@ -701,6 +700,11 @@ void TextWidgetsPage::CreateText() m_text = new WidgetsTextCtrl(this, TextPage_Textctrl, valueOld, flags); +#if 0 + if ( m_chkFilename->GetValue() ) + ; +#endif // TODO + // cast to int needed to silence gcc warning about different enums m_sizerText->Add(m_text, 1, wxALL | (flags & wxTE_MULTILINE ? (int)wxGROW diff --git a/src/common/filepickercmn.cpp b/src/common/filepickercmn.cpp index 1282f2386d..1e85b13f3c 100644 --- a/src/common/filepickercmn.cpp +++ b/src/common/filepickercmn.cpp @@ -59,7 +59,7 @@ bool wxFileDirPickerCtrlBase::CreateBase(wxWindow *parent, wxASSERT_MSG(path.empty() || CheckPath(path), wxT("Invalid initial path!")); if (!wxPickerBase::CreateBase(parent, id, path, pos, size, - style, validator, name, wxTE_FILENAME)) + style, validator, name)) return false; if (!HasFlag(wxFLP_OPEN) && !HasFlag(wxFLP_SAVE)) diff --git a/src/common/pickerbase.cpp b/src/common/pickerbase.cpp index db435a8eca..cc35df3255 100644 --- a/src/common/pickerbase.cpp +++ b/src/common/pickerbase.cpp @@ -59,8 +59,7 @@ bool wxPickerBase::CreateBase(wxWindow *parent, const wxSize& size, long style, const wxValidator& validator, - const wxString& name, - long textstyle) + const wxString& name) { // remove any border style from our style as wxPickerBase's window must be // invisible (user styles must be set on the textctrl or the platform-dependent picker) @@ -78,7 +77,7 @@ bool wxPickerBase::CreateBase(wxWindow *parent, // the styles related to the textctrl from the styles passed here m_text = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, - GetTextCtrlStyle(style) | textstyle); + GetTextCtrlStyle(style)); if (!m_text) { wxFAIL_MSG( wxT("wxPickerBase's textctrl creation failed") ); diff --git a/src/xrc/xh_combo.cpp b/src/xrc/xh_combo.cpp index 119afc17fe..6950cfc198 100644 --- a/src/xrc/xh_combo.cpp +++ b/src/xrc/xh_combo.cpp @@ -34,7 +34,6 @@ wxComboBoxXmlHandler::wxComboBoxXmlHandler() XRC_ADD_STYLE(wxCB_SORT); XRC_ADD_STYLE(wxCB_READONLY); XRC_ADD_STYLE(wxCB_DROPDOWN); - XRC_ADD_STYLE(wxCB_FILENAME); AddWindowStyles(); } diff --git a/src/xrc/xh_text.cpp b/src/xrc/xh_text.cpp index 0fa4c91eb0..e369cb4f79 100644 --- a/src/xrc/xh_text.cpp +++ b/src/xrc/xh_text.cpp @@ -27,7 +27,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxTextCtrlXmlHandler, wxXmlResourceHandler) wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler() { - XRC_ADD_STYLE(wxTE_FILENAME); XRC_ADD_STYLE(wxTE_NO_VSCROLL); XRC_ADD_STYLE(wxTE_AUTO_SCROLL); XRC_ADD_STYLE(wxTE_PROCESS_ENTER); -- 2.45.2