X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6a44bffd1ac68163e4c1cfe8aa8fe4f7f98a02e7..05e3a383e0bff29b830f91b6b40e63a3b1a3e72f:/src/univ/textctrl.cpp diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 3a2bf8b547..afd8751329 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -6,7 +6,7 @@ // Created: 15.09.00 // RCS-ID: $Id$ // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /* @@ -608,8 +608,6 @@ BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) EVT_CHAR(wxTextCtrl::OnChar) EVT_SIZE(wxTextCtrl::OnSize) - - EVT_IDLE(wxTextCtrl::OnIdle) END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) @@ -665,11 +663,14 @@ bool wxTextCtrl::Create(wxWindow *parent, style |= wxALWAYS_SHOW_SB; } + // wxTE_WORDWRAP is 0 for now so we don't need the code below +#if 0 if ( style & wxTE_WORDWRAP ) { // wrapping words means wrapping, hence no horz scrollbar style &= ~wxHSCROLL; } +#endif // 0 // TODO: support wxTE_NO_VSCROLL (?) @@ -688,6 +689,11 @@ bool wxTextCtrl::Create(wxWindow *parent, // create data object for single line controls m_data.sdata = new wxTextSingleLineData; } + +#if wxUSE_TWO_WINDOWS + if ((style & wxBORDER_MASK) == 0) + style |= wxBORDER_SUNKEN; +#endif if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) @@ -3563,7 +3569,7 @@ void wxTextCtrl::UpdateScrollbars() MData().m_updateScrollbarY = FALSE; } -void wxTextCtrl::OnIdle(wxIdleEvent& event) +void wxTextCtrl::OnInternalIdle() { // notice that single line text control never has scrollbars if ( !IsSingleLine() && @@ -3571,8 +3577,6 @@ void wxTextCtrl::OnIdle(wxIdleEvent& event) { UpdateScrollbars(); } - - event.Skip(); } bool wxTextCtrl::SendAutoScrollEvents(wxScrollWinEvent& event) const @@ -4109,6 +4113,7 @@ void wxTextCtrl::DoDraw(wxControlRenderer *renderer) // the update region is in window coords and text area is in the client // ones, so it must be shifted before computing intersection wxRegion rgnUpdate = GetUpdateRegion(); + wxRect rectTextArea = GetRealTextArea(); wxPoint pt = GetClientAreaOrigin(); wxRect rectTextAreaAdjusted = rectTextArea;