> How can I detect Window resizing since

It's a virtual method of the window. My way to use this method directing 
resize to a main program:

struct i_callback
{ // main program should be inherited: class main: public i_callback
  // and overwrite Resize():
        virtual void Resize(int x, int y, int w, int h)= 0;
};

class Fl_Resize_Window: public Fl_Double_Window
{ // Window with extended resize() method to replace Fl_Double_Window
public:
        Fl_Resize_Window(int w, int h, const char* l= 0):
                Fl_Double_Window(w, h, l)
        {}

        Fl_Resize_Window(int x, int y, int w, int h, const char* l= 0):
                Fl_Double_Window(x, y, w, h, l)
        {}

        virtual ~Fl_Resize_Window() {}
        
        inline void Callback(i_callback* pC)    { mp_Callback= pC; }
        
protected:
        i_callback*     mp_Callback;
        
        virtual void resize(int x, int y, int w, int h)
        {
                Fl_Double_Window::resize(x, y, w, h);
                if (mp_Callback) mp_Callback->Resize(x, y, w, h);
        }
};
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to