Home » U++ Library support » RichText,QTF,RTF... » Scrollable log window with colour text
Re: Scrollable log window with colour text [message #2581 is a reply to message #2554] |
Tue, 18 April 2006 02:18   |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
The solution I want is to be able to print ANSI encoded text. Now, I can leave the ANSI code in there, ESC [ X ; Y ; Z ], and attempt to match on that, but with the unprintable etc, I do not know if that will work or fail. Naturally, I do not want the escape codes "displayed", just to set the colour.
Or, I can pre-parse the ANSI string, which I do in my ncurses/CDK application, and replace the ANSI colour codes with some other encoding. Could be QTF, but I've had little luck in making a scrollable Window out of that, but today there is a lead there.
But even if I did replace it with markers that are "easier" to match on, wouldn't those markers just be displayed as well as the rest of the text?
"ESC[31mHello ESC[34mWorld" -> RED(Hello) BLUE(World).
"[@6 Hello][@5 World]"
Or in another way, is there a way I can end up with the ability to AddString(fgcolour, bgcolour, "Hello "); AddString(fgcolour, bgcolour, "World");
It would seem that the QTF encoding was made for this sort of thing, it is just that there is no Widget that suits it. Sure if I want to make a Word application, I'm already done. 
[Updated on: Tue, 18 April 2006 02:35] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Aug 02 11:44:38 CEST 2025
Total time taken to generate the page: 0.10275 seconds
|