Mercurial > hg > octave-nkf
comparison scripts/plot/gco.m @ 14837:c55493bb7363
Add gco implementation.
* scripts/plot/gco.m: New file.
* scripts/plot/models.mk (plot_FCN_FILES): Add it to module.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Wed, 04 Jul 2012 14:57:57 +0100 |
parents | |
children | 8f0e3c5bfa5f |
comparison
equal
deleted
inserted
replaced
14836:a1e1f914ae79 | 14837:c55493bb7363 |
---|---|
1 ## Copyright (C) 2012 Michael Goffioul | |
2 ## | |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
19 ## -*- texinfo -*- | |
20 ## @deftypefn {Function File} {@var{h} =} gco () | |
21 ## @deftypefnx {Function File} {@var{h} =} gco (@var{fig}) | |
22 ## Return a handle to the current object of the current figure, or a handle | |
23 ## to the current object of the figure with handle @var{fig}. The current | |
24 ## object of a figure is the object that was last clicked on. It is stored | |
25 ## in the CurrentObject property of the target figure. | |
26 ## | |
27 ## If the last mouse click didn't occur on any child object of the figure, | |
28 ## the current object is the figure itself. | |
29 ## | |
30 ## If no mouse click occured in the target figure, this function returns and | |
31 ## empty matrix. | |
32 ## | |
33 ## Note that the value returned by this function is not necessarily the same | |
34 ## as the one returned by gcbo during callback execution. An executing | |
35 ## callback can be interrupted by another callback and the current object | |
36 ## can be modified. | |
37 ## | |
38 ##@seealso{gcbo, gcf} | |
39 ##@end deftypefn | |
40 | |
41 function h = gco () | |
42 | |
43 h = get (gcf (), "currentobject"); | |
44 | |
45 endfunction |