manolo gouy wrote:

>> I suggest that we add a temporary development branch
>> for Fl_Printer so that we can both work on it and that other
>> developers or users can easily test it.
>>
>> If you like that idea, I can do it (or you can do it yourself),
>> just tell me.
> I love this idea. Please, go ahead.

okay, I'll do.

> I had to change print_widget again because it failed under Windows
> on sub-sub-windows, and believe the problem you handle here is now
> correctly handled. I'll put that in the new branch after checking it.

Yes, I knew that. I wanted to post it later, but now you beat me to
it. I wouldn't spend too much time with sub-[sub-...]windows, maybe
we shouldn't support that at all, because:

(1) For every sub-window you have to accumulate the x/y-offsets, but
that's probably what you found out already.

(2) Your trick to find the subwindows only works, if the windows are
shown(), because otherwise they won't be in the list of windows. The
only way to find subwindows would probably be to traverse the widget
tree and find them, but that's not as easy as it might look. Either
we need to add another virtual method (draw_subwindows or something
like that), or you must find out if a child widget is an Fl_Group,
and that's IMHO not possible w/o dynamic_cast (forbidden) or another
(virtual) method that I wanted to introduce anyway for some time now:

   virtual int Fl_Widget::is_group()

but that's another story...

And, while we're at it: you don't need to write your own (child_of)
function to find out if a window is a child of another widget.
It's already there:

int Fl_Widget::inside (const Fl_Widget *w)
int Fl_Widget::contains (const Fl_Widget *w)

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

Reply via email to