> mal content wrote:
> >> Ah, I see.
> >> What exactly are 'schemes' then?
>
>       "Schemes" are the FLTK 1.1.x way of redefining how widgets
>       (like boxes and buttons) are drawn. FLTK has long had two
>       schemes, the 'default' and 'plastic'. I think the latest
>       releases have introduced a newer 'gtk' scheme. An article
>       on how to (for instance) make your own box types:
>       http://www.fltk.org/articles.php?L697
>
>       "Styles" are the FLTK 2.x way of doing the same thing,
>       only apparently more class oriented and probably more flexible.
>       For instance, it appears you can easily change the default
>       font type and size using eg. labelfont() and labelsize() methods.

Right...

>
>  >> They're documented, but nobody seems to know what they are...
>  > http://fltk.org/doc-2.0/html/classStyle.html
>
>       The docs on that page under 'Description" seems to describe
>       what styles are pretty well, and how to use them.
>
>       Looks like you make an instance of the class, redefining the
>       methods/values you want to change so that it affects the
>       default behavior of all the FLTK widgets.
>
>       Maybe the Description could elaborate, from a 'big picture'
>       point of view, how one might use them to redefine the interface.
>       (eg. declaring the class in main(), or a static global? Or
>       maybe within a derived class to only affect one class?)

See that's the part I didn't get. I thought that I would need
to modify some top-level structure in order to get colours, etc,
to propagate down, but couldn't work it out from that description.

I'm assuming, not actually having looked through the fltk source
for it, that there's a statically allocated Style structure
somewhere and all widgets have a pointer to it, by default. I
then assume that I'd run various functions like:

  global_style.labelfont(SOME_FONT);
  global_style.color(SOME_COLOR);

But I'm a bit, er, fuzzy on the details...

MC

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

Reply via email to