X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/83624f79609f0d5e240c1f7d77d044bfff9702fc..aae24d21a33faa2a23fccde24255365ca845c46f:/src/gtk/textctrl.cpp?ds=sidebyside diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index ea17cd1920..61c406c6fb 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -68,13 +68,21 @@ BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) EVT_CHAR(wxTextCtrl::OnChar) END_EVENT_TABLE() +#ifndef NO_TEXT_WINDOW_STREAM wxTextCtrl::wxTextCtrl() : streambuf() { if (allocate()) setp(base(),ebuf()); m_modified = FALSE; } +#else +wxTextCtrl::wxTextCtrl() +{ + m_modified = FALSE; +} +#endif +#ifndef NO_TEXT_WINDOW_STREAM wxTextCtrl::wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value, const wxPoint &pos, const wxSize &size, int style, const wxValidator& validator, const wxString &name ) : streambuf() @@ -84,6 +92,15 @@ wxTextCtrl::wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value, m_modified = FALSE; Create( parent, id, value, pos, size, style, validator, name ); } +#else +wxTextCtrl::wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value, + const wxPoint &pos, const wxSize &size, + int style, const wxValidator& validator, const wxString &name ) +{ + m_modified = FALSE; + Create( parent, id, value, pos, size, style, validator, name ); +} +#endif bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, const wxPoint &pos, const wxSize &size, @@ -286,7 +303,7 @@ bool wxTextCtrl::LoadFile( const wxString &file ) Clear(); - FILE *fp = NULL; + FILE *fp = (FILE*) NULL; struct stat statb; if ((stat ((char*) (const char*) file, &statb) == -1) || (statb.st_mode & S_IFMT) != S_IFREG || @@ -341,7 +358,7 @@ bool wxTextCtrl::SaveFile( const wxString &file ) } else { - char *text = NULL; + char *text = (char*) NULL; gint len = 0; if (m_windowStyle & wxTE_MULTILINE) @@ -621,6 +638,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event ) key_event.Skip(); } +#ifndef NO_TEXT_WINDOW_STREAM int wxTextCtrl::overflow( int WXUNUSED(c) ) { int len = pptr() - pbase(); @@ -697,6 +715,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const char c) WriteText(buf); return *this; } +#endif GtkWidget* wxTextCtrl::GetConnectWidget() {