comparison scripts/plot/util/gco.m @ 19705:bf27e21f0bfb

maint: Merge default to temporary audio-gsoc branch.
author John W. Eaton <jwe@octave.org>
date Wed, 31 Dec 2014 14:59:42 -0500
parents d63878346099
children 4197fc428c7d
comparison
equal deleted inserted replaced
19704:dac3191a5301 19705:bf27e21f0bfb
1 ## Copyright (C) 2012-2013 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}.
24 ##
25 ## The current object of a figure is the object that was last clicked on. It
26 ## is stored in the @qcode{"CurrentObject"} property of the target figure.
27 ##
28 ## If the last mouse click did not occur on any child object of the figure,
29 ## then the current object is the figure itself.
30 ##
31 ## If no mouse click occurred in the target figure, this function returns an
32 ## empty matrix.
33 ##
34 ## Programming Note: The value returned by this function is not necessarily the
35 ## same as the one returned by @code{gcbo} during callback execution. An
36 ## executing callback can be interrupted by another callback and the current
37 ## object may be changed.
38 ##
39 ## @seealso{gcbo, gca, gcf, gcbf, get, set}
40 ## @end deftypefn
41
42 function h = gco ()
43
44 h = get (get (0, "currentfigure"), "currentobject");
45
46 endfunction
47