blue146 wrote:
> I have a class that derives from Fl_Group, and contains several widgets. When
> I call activate() for one of the deactivated widgets (Fl_Round_Button for
> instance) then somehow draw() is called for the whole Fl_Group class. This
> causes the group to flicker on the screen once. I guess that it flickers
> because it takes some time to redraw all of the widgets in the group.
> Do you know how could I stop the whole group from redrawing when I change
> just one of it's children ? Optimally, only the changed widget should be
> redrawn.
No idea, since the default Fl_Widget::activate()
only tells that widget to redraw:
void Fl_Widget::activate() {
if (!active()) {
clear_flag(INACTIVE);
if (active_r()) {
redraw();
redraw_label();
handle(FL_ACTIVATE);
if (inside(Fl::focus())) Fl::focus()->take_focus();
}
}
}
Possibly there's other code involved causing the redraw of
the parent. Note label is redrawn, as well as an "FL_ACTIVATE"
event sent to the widget's handle() method.
Regarding the 'flicker', try using Fl_Double_Window if possible
instead of Fl_Window; it uses double buffering which prevents flicker,
whereas Fl_Window is single buffered.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk