[..]
> This is working fine but there is again one issue.
>
> After calling
> win->size_range(0, 0, -1, -1);
>
> Now if i try to resize the window then its size become (0,0) i.e. i see only 
> some part of title bar, there is no window's view area visible
[..]

Really?  Here's a complete example.  If it doesn't work on your
platform, better tell these guys about it, as there may be
more problems with size_range() than I thought.


#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl.H>

class Window : public Fl_Double_Window {
public:
    Window(int w, int h, char const* label = 0)
        : Fl_Double_Window(w, h, label)
    { resizable(this); }

    void stop_resizing()
    { size_range(w(), h(), w(), h()); }

    void resume_resizing()
    { size_range(0, 0, -1, -1); }
};

void resume(Fl_Widget*, void* v)
{ static_cast<Window*>(v)->resume_resizing(); }

void stop(Fl_Widget*, void* v)
{ static_cast<Window*>(v)->stop_resizing(); }

int main()
{
    Window win(300, 300, "Testing");
    Fl_Button* stop_btn = new Fl_Button(50, 50, 100, 20, "Stop");
    Fl_Button* resume_btn = new Fl_Button(50, 120, 100, 20, "Resume");
    win.end();
    stop_btn->callback(stop, &win);
    resume_btn->callback(resume, &win);
    win.show();
    return Fl::run();
}

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

Reply via email to