bool wxTextCtrlBase::SaveFile(const wxString& filename)
{
- wxString filenameToUse = filename.IsEmpty() ? m_filename : filename;
+ wxString filenameToUse = filename.empty() ? m_filename : filename;
if ( filenameToUse.empty() )
{
// what kind of message to give? is it an error or a program bug?
// streambuf methods implementation
// ----------------------------------------------------------------------------
-#ifndef NO_TEXT_WINDOW_STREAM
+#if wxHAS_TEXT_WINDOW_STREAM
int wxTextCtrlBase::overflow(int c)
{
return 0;
}
-#endif // NO_TEXT_WINDOW_STREAM
+#endif // wxHAS_TEXT_WINDOW_STREAM
// ----------------------------------------------------------------------------
// clipboard stuff
case WXK_NUMPAD7:
case WXK_NUMPAD8:
case WXK_NUMPAD9:
- ch = _T('0') + keycode - WXK_NUMPAD0;
+ ch = (wxChar)(_T('0') + keycode - WXK_NUMPAD0);
break;
case WXK_MULTIPLY:
case WXK_NUMPAD_DELETE:
// delete the character at cursor
{
- const long pos = GetInsertionPoint(),
- last = GetLastPosition();
- if ( pos < last )
+ const long pos = GetInsertionPoint();
+ if ( pos < GetLastPosition() )
Remove(pos, pos + 1);
}
break;
break;
default:
+#if wxUSE_UNICODE
+ if ( event.GetUnicodeKey() )
+ {
+ ch = event.GetUnicodeKey();
+ }
+ else
+#endif
if ( keycode < 256 && keycode >= 0 && wxIsprint(keycode) )
{
// FIXME this is not going to work for non letters...
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED)
#endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL
-