Mercurial > hg > octave-nkf
annotate scripts/plot/gco.m @ 16933:e39f00a32dc7
maint: Use parentheses around condition for switch(),while(),if() statements.
* libinterp/corefcn/dirfns.cc, libinterp/octave-value/ov-fcn-handle.cc,
liboctave/array/Sparse.cc, scripts/image/rgb2ind.m, scripts/io/importdata.m,
scripts/io/strread.m, scripts/optimization/fminbnd.m,
scripts/optimization/sqp.m, scripts/plot/graphics_toolkit.m,
scripts/plot/hdl2struct.m, scripts/plot/legend.m, scripts/plot/print.m,
scripts/plot/printd.m, scripts/plot/private/__contour__.m,
scripts/plot/private/__go_draw_axes__.m, scripts/plot/struct2hdl.m,
scripts/polynomial/polyeig.m, scripts/sparse/bicg.m, scripts/specfun/ellipke.m,
scripts/special-matrix/gallery.m, scripts/ui/errordlg.m, scripts/ui/helpdlg.m,
scripts/ui/inputdlg.m, scripts/ui/listdlg.m, scripts/ui/questdlg.m,
scripts/ui/warndlg.m: Use parentheses around condition for
switch(),while(),if() statements.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 09 Jul 2013 14:04:05 -0700 |
parents | a4969508008e |
children | eaab03308c0b |
rev | line source |
---|---|
14837
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
1 ## Copyright (C) 2012 Michael Goffioul |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
2 ## |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
3 ## This file is part of Octave. |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
4 ## |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
5 ## Octave is free software; you can redistribute it and/or modify it |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
6 ## under the terms of the GNU General Public License as published by |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
8 ## your option) any later version. |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
9 ## |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
10 ## Octave is distributed in the hope that it will be useful, but |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
13 ## General Public License for more details. |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
14 ## |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
15 ## You should have received a copy of the GNU General Public License |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
16 ## along with Octave; see the file COPYING. If not, see |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
17 ## <http://www.gnu.org/licenses/>. |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
18 |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
19 ## -*- texinfo -*- |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
20 ## @deftypefn {Function File} {@var{h} =} gco () |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
21 ## @deftypefnx {Function File} {@var{h} =} gco (@var{fig}) |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
22 ## Return a handle to the current object of the current figure, or a handle |
15007
8f0e3c5bfa5f
doc: Periodic grammarcheck of documentation
Rik <rik@octave.org>
parents:
14837
diff
changeset
|
23 ## to the current object of the figure with handle @var{fig}. The current |
8f0e3c5bfa5f
doc: Periodic grammarcheck of documentation
Rik <rik@octave.org>
parents:
14837
diff
changeset
|
24 ## object of a figure is the object that was last clicked on. It is stored |
14837
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
25 ## in the CurrentObject property of the target figure. |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
26 ## |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
27 ## If the last mouse click didn't occur on any child object of the figure, |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
28 ## the current object is the figure itself. |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
29 ## |
16826
a4969508008e
doc: Periodic spellcheck of the documentation.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
30 ## If no mouse click occurred in the target figure, this function returns an |
14837
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
31 ## empty matrix. |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
32 ## |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
33 ## Note that the value returned by this function is not necessarily the same |
15007
8f0e3c5bfa5f
doc: Periodic grammarcheck of documentation
Rik <rik@octave.org>
parents:
14837
diff
changeset
|
34 ## as the one returned by gcbo during callback execution. An executing |
14837
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
35 ## callback can be interrupted by another callback and the current object |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
36 ## can be modified. |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
37 ## |
16814
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
16808
diff
changeset
|
38 ##@seealso{gcbo, gcf, gca, get, set} |
14837
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
39 ##@end deftypefn |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
40 |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
41 function h = gco () |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
42 |
15246
fa8f3955e70a
gco.m: Don't create figure if it doesn't already exist (Bug #37211)
Rik <rik@octave.org>
parents:
15010
diff
changeset
|
43 h = get (get (0, "currentfigure"), "currentobject"); |
14837
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
44 |
c55493bb7363
Add gco implementation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
45 endfunction |