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
This commit is contained in:
Vadim Zeitlin
2006-08-04 11:10:53 +00:00
parent 01fdd95507
commit 55b43eaa02
12 changed files with 16 additions and 21 deletions

View File

@@ -99,7 +99,6 @@ All (GUI):
- Added wxDC::GradientFillLinear/Concentric(). - Added wxDC::GradientFillLinear/Concentric().
- Added wxHyperlinkCtrl (Francesco Montorsi). - Added wxHyperlinkCtrl (Francesco Montorsi).
- Added clipboard events (wxEVT_COMMAND_TEXT_COPY/CUT/PASTE). - 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). - Allow to reorder wxGrid columns by drag-and-drop (Santiago Palacios).
- Added wxRadioBox::SetItemToolTip(). - Added wxRadioBox::SetItemToolTip().
- Added support for CMYK JPEG images loading (Robert Wruck). - Added support for CMYK JPEG images loading (Robert Wruck).

View File

@@ -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 the event wxEVT\_COMMAND\_TEXT\_ENTER (otherwise pressing Enter key
is either processed internally by the control or used for navigation between is either processed internally by the control or used for navigation between
dialog controls). Windows only.} 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} \end{twocollist}
See also \helpref{window styles overview}{windowstyles}. See also \helpref{window styles overview}{windowstyles}.

View File

@@ -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\_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\_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\_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} \end{twocollist}
See also \helpref{window styles overview}{windowstyles} and \helpref{wxTextCtrl::wxTextCtrl}{wxtextctrlctor}. See also \helpref{window styles overview}{windowstyles} and \helpref{wxTextCtrl::wxTextCtrl}{wxtextctrlctor}.

View File

@@ -1577,7 +1577,6 @@ enum wxBorder
#define wxCB_SORT 0x0008 #define wxCB_SORT 0x0008
#define wxCB_READONLY 0x0010 #define wxCB_READONLY 0x0010
#define wxCB_DROPDOWN 0x0020 #define wxCB_DROPDOWN 0x0020
#define wxCB_FILENAME 0x0040
/* /*
* wxRadioBox style flags * wxRadioBox style flags

View File

@@ -48,8 +48,7 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr, const wxString& name = wxButtonNameStr);
long textstyle = 0);
public: // public API public: // public API

View File

@@ -73,7 +73,6 @@ const wxTextCoord wxInvalidTextCoord = -2;
// wxTextCtrl style flags // wxTextCtrl style flags
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#define wxTE_FILENAME 0x0001
#define wxTE_NO_VSCROLL 0x0002 #define wxTE_NO_VSCROLL 0x0002
#define wxTE_AUTO_SCROLL 0x0008 #define wxTE_AUTO_SCROLL 0x0008

View File

@@ -250,6 +250,7 @@ void ComboboxWidgetsPage::CreateContent()
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Sort items")); m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Sort items"));
m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Read only")); m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Read only"));
m_chkFilename = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&File name")); m_chkFilename = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&File name"));
m_chkFilename->Disable(); // not implemented yet
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
sizerLeft->Add(m_radioKind, 0, wxGROW | wxALL, 5); sizerLeft->Add(m_radioKind, 0, wxGROW | wxALL, 5);
@@ -357,8 +358,6 @@ void ComboboxWidgetsPage::CreateCombo()
flags |= wxCB_SORT; flags |= wxCB_SORT;
if ( m_chkReadonly->GetValue() ) if ( m_chkReadonly->GetValue() )
flags |= wxCB_READONLY; flags |= wxCB_READONLY;
if ( m_chkFilename->GetValue() )
flags |= wxCB_FILENAME;
switch ( m_radioKind->GetSelection() ) switch ( m_radioKind->GetSelection() )
{ {
@@ -396,6 +395,11 @@ void ComboboxWidgetsPage::CreateCombo()
0, NULL, 0, NULL,
flags); flags);
#if 0
if ( m_chkFilename->GetValue() )
;
#endif // TODO
unsigned int count = items.GetCount(); unsigned int count = items.GetCount();
for ( unsigned int n = 0; n < count; n++ ) for ( unsigned int n = 0; n < count; n++ )
{ {

View File

@@ -412,6 +412,7 @@ void TextWidgetsPage::CreateContent()
m_chkFilename = CreateCheckBoxAndAddToSizer( m_chkFilename = CreateCheckBoxAndAddToSizer(
sizerLeft, _T("&Filename control") sizerLeft, _T("&Filename control")
); );
m_chkFilename->Disable(); // not implemented yet
sizerLeft->AddSpacer(5); sizerLeft->AddSpacer(5);
static const wxString wrap[] = static const wxString wrap[] =
@@ -641,8 +642,6 @@ void TextWidgetsPage::CreateText()
flags |= wxTE_PASSWORD; flags |= wxTE_PASSWORD;
if ( m_chkReadonly->GetValue() ) if ( m_chkReadonly->GetValue() )
flags |= wxTE_READONLY; flags |= wxTE_READONLY;
if ( m_chkFilename->GetValue() )
flags |= wxTE_FILENAME;
switch ( m_radioWrap->GetSelection() ) switch ( m_radioWrap->GetSelection() )
{ {
@@ -701,6 +700,11 @@ void TextWidgetsPage::CreateText()
m_text = new WidgetsTextCtrl(this, TextPage_Textctrl, valueOld, flags); 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 // cast to int needed to silence gcc warning about different enums
m_sizerText->Add(m_text, 1, wxALL | m_sizerText->Add(m_text, 1, wxALL |
(flags & wxTE_MULTILINE ? (int)wxGROW (flags & wxTE_MULTILINE ? (int)wxGROW

View File

@@ -59,7 +59,7 @@ bool wxFileDirPickerCtrlBase::CreateBase(wxWindow *parent,
wxASSERT_MSG(path.empty() || CheckPath(path), wxT("Invalid initial path!")); wxASSERT_MSG(path.empty() || CheckPath(path), wxT("Invalid initial path!"));
if (!wxPickerBase::CreateBase(parent, id, path, pos, size, if (!wxPickerBase::CreateBase(parent, id, path, pos, size,
style, validator, name, wxTE_FILENAME)) style, validator, name))
return false; return false;
if (!HasFlag(wxFLP_OPEN) && !HasFlag(wxFLP_SAVE)) if (!HasFlag(wxFLP_OPEN) && !HasFlag(wxFLP_SAVE))

View File

@@ -59,8 +59,7 @@ bool wxPickerBase::CreateBase(wxWindow *parent,
const wxSize& size, const wxSize& size,
long style, long style,
const wxValidator& validator, const wxValidator& validator,
const wxString& name, const wxString& name)
long textstyle)
{ {
// remove any border style from our style as wxPickerBase's window must be // 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) // 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 // the styles related to the textctrl from the styles passed here
m_text = new wxTextCtrl(this, wxID_ANY, wxEmptyString, m_text = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
GetTextCtrlStyle(style) | textstyle); GetTextCtrlStyle(style));
if (!m_text) if (!m_text)
{ {
wxFAIL_MSG( wxT("wxPickerBase's textctrl creation failed") ); wxFAIL_MSG( wxT("wxPickerBase's textctrl creation failed") );

View File

@@ -34,7 +34,6 @@ wxComboBoxXmlHandler::wxComboBoxXmlHandler()
XRC_ADD_STYLE(wxCB_SORT); XRC_ADD_STYLE(wxCB_SORT);
XRC_ADD_STYLE(wxCB_READONLY); XRC_ADD_STYLE(wxCB_READONLY);
XRC_ADD_STYLE(wxCB_DROPDOWN); XRC_ADD_STYLE(wxCB_DROPDOWN);
XRC_ADD_STYLE(wxCB_FILENAME);
AddWindowStyles(); AddWindowStyles();
} }

View File

@@ -27,7 +27,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxTextCtrlXmlHandler, wxXmlResourceHandler)
wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler() wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler()
{ {
XRC_ADD_STYLE(wxTE_FILENAME);
XRC_ADD_STYLE(wxTE_NO_VSCROLL); XRC_ADD_STYLE(wxTE_NO_VSCROLL);
XRC_ADD_STYLE(wxTE_AUTO_SCROLL); XRC_ADD_STYLE(wxTE_AUTO_SCROLL);
XRC_ADD_STYLE(wxTE_PROCESS_ENTER); XRC_ADD_STYLE(wxTE_PROCESS_ENTER);