Re: Redirect cout to a TextView
- From: "Lucas van Dijk" <luckyluke56 gmail com>
- To: "Tomasz Olszewski" <olszewst gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Redirect cout to a TextView
- Date: Mon, 14 May 2007 14:21:21 +0200
AH good idea, found a solution :)
Thanks for helping me :)
2007/5/13, Tomasz Olszewski <olszewst gmail com>:
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.
--
Lucas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]