- key_event.Skip();
-}
-
-#ifndef NO_TEXT_WINDOW_STREAM
-int wxTextCtrl::overflow( int WXUNUSED(c) )
-{
- int len = pptr() - pbase();
- char *txt = new char[len+1];
- strncpy(txt, pbase(), len);
- txt[len] = '\0';
- (*this) << txt;
- setp(pbase(), epptr());
- delete[] txt;
- return EOF;
-}
-
-int wxTextCtrl::sync()
-{
- int len = pptr() - pbase();
- char *txt = new char[len+1];
- strncpy(txt, pbase(), len);
- txt[len] = '\0';
- (*this) << txt;
- setp(pbase(), epptr());
- delete[] txt;
- return 0;
-}
-
-int wxTextCtrl::underflow()
-{
- return EOF;
-}
-
-wxTextCtrl& wxTextCtrl::operator<<(const wxString& s)
-{
- AppendText(s);
- return *this;
-}
-
-wxTextCtrl& wxTextCtrl::operator<<(float f)
-{
- static char buf[100];
- sprintf(buf, "%.2f", f);
- AppendText(buf);
- return *this;
-}
-
-wxTextCtrl& wxTextCtrl::operator<<(double d)
-{
- static char buf[100];
- sprintf(buf, "%.2f", d);
- AppendText(buf);
- return *this;
-}
-
-wxTextCtrl& wxTextCtrl::operator<<(int i)
-{
- static char buf[100];
- sprintf(buf, "%i", i);
- AppendText(buf);
- return *this;
-}
-
-wxTextCtrl& wxTextCtrl::operator<<(long i)
-{
- static char buf[100];
- sprintf(buf, "%ld", i);
- AppendText(buf);
- return *this;
-}
+ if ((key_event.KeyCode() == WXK_RETURN) && !(m_windowStyle & wxTE_MULTILINE))
+ {
+ wxWindow *top_frame = m_parent;
+ while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
+ top_frame = top_frame->GetParent();
+ GtkWindow *window = GTK_WINDOW(top_frame->m_widget);