X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6519b40fe9f5e4706e02497fe01ff71c65079d6..6fef2483d9dc1a7c006d2f5967791e0f4c0cf518:/src/univ/textctrl.cpp diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 17ed256745..ebb49dcc83 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -227,7 +227,7 @@ static const size_t PAGE_OVERLAP_IN_LINES = 1; // ---------------------------------------------------------------------------- // the data only used by single line text controls -struct WXDLLEXPORT wxTextSingleLineData +struct wxTextSingleLineData { // the position of the first visible pixel and the first visible column wxCoord m_ofsHorz; @@ -251,7 +251,7 @@ struct WXDLLEXPORT wxTextSingleLineData }; // the data only used by multi line text controls -struct WXDLLEXPORT wxTextMultiLineData +struct wxTextMultiLineData { // the lines of text wxArrayString m_lines; @@ -300,7 +300,7 @@ struct WXDLLEXPORT wxTextMultiLineData }; // the data only used by multi line text controls in line wrap mode -class WXDLLEXPORT wxWrappedLineData +class wxWrappedLineData { // these functions set all our values, so give them access to them friend void wxTextCtrl::LayoutLine(wxTextCoord line, @@ -460,7 +460,7 @@ WX_DECLARE_OBJARRAY(wxWrappedLineData, wxArrayWrappedLinesData); #include "wx/arrimpl.cpp" WX_DEFINE_OBJARRAY(wxArrayWrappedLinesData); -struct WXDLLEXPORT wxTextWrappedData : public wxTextMultiLineData +struct wxTextWrappedData : public wxTextMultiLineData { // the width of the column to the right of the text rect used for the // indicator mark display for the wrapped lines @@ -740,7 +740,7 @@ bool wxTextCtrl::Create(wxWindow *parent, RecalcFontMetrics(); SetValue(value); - SetBestSize(size); + SetInitialSize(size); m_isEditable = !(style & wxTE_READONLY); @@ -778,7 +778,7 @@ wxTextCtrl::~wxTextCtrl() // set/get the value // ---------------------------------------------------------------------------- -void wxTextCtrl::ChangeValue(const wxString& value) +void wxTextCtrl::DoSetValue(const wxString& value, int flags) { if ( IsSingleLine() && (value == GetValue()) ) { @@ -792,12 +792,9 @@ void wxTextCtrl::ChangeValue(const wxString& value) { SetInsertionPoint(0); } -} -void wxTextCtrl::SetValue(const wxString& value) -{ - ChangeValue(value); - SendTextUpdatedEvent(); + if ( flags & SetValue_SendEvent ) + SendTextUpdatedEvent(); } const wxArrayString& wxTextCtrl::GetLines() const @@ -3735,7 +3732,7 @@ void wxTextCtrl::RefreshTextRange(wxTextPos start, wxTextPos end) { // intermediate line or the last one but we need to refresh it // until the end anyhow - do it - posCount = wxSTRING_MAXLEN; + posCount = wxString::npos; } else // last line { @@ -4286,9 +4283,6 @@ void wxTextCtrl::CreateCaret() { // FIXME use renderer caret = new wxCaret(this, 1, GetLineHeight()); -#ifndef __WXMSW__ - wxCaret::SetBlinkTime(0); -#endif // __WXMSW__ } else {