Hi,
> > > I think you might be able to make your approach work by starting the
> > > offscreen, then clearing your boolean and directly calling
> > the widget
> > > ::draw() method again.
> > > Then, when that returns, reset the boolean and end the offscreen.
> > > Well, maybe that can work.
> >
> > Well, I was trying exactly this, to trigger draw() at the
> > group widget holding the complex structure, but I get a weird
> > compile error ...
>
> Hmm, odd. I would expect (but have not tried) that the draw method
> should be able to recursively call itself in that case. I wonder why it
> fails?

Well, before plugging in the offscreen drawing there was no problem, the draw() 
recursion took place.
But on the standard way, i.e. draw() wasn't explicitly called in my program, it 
was handled by the framework

> Might be worth posting the error message you get, someone might know
> what it pertains to.

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


This relates to the following wrapper method:


void GUImaxtreePanelWidgets::drawScrollPanel() {

//maxTreeContentScrollWindowGroup->redraw();
maxTreeContentScrollWindowGroup->draw();
}


here I have a complex window widget:
window
+-> scroll
    +-> group
        +-> complex visualization widget
        +-> complex visualization widget

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

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

Reply via email to