>
> > change this to:
> >
> >   Fl_Double_Window::resize(i_x_pos, i_y_pos, i_x_len, i_y_len);
> >
>
> thanks, but no thank you. That'll make all the widgets proportional to the 
> size of the window --- not what I want.
>

That being the case, you might want something like this:
void my_app::resize(int X, int Y, int W, int H)
{
    if(x() != X || y() != Y) {
        Fl_Widget::position(x, y);
    }
    if(w() != W || h() != H) {
        // layout my stuff the way I want it
    }
}

> If you want to see what I mean by 'debounce' resize, just create a
> window with a resize method and put a printf statement in there. It
> literally goes nuts, just a mouse button press on the window causes a
> flurry of them. For even more fun, run it from a remote host (ssh)
> with a slow connection.

Restating what others have said, that's to be expected. You may
be able to reduce the volume of work done by resize(), but you won't
be able to reduce the number of times resize() is called;  that's
determined by the interaction between the gui and the window manager.
Forgive me if I'm stating the obvious, but recall that resize(x,y,w,h)
is equivalent to position(x,y); size(w,h).  IOW, resize gets called
more often than the number of times the size changes.

Best,
Stan


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

Reply via email to