Re: Redirect cout to a TextView



Lucas van Dijk napisał(a):
> Well, yes I've found that on google, but what I couldn't find so fast,
> is how I can use the custom created stream interact with the TextView.
Have you read Boost.Iostreams tutorial? There's an example of writing a
custom sink for STL containers. I haven't done that but it seems quite
easy to modify this example to make it work with the TextView widget.
The constructor of your new TextView sink should accept and store a
reference or a pointer to an instance of the TextView widget. The method
named "write" should just insert its char_type* argument (probably
converted to an ustring first) into TextView's buffer.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]