Am 16.02.2010 12:08, schrieb Edzard Egberts:
> Am 15.02.2010 23:03, schrieb Greg Ercolano:
>>      Yes, I think it's maybe a good time add some way to 'scale' all font 
>> sizes.
>>      Even though currently most FLTK widgets don't move around to accommodate
>>      font sizes, it'd still be handy for the user to be able to bring fonts
>>      up in size, as sometimes fonts are too small to read, depending on the
>>      resolution vs. screen size. I know I've been surprised to see my 
>> interfaces
>>      on hires notebooks, and having a hard time being able to read them.
> 
> One moment, there is an existing solution for this problem and I already
> wanted to publish my code base - seems to be a good occasion to start.
> To be continued soon...

...some time necessary to cut it out of the major project, to
understand, what I thought 7 years ago and to make an example.

Basics:
The code is ment to change labelfont/ labelsize and textfont/textsize of
FLTK windows, this means four different values to be changeable. It's a
problem, that basic class Fl_Widget only provides methods to change
labels, not the equivalent methods to change texts. The problem was
solved by dynamic casts for finding out, whether there are text methods,
but for FLTK 1.3 I would recommend to add virtual methods textsize() and
textfont() to Fl_Widget.

When displaying the code it might be interesting to know, that I'm using
tab width of 3.

Methods:
By inheritance it is easy to use the code for adding the functionality
to existing applications.

For download, all of the code is inside of
http://www.tantec.de/komponenten/FLTK/font_size/

Please take care of Readme.txt and I need to point out, that I didn't
succeed in creating a makefile working for windows.

There are lots of german words and comments, but I think, we can start
diskussion without need to translate it first. Missing explanations
will come when up to date - for the moment I'm trying to start the
existing stuff... ;o)

Also saving and restore of settings is not mentioned. For use in FLTK it
might be more easy, but I think, this is a good point to start.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to