X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db50ec5a50cc5ec605c0a1d7c50ecc62307f0066..83911a5a4d3be63141419b4401259093514794a3:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index e0e20bb683..77ad90c6d3 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -57,7 +57,11 @@ #include #include -#if wxUSE_RICHEDIT && (!defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)) +#if wxUSE_RICHEDIT + +// old mingw32 has richedit stuff directly in windows.h and doesn't have +// richedit.h at all +#if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) #include #endif @@ -98,9 +102,11 @@ // Watcom C++ doesn't define this #ifndef SCF_ALL -#define SCF_ALL 0x0004 + #define SCF_ALL 0x0004 #endif +#endif // wxUSE_RICHEDIT + // ---------------------------------------------------------------------------- // private functions // ---------------------------------------------------------------------------- @@ -595,15 +601,6 @@ DWORD CALLBACK wxRichEditStreamIn(DWORD dwCookie, BYTE *buf, LONG cb, LONG *pcb) extern long wxEncodingToCodepage(wxFontEncoding encoding); // from utils.cpp -#ifdef __WXWINE__ -bool wxTextCtrl::StreamIn(const wxString& value, - wxFontEncoding WXUNUSED(encoding), - bool selectionOnly) -{ - return FALSE; -} -#else // !__WXWINE__ - #if wxUSE_UNICODE_MSLU bool wxTextCtrl::StreamIn(const wxString& value, wxFontEncoding WXUNUSED(encoding), @@ -676,8 +673,6 @@ bool wxTextCtrl::StreamIn(const wxString& value, return TRUE; } -#endif // __WXWINE__/!__WXWINE__ - #endif // wxUSE_RICHEDIT void wxTextCtrl::WriteText(const wxString& value) @@ -715,7 +710,7 @@ void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly) } #endif // wxUSE_UNICODE_MSLU -#if !wxUSE_UNICODE && !defined(__WXWINE__) +#if !wxUSE_UNICODE // next check if the text we're inserting must be shown in a non // default charset -- this only works for RichEdit > 1.0 if ( GetRichVersion() > 1 ) @@ -1358,7 +1353,7 @@ bool wxTextCtrl::MSWShouldPreProcessMessage(WXMSG* pMsg) void wxTextCtrl::OnChar(wxKeyEvent& event) { - switch ( event.KeyCode() ) + switch ( event.GetKeyCode() ) { case WXK_RETURN: if ( !(m_windowStyle & wxTE_MULTILINE) ) @@ -1758,7 +1753,6 @@ void wxTextCtrl::OnRightClick(wxMouseEvent& event) bool wxTextCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) { -#ifndef __WXWINE__ NMHDR *hdr = (NMHDR* )lParam; switch ( hdr->code ) { @@ -1845,7 +1839,6 @@ bool wxTextCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) } return TRUE; } -#endif // not processed, leave it to the base class return wxTextCtrlBase::MSWOnNotify(idCtrl, lParam, result); @@ -1903,9 +1896,6 @@ bool wxTextCtrl::SetForegroundColour(const wxColour& colour) bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style) { -#ifdef __WXWINE__ - return FALSE; -#else if ( !IsRich() ) { // can't do it with normal text control @@ -2035,7 +2025,6 @@ bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style) } return ok; -#endif } bool wxTextCtrl::SetDefaultStyle(const wxTextAttr& style)