>
> Below, a version of what I was proposing deriving from Fl_Group as a
> container widget to hold all the other widgets to be rendered into
> the offscreen context.
>
> With this approach, the only derived widget is the "offscreen_group"
> class, derived simply from Fl_Group.
> All other widgets operate totally conventionally.
>
> Note that the buttons are actually rendered into the offscreen,
> although they appear on screen and are fully functional (if you doubt
> that, comment out the call to fl_copy_offscreen(0, 0, wo, ho, offscr,
> 0, 0); and see what happens!)
>
> I think this was the effect that Fabio was aiming for?
>
> I haven't actually checked the offscreen to see that all the widgets
> (even the non-visible ones) are fully rendered, I assume they are,
> but if not then presumably judicious use of fl_no_clip() would
> resolve that.
>
> --------------- (program left out)

Hi Ian,
in the meanwhile I figured out what was wrong with my program, I was making 
mistakes with absolute/relative coordinates with fl_rectf and with 
fl_copy_offscreen, I already posted my solution.

Indeed what I am aiming for is to print/screen capture/etc a whole widgets 
hierarchy contained in a Fl_Scroll (so a Fl_Group); I already was thinking 
about providing a draw() function to a derived class and enclose the 
Fl_Scroll::draw() with the offscreen operations, thanx for the example!

The problem I am facing now is that I have generated with fluid a window with a 
scroll with a group; the group is the one holding the complex widget structure.
In my case I should wrap the group's draw() call with the offscreen code ... 
but I can't!
/usr/include/FL/Fl_Group.H:56: error: ‘virtual void Fl_Group::draw()’ is 
protected
Is there a way to trigger the draw() method of a group from the outside?
The alternative would be again deriving Fl_Group to customize draw(), but fluid 
doesn't know anything about my custom widgets, so I will not be able to use a 
Group with offscreen code from fluid.

In short: how is it possible to trigger the protected draw() of the inner Group 
without dismantling the complex widget (built with fluid)?

Fabio

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

Reply via email to