Sorry to replaying to myself, but it would be also useful if flag 
Fl::draw_it_active would be set during drawing labels so that various drawing 
functions could
use it (not only boxtypes) when drawing things, the hack of fl_color() below 
would not be necessary in that case...

On 03/04/2012 16:53, Roman Kantor wrote:
> Another approach - using fl_add_symbol():
> 
> I have a hack which wraps an image in a regular function, something like
> 
> void draw_my_icon(Fl_Color ){
>       static Fl_Image * im1 = new Fl_PNG_Image(...);
>       static im2 = (im1->copy())->deimage();
>       Fl_Image * im = im1;
>       if(fl_color() & 0xffffff00)  im = im2; // drawing inactive image - hack
>       im->draw(0.5 + fl_transform_x(0, 1) - im->w() / 2, 0.5 + 
> fl_transform_y(0, 1) - im->h() / 2);
> }
> 
> 
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to