On Sep 20, 2007, at 5:11 PM, Stan wrote:

>    void do_exit()
>    {
>         // What is the condition of 'this' here?
>         // Has it been deleted?  Does it matter if
>         // we got here because the user pressed the 'x'
>         // on the window border?
>    }

No, there is no special processing here. This is just a regular  
callback which happens to default to hiding the window, so a rapidly  
prototyped application can exit by clicking the "Close" button or by  
pressing ESC.

If you simply return, nothing will happen.

Do not delete the widget in a callback. If you must delete a widget  
in a callback, use Fl::delete_widget(self) instead.

If you want to quit the application, you can either simply call exit 
() or _exit() from within the callback, and C++ together with the OS  
will release all of you standard resources.

If you want to quit your app by leaving the "run()" loop, you can  
hide all windows, and Fl::run() will return control. To find all  
windows, use Fl::first_window and Fl::next_window

Matthias

----
http://robowerk.com/


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

Reply via email to