>
> > at the bottom of main() what happens when the return (run()) is
> > called? That is a really confusing one for me!
>
> There's nothing really magical about
>   return(Fl::run());
> because it's just shorthand for
>   int status = Fl::run();
>   return(status);
>
> In general, your program looks like this:
> - initialize your GUI, data structures, comms, etc
> - show at least one window on screen
> - enter the event loop (ie: FL::run()

Ok thanks, but you post excerpt above is exactly what i would expect from my 
previous event driven programming:

set things up, then enter an event loop until the event is quit(for example)

But in the FLTK it looks like the program reaches an end when it hits the 
return(Fl::run()); as it is the last accesible statement in Main, where is F1 
run() executing? so there is an event handling loop running 'somewhere' how can 
program flow be diverted back into my functions etc? i have opened ercos fltk 
snippets page and saved it and there is some good clear stuff there, but not 
much on events, apart from example 'movable box' now the events part in that is 
more like what i would be used to writing, but it does not explain how control 
gets in there in the first place haha, sorry its just a bit nuts to me, 
fundamentals i need to understand first, callbacks for example.

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

Reply via email to