1 ## Copyright (C) 2008-2012 Bill Denney
3 ## This file is part of Octave.
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.
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.
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/>.
20 ## @deftypefn {Function File} {@var{h} =} allchild (@var{handles})
21 ## Find all children, including hidden children, of a graphics object.
23 ## This function is similar to @code{get (h, "children")}, but also
24 ## returns hidden objects. If @var{handles} is a scalar,
25 ## @var{h} will be a vector. Otherwise, @var{h} will be a cell matrix
26 ## of the same size as @var{handles} and each cell will contain a
28 ## @seealso{get, set, findall, findobj}
31 ## Author: Bill Denney <bill@denney.ws>
33 function h = allchild (handles)
35 shh = get (0, "showhiddenhandles");
37 set (0, "showhiddenhandles", "on");
38 h = get (handles, "children");
39 unwind_protect_cleanup
40 set (0, "showhiddenhandles", shh);
47 %! toolkit = graphics_toolkit ();
48 %! graphics_toolkit ("fltk");
49 %! hf = figure ("visible", "off");
52 %! assert(get (allchild (hf),"type"),{"axes"; "uimenu"; "uimenu"; "uimenu"});
53 %! unwind_protect_cleanup
55 %! graphics_toolkit (toolkit);