#include <wx/textctrl.h>
This class can be used to (temporarily) redirect all output sent to a C++ ostream object to a wxTextCtrl instead.
wxUSE_STD_IOSTREAM is set to 0 (which is done by --disable-std_iostreams option when using configure).Example of usage:
Public Member Functions | |
| wxStreamToTextRedirector (wxTextCtrl *text, ostream *ostr) | |
| The constructor starts redirecting output sent to ostr or cout for the default parameter value to the text control text. More... | |
| ~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. More... | |
| wxStreamToTextRedirector::wxStreamToTextRedirector | ( | wxTextCtrl * | text, |
| ostream * | ostr | ||
| ) |
The constructor starts redirecting output sent to ostr or cout for the default parameter value to the text control text.
| text | The text control to append output too, must be non-null |
| ostr | The C++ stream to redirect, cout is used if it is nullptr |
| wxStreamToTextRedirector::~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.