X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/568c0346fce3aa83c5c8c00e903e2f54cbf3d0e8..6d7b547184bfdcdf67790755deb0122050b1d728:/src/univ/textctrl.cpp diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 5a336af029..54c170b068 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/textctrl.cpp +// Name: src/univ/textctrl.cpp // Purpose: wxTextCtrl // Author: Vadim Zeitlin // Modified by: @@ -125,16 +125,17 @@ #if wxUSE_TEXTCTRL -#include +#include "wx/textctrl.h" #ifndef WX_PRECOMP #include "wx/log.h" - #include "wx/dcclient.h" #include "wx/validate.h" - #include "wx/textctrl.h" + #include "wx/dataobj.h" #endif +#include + #include "wx/clipbrd.h" #include "wx/textfile.h" @@ -148,10 +149,6 @@ #include "wx/cmdproc.h" -#if wxUSE_CLIPBOARD -#include "wx/dataobj.h" -#endif - // turn extra wxTextCtrl-specific debugging on/off #define WXDEBUG_TEXT @@ -606,13 +603,13 @@ private: // implementation // ============================================================================ -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_CHAR(wxTextCtrl::OnChar) EVT_SIZE(wxTextCtrl::OnSize) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) // ---------------------------------------------------------------------------- // creation @@ -2683,7 +2680,7 @@ size_t wxTextCtrl::GetPartOfWrappedLine(const wxChar* text, //else: we can just see it // wrap at any character or only at words boundaries? - if ( !(GetWindowStyle() & wxTE_LINEWRAP) ) + if ( !(GetWindowStyle() & wxTE_CHARWRAP) ) { // find the (last) not word char before this word wxTextCoord colWordStart; @@ -4259,7 +4256,7 @@ void wxTextCtrl::CreateCaret() // FIXME use renderer caret = new wxCaret(this, 1, GetLineHeight()); #ifndef __WXMSW__ - caret->SetBlinkTime(0); + wxCaret::SetBlinkTime(0); #endif // __WXMSW__ } else @@ -4685,7 +4682,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) int keycode = event.GetKeyCode(); #if wxUSE_UNICODE wxChar unicode = event.GetUnicodeKey(); -#endif +#endif if ( keycode == WXK_RETURN ) { if ( IsSingleLine() || (GetWindowStyle() & wxTE_PROCESS_ENTER) ) @@ -4714,7 +4711,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) return; } -#endif +#endif } #ifdef __WXDEBUG__ // Ctrl-R refreshes the control in debug mode @@ -4814,14 +4811,12 @@ bool wxStdTextCtrlInputHandler::HandleKey(wxInputConsumer *consumer, break; case WXK_PAGEDOWN: - case WXK_NEXT: // we don't map Ctrl-PgUp/Dn to anything special - what should it // to? for now, it's the same as without control action << wxACTION_TEXT_PAGE_DOWN; break; case WXK_PAGEUP: - case WXK_PRIOR: action << wxACTION_TEXT_PAGE_UP; break;