Livia Koch wrote:
> 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).

Do you really mean "calling", i.e. did you define your own handle
method, and this calls My_Window::handle(), or is it done by
inheritance? I don't think that it would matter, but maybe there
are other subtle differences ...

> For My_Window_2 dragging doesn't work. FL_PUSH and FL_RELEASE are
 > recognized correctly, however inbetween handle isn't called anymore.

Is there something different WRT widget hierarchies? Are these GL
windows main windows or subwindows?

> Do you have any suggestions?

Maybe it's a focus problem. See below.

> 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;

          take_focus();         // try adding this here

>         return 1;
>     }

[ ... snip ... ]

Albrecht
_______________________________________________
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl

Reply via email to