On 12.12.2010, at 21:03, [email protected] wrote:

> On 11/12/10 23:20, Greg Ercolano wrote:
>> 
>>      You can re-theme individual widgets by wrapping them in a C++ class
>>      in the app code.
> 
> This is what I'd advise, except that...
> 
>>      I also have some vague memory of there being a way to hook into
>>      FLTK's drawing routines from an app to affect all widget drawing,
>>      which I /think/ involved some function pointers. I can't remember
>>      where there's example code, but I think some code was made available
>>      here on the newsgroup some years ago. If I find it, I'll follow up,
>>      and maybe add it to the cheat page/fltk examples dir.
> 
> The best place (IIRC) to see it used to be the old "shiny" demo in 
> fltk-1.1, but that was dropped from 1.3, and does not get built in 1.1 
> variants either as the GL hooks only really work on a few platforms 
> (maybe SGI's? I can't remember...)

The issue was that only on SGIs you could treat a regular X11 window as an 
OpenGL window without troubles. This is now again possible on OS X, but not on 
other platforms, where you either draw with native calls *or* with OpenGL 
calls. The demo program was dropped because it would flicker horribly on some 
platforms and not draw text - or crash alltogether.

The easiest way to create something like a theme is to override the standard 
box styles. This is easily done by providing functions that draw boxes 
differently. See Fl::set_boxtype() 
<http://www.fltk.org/documentation.php/doc-1.1/Fl.html#Fl.set_boxtype>

But to get back into the Shiny demo: with the new printer and screen driver 
system, it is possible to draw all widgets inside an OpenGL window, including 
all the nice effects that are available in OpenGL like texture mapping, 
transparency, even reflections... .

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

Reply via email to