int wxTextCtrl::overflow(int c)
{
// Make sure there is a holding area
+ // this is not needed in <iostream> usage as it automagically allocates
+ // it, but does someone want to emulate it for safety's sake?
+#if wxUSE_IOSTREAMH
if ( allocate()==EOF )
{
wxError("Streambuf allocation failed","Internal error");
return EOF;
}
+#endif
// Verify that there are no characters in get area
if ( gptr() && gptr() < egptr() )
{
/* This doesn't seem to be fatal so comment out error message */
// wxError("Put area not opened","Internal error");
- setp( base(), base() );
+
+#if wxUSE_IOSTREAMH
+ setp( base(), base() );
+#else
+ setp( pbase(), pbase() );
+#endif
}
// Determine how many characters have been inserted but no consumed
void wxTextCtrl::OnChar(wxKeyEvent& event)
{
+ // Fix by Marcel Rasche to allow Alt-Ctrl insertion of special characters
+ switch(event.KeyCode())
+ {
+ case '{':
+ case '}':
+ case '[':
+ case ']':
+ case '|':
+ case '~':
+ case '\\':
+ {
+ char c=(char)event.KeyCode();
+ *this << c;
+ }
+ break;
+ }
if ( (event.KeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER))
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
: wxEVT_SET_FOCUS,
m_windowId);
event.SetEventObject( this );
- ProcessEvent(event);
+ GetEventHandler()->ProcessEvent(event);
}
break;
event.SetEventObject( this );
event.SetEventType(eventType);
- if ( !ProcessEvent(event) )
+ if ( !GetEventHandler()->ProcessEvent(event) )
return FALSE;
return TRUE;