Jorge wrote:
On Tue, Apr 19, 2011 at 06:04:14PM +0000, corvid wrote:
Jorge wrote:
On Sun, Apr 17, 2011 at 03:13:44PM +0000, corvid wrote:
Jorge wrote:
On Sat, Apr 16, 2011 at 11:30:33PM -0800, Roger wrote:
1) I have "&File" for the "File" button.
At some point corvid disabled FLTK's internal character escaping on labels. Although I'd prefer to have the underlined 'F' as in most menu APIs, rather than a bare 'F', I'm sure there's a reason behind this (e.g. I remember setting labels with strings taken from HTML pages could have side effects).
We should nail this down easily (at least removing the '&' is trivial).
FLTK2 had public widget flags, so when we needed to set RAW_LABEL all over the place in FLTK2, it was easy (except when a workaround was necessary for tooltips). FLTK 1.3 has protected widget flags, making it rather more trouble to clear SHORTCUT_LABEL all over the place. It didn't seem at all worth the trouble of making lots and lots of derived classes so that File could still have an underline.
Ah, OK.
I just committed a fix that uses FL_NORMAL_LABEL to not interpret special symbols, and sets FL_FREE_LABELTYPE to interpret them (e.g. for "File" menu).
My recollection is that the situation is something like the attached.
(That said, I played with symbols one day because it comes with a little language to let you draw arbitrary shapes in different colors and so forth, which I mention because maybe someday we will find it useful to interpret symbols when, say, we want to use some Unicode character that we can't trust the font to have.)
It looks quite clear as you propose.
I was thinking of using FL_FREE_LABELTYPE for FLTK's default... please feel free to commit.
Putting some externs in dillo.cc and then calling fl_normal_label() and fl_normal_measure()? I wonder whether fl_draw_shortcut is supposed to be 1 ordinarily, and only switched to other values temporarily while drawing some label.