On 12/10/11 14:41, Ian MacArthur wrote:
> On 10 Dec 2011, at 20:44, Domingo Alvarez Duarte wrote:
>> With this suggestion of VT100 we will have a kind of rich text ! that's
>> nice !
>
> I'm old enough to have done *quite a lot* of display work using VT100 escape
> sequences.
> What I'd take away from this is - it is no kind of rich text!
LOL, well, maybe not VT100 precisely, but in the same
way that xterm "extended" it, we could extend it for
setting font faces, pixel size, 24 bit color, etc.
This particular ANSI sequence is very flexible:
\033[ <numbers here> <lettercode>
..where we can define our own letter codes.
Actually, IMHO it'd work fine for rich text.
Not sure I can think of a reason why it's worse
than any other.
But if there's good reason against it, I'd yield.
(I'll still continue to use it in my own apps though
cause it Just Works)
Here's a screenshot of a normal FLTK Fl_Browser
with the ANSI patch added:
http://seriss.com/people/erco/fltk/tmp/Fl_Browser-ansi-test.png
..and here's my app showing the output of a console command
(running in the xterm) and its output displayed in the above Fl_Browser:
http://www.seriss.com/rush-current/features/gifs/progress-102.42a9c.png
I didn't take any of the cursor positioning stuff from the
ANSI/xterm specs, just the character attribute stuff
(underline, bold, fg/bg color, font faces)
This tweak is a small mod to Fl_Browser::draw()
and a single private .H file added to the fltk src dir.
Doesn't change the API at all.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev