> > On Apr 26, 2007, at 4:32 PM, Konstantin wrote: > > > Hey, > > I have a window (created with FLUID) and want to execute a task if > > the focus switches back to the window (mouse or also the keyboard). > > > > Currently it is implemented: > > > > My window contains a widget, in this part I'm listening to the > > Fl::focus() event method. If it gets null and switches back > > (contains something), i will know, that focus has been switched > > back. So, at this time i will do my calculations. But I only works, > > if you move the mouse over this particular widget otherwise I won't > > notify that the focus has been switched. > > You can listen for the FL_FOCUS message in your window instead of > your widget. That should be sent as soon as you click anywhere in the > main window. You might also consider the FL_ENTER event which is sent > when the mouse crosses the window without activating it. > > ---- > http://robowerk.com/ > >
Thanks a lot for the reply! I have a Class (f.e. Test) and the constructor instantiates some double windows as well as the main window, which is also a double window class. The double window class heritages from Fl_Window and Fl_Window heritages Fl_Group and so on. So the Fl_Widget is in the end of the chain and this class contains the handle method, so it should be possible to overwrite the handle method in my Double_window class. I tried it, but I'm not sure how it should work with fluid. I think, this should be the best way. How it's possible to overwrite the handle class of my main window (double window class) with fluid? Thanks for the help! Konstantin _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
