>
> > I want to ahve any number of instances of an app.
> >
> > I can use an array (and am using one for now) but a vector or list
> > would be better (given the dynamic resizing allowed by those).  A
> > list also requires a copy constructor however.
> >
> > If someone has programmed in a copy constructor for FL_Window, or
> > can advise how to, then I'd love to know.  Otherwise any advice on
> > how to have multiple instances of an app class (that inherits from
> > Fl_Window) would be good.
>
> Do you really need a vector<Fl_Window> ?
> Is it not possible to use a vector<Fl_Window*> ?
>
> IIRC, if you have a vector<Thing> then Thing has to have a default
> constructor with no parameters. Fl_Window has no such constructor.
>
> Rather than the hassle of trying to retro-fit a copy constructor
> through the Fl_Widget, Fl_Group, Fl_Window hierarchy and open up
> a big can of worms, why not introduce simpler redirection class.
> This class would only contain an Fl_Window* initialized to NULL/0
> in the default constructor, and accessor methods that would create
> the real Fl_Window if needed. Lazy evaluation for Fl_Windows.
>
> However, I've never tried to implement this...
>
> Cheers
> D.

Thanks Duncan.
I'll give this a go.  If it interests you to sketch up a rough guess in code 
that would be really good, because I am not completely sure I've got what you 
mean..

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

Reply via email to