Hiba wrote:

> Hi everybody.
> In my interface created with FLTK, i have a button "Quit".
> The associated function "Quit" is implemented in a class named "Project".
> This calss "Project" is the daughter class of the interface class
> "ProjectGUI".
> 
> What should i put in the callback of the "Quit" button to execute the
> "Quit" function defined in the daughter class?
> 
> Thank you.

You can either put a function you implement according to the Fl_Callback
prototype. Or you can just put in any code you want. fluid will create the
necessary wrapper around your code for you.

Having said that, but what about simply putting:

   _exit(0);


That's assuming you do not have any special cleanup you need to do. Often,
as recommended by others in this newsgroup before, when you do File->Quit,
you just need to terminate your program. The OS will do all the memory
cleanup for you. So, unless you need to do anything special (saving
preferences come to mind), then simply _exit the program.

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

Reply via email to