Greg Ercolano wrote:

Albrecht's STR#2142:
>> I suggest that we should change all core widget's draw() methods from
>> protected to public.
> 
>       The STR would appear to point out a technical reason for this;
>       a widget that wraps more than one widget; derives from one,
>       contains an instance of the other, and the wrapper's draw()
>       function (appears to) need to call the instanced widget's
>       draw() function, which it wouldn't be able to do if private.

That's exactly the point why I stumbled over this, when I tried to 
create a widget that contained a Fl_Box and a Fl_Input widget. One of 
them (Fl_Box) was protected, but Fl_Input's draw() was public. And it 
appeared that the reason for the public draw() was that it was needed 
for Fl_Value_Input...

But, as discussed elsewhere, we can make all draw()s protected and use 
the downcast trick. Although I don't like it very much, Matthias' 
arguments about user questions seem to commend it.

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

Reply via email to