On 24.11.2010, at 12:58, Albrecht Schlosser wrote:

> I don't recommend this here, but if you think that you really need it,
> then you could try to call each window's callback before closing it,
> something like (untested):

Sorry, I posted an older version of the code. It should read:

static void cb_close(Fl_Widget *w, void*) {
   Fl_Window *me = (Fl_Window *)w;
   Fl_Window *win;
   while (win = Fl::first_window()) {
     if (win != me && win->callback()) {
       win->do_callback();    // call each window's callback
       if (Fl::first_window() == win)
         break;            // user decided not to close the window
     } else {
       win->hide();        // close window (no callback)
     }
   }
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to