> Once you enter the Fl::run() loop, the only way you can interact with
> the program is by causing some event that will casue it to react...
Perhaps you want to instead implement the main loop by hand;
Like:
while(1) {
// do quickly something "in the background"
if (!fltk::Window::first()) break; // all windows are closed
fltk::wait(1); // process events
}
I use:
bool triggFirst=1;
while(1) {
try {
if (triggFirst) { // first time
// do some things "on init"
// .....
triggFirst=0;
}
if (!fltk::Window::first()) break; // all windows are closed
fltk::wait(1);
}
catch(std::exception &e) {
std::string msg = "Error: " + std::string(e.what());
if (fltk::ask(msg.c_str())) break ;
}
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk