> > Something like that might work, at least for widgets that 
> you explicitly add() to your group... Not sure how it would 
> fly with widgets that were implicitly added to your group by 
> the group->begin()/end() stuff though.
> >
> > Anyone have a view on that?
> 
> I'm afraid it wouldn't work :-(
> 
> Fl_Widget's c'tor does this:
> 
>    if (Fl_Group::current()) Fl_Group::current()->add(this);
> 
> The problem here is that Fl_Group::add() is not virtual, and
> therefore Fl_Group::add() will be called and not the derived
> container widget's add() method.

Yes - that was what I'd envisaged, though I didn't know and did not
check the code...

The explicit add() should work, then, but the implicit add() will not.

And from the later posts it sounds like it won't work for Robert's
use-case anyway...


> IMO this is a deficiency that ought to be fixed in one of the
> next steps (maybe 1.4.0?). This is definitely an ABI breaking
> change, and doing it now (in 1.3.0) would mean to risk some
> subtle side effects - maybe.

Still, I think it would be a good idea - and we can tie it into Matt's
suggestion to make the group origin "user selectable" in future.

I guess the indorection might slow down widget add() a bit I guess, but
not much, and we don't add widgets all that much at runtime so
performance is probably not an issue?

But yes, and ABI breaker... So 1.4 then?


SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to