Matthias Melcher wrote:
> I would not make it an option, because the idea of options is,
> that they can be overridden by the end user.
Ah, the Fl_Preferences tie-in, I see.
> You can use this:
> void no_symbol_label(const Fl_Label* o, int X, int Y, int W, int H, Fl_Align
> align)
> {
> fl_font(o->font, o->size);
> fl_color((Fl_Color)o->color);
> fl_draw(o->value, X, Y, W, H, align, o->image, 0);
> }
>
> main() {
> Fl::set_labeltype(FL_NORMAL_LABEL, no_symbol_label, fl_normal_measure);
> ...
> }
Thanks -- yes, that seems to work.
I had to specify this though:
extern void fl_normal_measure(const Fl_Label* o, int& W, int& H);
Apparently this function is declared in the FLTK lib in the public
namespace (it's not static), but it doesn't seem to be declared
in any of the FLTK #include files.
(I found this out by grabbing the FLTK code and declaring it as a
global function in my app, and finding it conflicted with the one
in FLTK)
I suppose I could declare mine static, but it seemed perhaps better
to use FLTK's.
Should this fl_normal_measure() function be made static in FLTK,
or should it be made 'officially public' via a definition in one
of the FL include files?
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev