/////////////////////////////////////////////////////////////////////////////
-// Name: textctrl.cpp
+// Name: src/os2/textctrl.cpp
// Purpose: wxTextCtrl
// Author: David Webster
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/textctrl.h"
+
#ifndef WX_PRECOMP
- #include "wx/textctrl.h"
#include "wx/scrolwin.h"
#include "wx/settings.h"
#include "wx/brush.h"
#include "wx/utils.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
-
#if wxUSE_CLIPBOARD
#include "wx/clipbrd.h"
#endif
// event tables and other macros
// ----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase)
-BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
+BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
EVT_CHAR(wxTextCtrl::OnChar)
EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
m_windowStyle = lStyle;
m_bIsMLE = false;
+ m_bSkipUpdate = false;
long lSstyle = WS_VISIBLE | WS_TABSTOP;
return sStr;
} // end of wxTextCtrl::GetValue
-void wxTextCtrl::SetValue(
- const wxString& rsValue
+void wxTextCtrl::DoSetValue(
+ const wxString& rsValue,
+ int flags
)
{
//
//
if ((rsValue.length() > 0x400) || (rsValue != GetValue()))
{
+ if ( flags & SetValue_SendEvent )
+ m_bSkipUpdate = true;
+
::WinSetWindowText(GetHwnd(), (PSZ)rsValue.c_str());
AdjustSpaceLimit();
}
::WinSendMsg(hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFromChar, (USHORT)lToChar), (MPARAM)0);
} // end of wxTextCtrl::SetSelection
-bool wxTextCtrl::LoadFile(
- const wxString& rsFile
+bool wxTextCtrl::DoLoadFile(
+ const wxString& rsFile,
+ int fileType
)
{
- if ( wxTextCtrlBase::LoadFile(rsFile) )
+ if ( wxTextCtrlBase::DoLoadFile(rsFile, fileType) )
{
//
// Update the size limit if needed
return true;
}
return false;
-} // end of wxTextCtrl::LoadFile
+} // end of wxTextCtrl::DoLoadFile
bool wxTextCtrl::IsModified() const
{
case EN_CHANGE:
{
+ if (m_bSkipUpdate)
+ {
+ m_bSkipUpdate = false;
+ break;
+ }
+
wxCommandEvent vEvent( wxEVT_COMMAND_TEXT_UPDATED
,m_windowId
);