Edzard Egberts schrieb:
>
> Harhar - I just went through the examples...

and I wondered, why some texts are wrong sized. It's because there is no 
redefinition of starting values l0 and t0. So this approach is too basic.

To make a version, that would work fine for existing code, it would be 
necessary to move textsize_ to Fl_Widget and to make Fl_Label use the 
labelsize() method. After that all methods can be changed like that:

Fl_Fontsize textsize() const    { return h0 ? (l0 * h())/h0 : l0; }
void textsize(Fl_Fontsize s)    { h0 ? l0= (s * h0)/h() : l0= s; }

So the origin values will be kept and it is only possible to save h0.

My original approach works better, because the template comes top down 
and overwrites methods, but the Fl_Widget is at bottom and existing code 
overwrites changes.

Okay, I think that shows the basic requirements. Should I finish the 
basic system, adding data to Fl_Widget, should I try my pointer version, 
or go on with templates - what do you think?

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to