I have subclassed Fl_Gl_Window (class My_Window) and written an own 
handle-function. It works fine, but recently I have made a new subclass 
My_Window_2 to my first subclass. As a handle function, it is still calling 
My_Window::handle(int event).
For My_Window_2 dragging doesn't work. FL_PUSH and FL_RELEASE are recognized 
correctly, however inbetween handle isn't called anymore.
Do you have any suggestions?
Thanks a lot!

Here is the code:


int My_Window::handle(int event)
{

    if (event == FL_MOUSEWHEEL)   // wheelmouse support
    {
        cout << "FL_MOUSEWHEEL" << endl;
        return 1;
    }
    else if (event == FL_PUSH){    // mouse button
        cout << "FL_PUSH" << endl;
        return 1;
    }
    else if (event == FL_DRAG) // dragged mouse
    {
        cout << "dragging" << endl;
        return 1;
    }
    else if (event == FL_RELEASE){   // release dragged
        cout << "FL_RELEASE" << endl;
        return 1;
    }
    else {// any not overwritten handle should be managed as usual
        cout << "default" << endl;
        int res = Fl_Gl_Window::handle(event);
        return res;
    }
    return 1;
}

For any My_Window the output (when dragging) is something like

FL_PUSH
dragging
dragging
dragging
FL_RELEASE


However for My_Window_2 it's

FL_PUSH
FL_RELEASE

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

Reply via email to