added wxTextEntry common base class for both wxTextCtrl and wxComboBox; refactor wxGTK code to put common parts of these classes in the base class; fixed some inconsistencies in the text control behaviour between platforms

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-09-26 00:30:22 +00:00
parent c0d9b217a7
commit 0ec1179b86
33 changed files with 1224 additions and 862 deletions

View File

@@ -134,6 +134,13 @@ public:
return m_descriptiveText;
}
// provide access to the base class protected methods to wxSearchCtrl which
// needs to forward to them
using wxTextCtrl::DoSetValue;
using wxTextCtrl::DoLoadFile;
using wxTextCtrl::DoSaveFile;
protected:
void OnText(wxCommandEvent& eventText)
{
@@ -334,7 +341,8 @@ bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id,
#else
style |= wxBORDER_SIMPLE;
#endif
if ( !wxTextCtrlBase::Create(parent, id, pos, size, style, validator, name) )
if ( !wxSearchCtrlBaseBaseClass::Create(parent, id, pos, size,
style, validator, name) )
{
return false;
}
@@ -897,9 +905,17 @@ wxTextCtrl& operator<<(const wxChar c);
void wxSearchCtrl::DoSetValue(const wxString& value, int flags)
{
m_text->ChangeValue( value );
if ( flags & SetValue_SendEvent )
SendTextUpdatedEvent();
m_text->DoSetValue(value, flags);
}
bool wxSearchCtrl::DoLoadFile(const wxString& file, int fileType)
{
return m_text->DoLoadFile(file, fileType);
}
bool wxSearchCtrl::DoSaveFile(const wxString& file, int fileType)
{
return m_text->DoSaveFile(file, fileType);
}
// do the window-specific processing after processing the update event