Mercurial > hg > octave-lyh
annotate scripts/plot/findall.m @ 13977:08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
* graphics_toolkit.m: Correct @deftypefn to @deftypefnx for Texinfo to build
* allchild.m: Eliminate unnecessary for loop. Only run test if FLTK toolkit
is available.
* findall.m, uimenu.m: Only run test if FLTK toolkit is available.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Fri, 02 Dec 2011 14:48:45 -0800 |
parents | e81ddf9cacd5 |
children | 5f0bb45e615c |
rev | line source |
---|---|
11523 | 1 ## Copyright (C) 2008-2011 Bill Denney |
7557 | 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 -*- | |
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 | 21 ## @deftypefnx {Function File} {@var{h} =} findall (@var{prop_name}, @var{prop_value}) |
7557 | 22 ## @deftypefnx {Function File} {@var{h} =} findall (@var{h}, @dots{}) |
23 ## @deftypefnx {Function File} {@var{h} =} findall (@var{h}, "-depth", @var{d}, @dots{}) | |
24 ## Find object with specified property values including hidden handles. | |
25 ## | |
26 ## This function performs the same function as @code{findobj}, but it | |
27 ## includes hidden objects in its search. For full documentation, see | |
28 ## @code{findobj}. | |
29 ## @seealso{get, set, findobj, allchild} | |
30 ## @end deftypefn | |
31 | |
32 ## Author: Bill Denney <bill@denney.ws> | |
33 | |
34 function h = findall (varargin) | |
35 | |
36 unwind_protect | |
37 shh = get (0, "showhiddenhandles"); | |
38 set (0, "showhiddenhandles", "on"); | |
39 h = findobj (varargin{:}); | |
40 unwind_protect_cleanup | |
41 set (0, "showhiddenhandles", shh); | |
42 end_unwind_protect | |
43 | |
44 endfunction | |
13096 | 45 |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
46 |
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
47 %!testif HAVE_FLTK |
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
48 %! toolkit = graphics_toolkit (); |
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
49 %! graphics_toolkit ("fltk"); |
13124
2ea1658ad049
Don't use explicit figure number for tests to avoid interference with any figures opened by user.
Kai Habel <kai.habel@gmx.de>
parents:
13111
diff
changeset
|
50 %! hf = figure ("visible", "off"); |
13141
e81ddf9cacd5
maint: untabify and remove trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
13124
diff
changeset
|
51 %! unwind_protect |
13111
ebb42fb2da04
Various fixes for tests in scripts/plot
Kai Habel <kai.habel@gmx.de>
parents:
13096
diff
changeset
|
52 %! h = findall (hf); |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
53 %! all_handles(1:13,1) = {"uimenu"}; |
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
54 %! all_handles(14) = {"figure"}; |
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
55 %! assert (get (h, "type"), all_handles); |
13096 | 56 %! unwind_protect_cleanup |
57 %! close (hf); | |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
58 %! graphics_toolkit (toolkit); |
13096 | 59 %! end_unwind_protect |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
60 |