Hi Albrecht > 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.
..weird! > > 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 Ok, I'll take a look > 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. this is exactly the situation: sometimes I need to take a screenshot, so I modified the main Window's draw() to alternatively perform the standard Fl_Window::draw() or to switch to the offscreen drawing; in that case I need to trigger by hand the draw() of widgets held by the window > Albrecht Fabio
_______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

