annotate scripts/plot/findall.m @ 13111:ebb42fb2da04

Various fixes for tests in scripts/plot plot/cla.m: Use figure number 1232. plot/clf.m: Split test into two. plot/findall.m: Check only for graphic objects in figure 1232. plot/findall.m: Ditto. plot/gcf.m: Simplify test. plot/line.m: Check against default values now. plot/whitebg.m: Restore default values after tests.
author Kai Habel <kai.habel@gmx.de>
date Wed, 07 Sep 2011 20:13:18 +0200
parents 5553412c6614
children 2ea1658ad049
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11523
fd0a3ac60b0e update copyright notices
John W. Eaton <jwe@octave.org>
parents: 10793
diff changeset
1 ## Copyright (C) 2008-2011 Bill Denney
7557
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
2 ##
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
3 ## This file is part of Octave.
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
4 ##
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
8 ## your option) any later version.
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
9 ##
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
13 ## General Public License for more details.
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
14 ##
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
18
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
19 ## -*- texinfo -*-
10793
be55736a0783 Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents: 8920
diff changeset
20 ## @deftypefn {Function File} {@var{h} =} findall ()
8507
cadc73247d65 style fixes
John W. Eaton <jwe@octave.org>
parents: 7557
diff changeset
21 ## @deftypefnx {Function File} {@var{h} =} findall (@var{prop_name}, @var{prop_value})
7557
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
22 ## @deftypefnx {Function File} {@var{h} =} findall (@var{h}, @dots{})
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
23 ## @deftypefnx {Function File} {@var{h} =} findall (@var{h}, "-depth", @var{d}, @dots{})
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
24 ## Find object with specified property values including hidden handles.
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
25 ##
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
26 ## This function performs the same function as @code{findobj}, but it
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
27 ## includes hidden objects in its search. For full documentation, see
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
28 ## @code{findobj}.
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
29 ## @seealso{get, set, findobj, allchild}
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
30 ## @end deftypefn
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
31
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
32 ## Author: Bill Denney <bill@denney.ws>
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
33
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
34 function h = findall (varargin)
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
35
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
36 unwind_protect
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
37 shh = get (0, "showhiddenhandles");
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
38 set (0, "showhiddenhandles", "on");
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
39 h = findobj (varargin{:});
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
40 unwind_protect_cleanup
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
41 set (0, "showhiddenhandles", shh);
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
42 end_unwind_protect
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
43
2ba84879f961 allchild.m, findall.m: new functions
bill@denney.ws
parents:
diff changeset
44 endfunction
13096
5553412c6614 Tests for scripts/plot
Kai Habel <kai.habel@gmx.de>
parents: 11523
diff changeset
45
5553412c6614 Tests for scripts/plot
Kai Habel <kai.habel@gmx.de>
parents: 11523
diff changeset
46 %!test
5553412c6614 Tests for scripts/plot
Kai Habel <kai.habel@gmx.de>
parents: 11523
diff changeset
47 %! hf = figure (1232, "visible", "off");
5553412c6614 Tests for scripts/plot
Kai Habel <kai.habel@gmx.de>
parents: 11523
diff changeset
48 %! unwind_protect
13111
ebb42fb2da04 Various fixes for tests in scripts/plot
Kai Habel <kai.habel@gmx.de>
parents: 13096
diff changeset
49 %! h = findall (hf);
ebb42fb2da04 Various fixes for tests in scripts/plot
Kai Habel <kai.habel@gmx.de>
parents: 13096
diff changeset
50 %! all_handles = {"uimenu"; "uimenu"; "uimenu"; "uimenu"; "uimenu"; "uimenu"; "uimenu"; "uimenu"; "uimenu"; "uimenu"; "uimenu"; "uimenu"; "uimenu"; "figure"};
13096
5553412c6614 Tests for scripts/plot
Kai Habel <kai.habel@gmx.de>
parents: 11523
diff changeset
51 %! assert (get (h, 'type'), all_handles)
5553412c6614 Tests for scripts/plot
Kai Habel <kai.habel@gmx.de>
parents: 11523
diff changeset
52 %! unwind_protect_cleanup
5553412c6614 Tests for scripts/plot
Kai Habel <kai.habel@gmx.de>
parents: 11523
diff changeset
53 %! close (hf);
5553412c6614 Tests for scripts/plot
Kai Habel <kai.habel@gmx.de>
parents: 11523
diff changeset
54 %! end_unwind_protect