49
49
<LI><A HREF="#Fl.copy">copy</A></LI>
50
50
<LI><A HREF="#Fl.damage">damage</A></LI>
51
51
<LI><A HREF="#Fl.default_atclose">default_atclose</A></LI>
52
<LI><A HREF="#Fl.delete_widget">delete_widget</A></LI>
52
53
<LI><A HREF="#Fl.display">display</A></LI>
53
54
<LI><A HREF="#Fl.dnd">dnd</A></LI>
54
55
<LI><A HREF="#Fl.dnd_text_ops">dnd_text_ops</A></LI>
233
234
<tt>Fl::wait()</tt> at <i>t</i> seconds after this function is called.
234
235
The optional <tt>void*</tt> argument is passed to the callback.
237
<P>You can have multiple timeout callbacks. To remove an timeout
239
href="#Fl.remove_timeout"><tt>Fl::remove_timeout()</tt></A>.
241
<p>If you need more accurate, repeated timeouts, use <a
242
href='#Fl.repeat_timeout'><tt>Fl::repeat_timeout()</tt></a> to
243
reschedule the subsequent timeouts.</p>
245
<p>The following code will print "TICK" each second on
246
<tt>stdout</tt> with a fair degree of accuracy:</p>
249
void callback(void*) {
251
Fl::repeat_timeout(1.0, callback);
255
Fl::add_timeout(1.0, callback);
236
260
<H4><A NAME="Fl.arg">int arg(int, char**, int&);</A></H4>
238
262
<P>Consume a single switch from <tt>argv</tt>, starting at word i.
469
493
<H4><A NAME="Fl.default_atclose">void default_atclose(Fl_Window*,void*);</A></H4>
495
<p>This is the default callback for window widgets. It hides the
496
window and then calls the default widget callback.</p>
498
<H4><A NAME="Fl.delete_widget">void delete_widget(Fl_Widget*);</A></H4>
500
<p>Schedules a widget for deletion when it is safe to do so. Use
501
this method to delete a widget inside a callback function. When
502
deleting groups or windows, you must only delete the group or
503
window widget and not the individual child widgets.</p>
471
505
<H4><A NAME="Fl.display">void display(const char*);</A></H4>
473
507
<P>Sets the X display to use for all windows. Actually this just sets
989
1023
<H4><A NAME="Fl.repeat_timeout">void repeat_timeout(double t, Fl_Timeout_Handler,void* = 0);</A></H4>
991
<P>Inside a timeout callback you can call this to add another timeout.
992
Rather than the time being measured from "now", it is measured from
993
when the system call elapsed that caused this timeout to be called. This
994
will result in far more accurate spacing of the timeout callbacks, it
995
also has slightly less system call overhead. (It will also use all
996
your machine time if your timeout code and FLTK's overhead take more
997
than <i>t</i> seconds, as the real timeout will be reduced to zero).
999
<p>It is undefined what this does if called from outside a timeout
1002
<P>This code will print "TICK" each second on stdout, with a
1003
fair degree of accuracy:
1006
void callback(void*) {
1007
printf("TICK\n");
1008
Fl::repeat_timeout(1.0,callback);
1012
Fl::add_timeout(1.0,callback);
1025
<P>This method repeats a timeout callback from the expiration of the
1026
previous timeout, allowing for more accurate timing. You may only call
1027
this method inside a timeout callback.
1029
<p>The following code will print "TICK" each second on
1030
<tt>stdout</tt> with a fair degree of accuracy:</p>
1033
void callback(void*) {
1035
Fl::repeat_timeout(1.0, callback);
1039
Fl::add_timeout(1.0, callback);
1017
1044
<H4><A NAME="Fl.run">int run();</A></H4>