Fabio Bracci wrote:
> 
> Well, the error is as follows:
> 
> 
> g++ -Wall -ggdb -c GUI-maxtree-panel-widgets.cxx -I/usr/local/include/
> /usr/include/FL/Fl_Group.H: In member function â??void 
> GUImaxtreePanelWidgets::drawScrollPanel()â??:
> /usr/include/FL/Fl_Group.H:56: error: â??virtual void Fl_Group::draw()â?? is 
> protected
> GUI-maxtree-panel-widgets.cxx:649: error: within this context
...

> 
> Again, I'm interested in having the children of the group to be redrawn, the 
> complex visualization widgets.
> My naive approach is to define a wrapper method in the window calling the 
> group's draw(), but for some reason it's a protected method, so this doesn't 
> work.
> a) why is draw() a protected method?

I can't tell you, why it is protected, IMHO this is not necessary or useful.

> b) how to trigger draw()? I'm thinking of a group->hide(); group->show() 
> sequence, but it seems clumsy to me ...

Yes, that's clumsy. But there is help ...

I answered your question already in:

http://www.fltk.org/newsgroups.php?gfltk.general+v:27435

But beware: Call the draw method only from another draw method. If you 
need something to be drawn, the only supported way is to call redraw() 
and return from the callback - or call Fl::flush(), Fl::wait(), or 
Fl::check(). This way FLTK will call the draw method as soon as possible.

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

Reply via email to