#include <stdlib.h>
#include <sys/types.h>
-#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 <richedit.h>
#endif
// Watcom C++ doesn't define this
#ifndef SCF_ALL
-#define SCF_ALL 0x0004
+ #define SCF_ALL 0x0004
#endif
+#endif // wxUSE_RICHEDIT
+
// ----------------------------------------------------------------------------
// private functions
// ----------------------------------------------------------------------------
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),
return TRUE;
}
-#endif // __WXWINE__/!__WXWINE__
-
#endif // wxUSE_RICHEDIT
void wxTextCtrl::WriteText(const wxString& value)
}
#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 )
void wxTextCtrl::OnChar(wxKeyEvent& event)
{
- switch ( event.KeyCode() )
+ switch ( event.GetKeyCode() )
{
case WXK_RETURN:
if ( !(m_windowStyle & wxTE_MULTILINE) )
bool wxTextCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
{
-#ifndef __WXWINE__
NMHDR *hdr = (NMHDR* )lParam;
switch ( hdr->code )
{
}
return TRUE;
}
-#endif
// not processed, leave it to the base class
return wxTextCtrlBase::MSWOnNotify(idCtrl, lParam, result);
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
}
return ok;
-#endif
}
bool wxTextCtrl::SetDefaultStyle(const wxTextAttr& style)