I am not sure what you exactly want to achieve, but for the reasons
already mentioned generic copy/assignment operators for widgets does not
seem to be a good idea. If it is a work-around to copy "visual"
properties of the widget, then it is probably better to have some simple
pointer-based implementations of styles for things like label*(font,
size, ...), box, color etc. This style could be copyable though.
The other (worse in my opinion) possibility would be to derive Fl_Widget
from some copyable "Fl_Style" and forbid the copy/assignment op. at the
widget level but still allow to copy the common properties at the base
level.

Matthias Melcher wrote:

> 
> It would be relatively easy to create a "duplicate(myWidget)" function
> which just creates a clone (but will that clone children too?), but it
> would be a lot harder to have an assignment operator that copies only
> attributes that are common among the source and destination widget.
> 
> Matthias
> 
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to