.\" This is a wxWidgets manpage page generated from the XML docs .TH wxStreamToTextRedirector 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxStreamToTextRedirector \- Allows to redirect output sent to cout to a wxTextCtrl .SH DESCRIPTION This class can be used to (temporarily) redirect all output sent to a C++ ostream object to a wxTextCtrl instead. NB: Some compilers and/or build configurations don't support multiply inheriting wxTextCtrl from std::streambuf in which case this class is not compiled in. You also must have wxUSE_STD_IOSTREAM option on (i.e. set to 1) in your setup.h to be able to use it. Under Unix, specify --enable-std_iostreams switch when running configure for this. Example of usage: using namespace std; wxTextCtrl *text = new wxTextCtrl(...); { wxStreamToTextRedirector redirect(text); // this goes to the text control cout << "Hello, text!" << endl; } // this goes somewhere else, presumably to stdout cout << "Hello, console!" << endl; .SH "PARENTS" .SH "INCLUDE FILES" wx/textctrl.h .SH MEMBERS .SS wxStreamToTextRedirector (wxTextCtrl *textostream *ostr = NULL) The constructor starts redirecting output sent to ostr or cout for the default parameter value to the text control text . .SS ~wxStreamToTextRedirector () When a wxStreamToTextRedirector object is destroyed, the redirection is ended and any output sent to the C++ ostream which had been specified at the time of the object construction will go to its original destination. .SH "SEE ALSO" wxTextCtrl .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.