Alvin wrote:
> I haven't looked deeply into the code for drawing the symbols yet, however,
> if I were to create a patch to add inner symbol support, would that be
> desirable? 

        I'm sure it would be great, as long as it doesn't slow down
        the non-symbol cases, since text drawing needs to be as fast
        as possible, even in cases where the strings are large.

        Doing an initial string search for '@' signs down the string
        should be quick and only done once, so that if there are no
        @'s, it can take a fast route through the drawing code.
        Unfortunately searching a string for '@' every time it has
        to draw a text string is a penalty in a text-heavy interface.
        But if it's already being done anyway, I suppose better parsing
        couldn't hurt.

        Certainly existing behavior is bad; the string truncates at
        '@' signs in the middle of strings, so I can't imagine fixing this
        as causing unexpected behavior for existing apps.

> The other thing I would have liked to have seen is more robust
> @-support as done with Fl_Browser. For example, being able to change the
> colour of portions of a label (@C), align text centre (@c) and right (@r)
> to start with. Is there any interest in this for FLTK 1.3?

        All sounds good.. I think I went somewhere with that by making
        an 'ansi patch' for Fl_Browser so that regular ansi codes could
        be used for coloring strings, eg:
        http://seriss.com/people/erco/fltk/tmp/Fl_Browser-ansi-test.png

        ..and just for fun, made some NTSC color bars by printing spaces
        in the Fl_Browser with different colors:
        http://seriss.com/people/erco/fltk/tmp/ansi-fake-colorbars.png

        I posted that patch on fltk.development in March 2008..
        If nothing else, it may give you some ideas. Re-pasting here:

FLTK PATCHES
------------
        So here's the updated patch against fltk-1.1.x-svn current for
        Fl_Browser.cxx, and the newly modified AnsiMode.H file (hit "reload"
        to clear browser cache) that needs to be dropped in the same dir
        as Fl_Browser.cxx:
        http://seriss.com/people/erco/fltk/tmp/ansi-patch-03-09-2008.txt
        http://seriss.com/people/erco/fltk/tmp/AnsiMode.H

ANSI TEST PROGRAM
-----------------
        Here's the ansi "test" c++ program that exercises the above
        modifications, and the test program's screenshot:
        http://seriss.com/people/erco/fltk/tmp/browser-ansi-test.cxx
        http://seriss.com/people/erco/fltk/tmp/Fl_Browser-ansi-test.png

FAKE NTSC COLOR BARS TEST PROGRAM
---------------------------------
        Just for lolz, ye olde colorbars drawn using ANSI sequences:
        http://seriss.com/people/erco/fltk/tmp/ansi-fake-colorbars.cxx
        http://seriss.com/people/erco/fltk/tmp/ansi-fake-colorbars.png
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to