Mercurial > hg > octave-nkf
comparison scripts/plot/allchild.m @ 11469:c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 09 Jan 2011 12:41:21 -0800 |
parents | c539ec5726e7 |
children | fd0a3ac60b0e |
comparison
equal
deleted
inserted
replaced
11468:e1edf0ba3bcb | 11469:c776f063fefe |
---|---|
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {@var{h} =} allchild (@var{handles}) | 20 ## @deftypefn {Function File} {@var{h} =} allchild (@var{handles}) |
21 ## Find all children, including hidden children, of a graphics object. | 21 ## Find all children, including hidden children, of a graphics object. |
22 ## | 22 ## |
23 ## This function is similar to @code{get (h, "children")}, but also | 23 ## This function is similar to @code{get (h, "children")}, but also |
24 ## returns includes hidden objects. If @var{handles} is a scalar, | 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 | 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 | 26 ## of the same size as @var{handles} and each cell will contain a |
27 ## vector of handles. | 27 ## vector of handles. |
28 ## @seealso{get, set, findall, findobj} | 28 ## @seealso{get, set, findall, findobj} |
29 ## @end deftypefn | 29 ## @end deftypefn |
30 | 30 |
31 ## Author: Bill Denney <bill@denney.ws> | 31 ## Author: Bill Denney <bill@denney.ws> |
32 | 32 |
33 function h = allchild (ha) | 33 function h = allchild (handles) |
34 | 34 |
35 shh = get (0, "showhiddenhandles"); | 35 shh = get (0, "showhiddenhandles"); |
36 unwind_protect | 36 unwind_protect |
37 set (0, "showhiddenhandles", "on"); | 37 set (0, "showhiddenhandles", "on"); |
38 if (isscalar (ha)) | 38 if (isscalar (handles)) |
39 h = get (ha, "children"); | 39 h = get (handles, "children"); |
40 else | 40 else |
41 h = cell (size (ha)); | 41 h = cell (size (handles)); |
42 for i = 1:numel (ha) | 42 for i = 1:numel (handles) |
43 h{i} = get (ha, "children"); | 43 h{i} = get (handles, "children"); |
44 endfor | 44 endfor |
45 endif | 45 endif |
46 unwind_protect_cleanup | 46 unwind_protect_cleanup |
47 set (0, "showhiddenhandles", shh); | 47 set (0, "showhiddenhandles", shh); |
48 end_unwind_protect | 48 end_unwind_protect |