Mercurial > octave-nkf
comparison libinterp/corefcn/graphics.cc @ 17483:710309214e0d
doc: Add seealso links between waitfor, waitforbuttonpress, and ginput.
* libinterp/corefcn/graphics.cc(Fwaitfor): Put objective of function in first line
of docstring. Add seealso link to waitforbuttonpress.
* scripts/plot/ginput.m: Add seealso link to waitforbuttonpress.
* scripts/plot/waitforbuttonpress.m: Add seealso link to kbhit.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 25 Sep 2013 10:09:33 -0700 |
parents | 0aa77acf22f5 |
children | b4343603f7ab |
comparison
equal
deleted
inserted
replaced
17482:e5b0cf1fcf6a | 17483:710309214e0d |
---|---|
10205 @deftypefn {Built-in Function} {} waitfor (@var{h})\n\ | 10205 @deftypefn {Built-in Function} {} waitfor (@var{h})\n\ |
10206 @deftypefnx {Built-in Function} {} waitfor (@var{h}, @var{prop})\n\ | 10206 @deftypefnx {Built-in Function} {} waitfor (@var{h}, @var{prop})\n\ |
10207 @deftypefnx {Built-in Function} {} waitfor (@var{h}, @var{prop}, @var{value})\n\ | 10207 @deftypefnx {Built-in Function} {} waitfor (@var{h}, @var{prop}, @var{value})\n\ |
10208 @deftypefnx {Built-in Function} {} waitfor (@dots{}, \"timeout\", @var{timeout})\n\ | 10208 @deftypefnx {Built-in Function} {} waitfor (@dots{}, \"timeout\", @var{timeout})\n\ |
10209 Suspend the execution of the current program until a condition is\n\ | 10209 Suspend the execution of the current program until a condition is\n\ |
10210 satisfied on the graphics handle @var{h}. While the program is suspended\n\ | 10210 satisfied on the graphics handle @var{h}.\n\ |
10211 graphics events are still being processed normally, allowing callbacks to\n\ | 10211 \n\ |
10212 modify the state of graphics objects. This function is reentrant and can be\n\ | 10212 While the program is suspended graphics events are still being processed\n\ |
10213 called from a callback, while another @code{waitfor} call is pending at\n\ | 10213 normally, allowing callbacks to modify the state of graphics objects. This\n\ |
10214 top-level.\n\ | 10214 function is reentrant and can be called from a callback, while another\n\ |
10215 @code{waitfor} call is pending at the top-level.\n\ | |
10215 \n\ | 10216 \n\ |
10216 In the first form, program execution is suspended until the graphics object\n\ | 10217 In the first form, program execution is suspended until the graphics object\n\ |
10217 @var{h} is destroyed. If the graphics handle is invalid, the function\n\ | 10218 @var{h} is destroyed. If the graphics handle is invalid, the function\n\ |
10218 returns immediately.\n\ | 10219 returns immediately.\n\ |
10219 \n\ | 10220 \n\ |
10236 \n\ | 10237 \n\ |
10237 To define a condition on a property named @code{timeout}, use the string\n\ | 10238 To define a condition on a property named @code{timeout}, use the string\n\ |
10238 @code{\\timeout} instead.\n\ | 10239 @code{\\timeout} instead.\n\ |
10239 \n\ | 10240 \n\ |
10240 In all cases, typing CTRL-C stops program execution immediately.\n\ | 10241 In all cases, typing CTRL-C stops program execution immediately.\n\ |
10241 @seealso{isequal}\n\ | 10242 @seealso{waitforbuttonpress, isequal}\n\ |
10242 @end deftypefn") | 10243 @end deftypefn") |
10243 { | 10244 { |
10244 if (args.length () > 0) | 10245 if (args.length () > 0) |
10245 { | 10246 { |
10246 double h = args(0).double_value (); | 10247 double h = args(0).double_value (); |
10404 error ("waitfor: missing timeout value"); | 10405 error ("waitfor: missing timeout value"); |
10405 } | 10406 } |
10406 | 10407 |
10407 // FIXME: There is still a "hole" in the following loop. The code | 10408 // FIXME: There is still a "hole" in the following loop. The code |
10408 // assumes that an object handle is unique, which is a fair | 10409 // assumes that an object handle is unique, which is a fair |
10409 // assumptions, except for figures. If a figure is destroyed | 10410 // assumption, except for figures. If a figure is destroyed |
10410 // then recreated with the same figure ID, within the same | 10411 // then recreated with the same figure ID, within the same |
10411 // run of event hooks, then the figure destruction won't be | 10412 // run of event hooks, then the figure destruction won't be |
10412 // caught and the loop will not stop. This is an unlikely | 10413 // caught and the loop will not stop. This is an unlikely |
10413 // possibility in practice, though. | 10414 // possibility in practice, though. |
10414 // | 10415 // |