Mercurial > hg > octave-nkf
annotate scripts/plot/util/findall.m @ 19218:d6f1f46e5b8f stable
Fix double '-P' in print command to printer (bug #41957).
* print.m: Expand documentation of latex and latexstandalone options.
Change some of the documentation examples to use more useful, modern devices
(jpg instead of HP DeskJet 550C). Use isempty to determine in there is a
figure to print. Remove extra '-P' from print command going directly to
printer.
author | Michael Godfrey <michaeldgodfrey@gmail.com> |
---|---|
date | Tue, 25 Mar 2014 17:00:41 +0000 |
parents | da3586730ea0 |
children | 52e01aa1fe8b |
rev | line source |
---|---|
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
17572
diff
changeset
|
1 ## Copyright (C) 2008-2013 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 () |
17122
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
21 ## @deftypefnx {Function File} {@var{h} =} findall (@var{prop_name}, @var{prop_value}, @dots{}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
22 ## @deftypefnx {Function File} {@var{h} =} findall (@var{prop_name}, @var{prop_value}, "-@var{logical_op}", @var{prop_name}, @var{prop_value}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
23 ## @deftypefnx {Function File} {@var{h} =} findall ("-property", @var{prop_name}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
24 ## @deftypefnx {Function File} {@var{h} =} findall ("-regexp", @var{prop_name}, @var{pattern}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
25 ## @deftypefnx {Function File} {@var{h} =} findall (@var{hlist}, @dots{}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
26 ## @deftypefnx {Function File} {@var{h} =} findall (@var{hlist}, "flat", @dots{}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
27 ## @deftypefnx {Function File} {@var{h} =} findall (@var{hlist}, "-depth", @var{d}, @dots{}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
28 ## Find graphics object, including hidden ones, with specified property values. |
7557 | 29 ## |
17122
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
30 ## The return value @var{h} is a list of handles to the found graphic objects. |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
31 ## |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
32 ## @code{findall} performs the same search as @code{findobj}, but it |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17238
diff
changeset
|
33 ## includes hidden objects (HandleVisibility = @qcode{"off"}). For full |
17122
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
34 ## documentation, @pxref{XREFfindobj,,findobj}. |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
35 ## @seealso{findobj, allchild, get, set} |
7557 | 36 ## @end deftypefn |
37 | |
38 ## Author: Bill Denney <bill@denney.ws> | |
39 | |
40 function h = findall (varargin) | |
41 | |
42 unwind_protect | |
43 shh = get (0, "showhiddenhandles"); | |
44 set (0, "showhiddenhandles", "on"); | |
45 h = findobj (varargin{:}); | |
46 unwind_protect_cleanup | |
47 set (0, "showhiddenhandles", shh); | |
48 end_unwind_protect | |
49 | |
50 endfunction | |
13096 | 51 |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
52 |
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
53 %!testif HAVE_FLTK |
17107
dbd64c9a16da
Restore graphics toolkit after %!tests that alter it.
Rik <rik@octave.org>
parents:
14138
diff
changeset
|
54 %! toolkit = graphics_toolkit ("fltk"); |
17119
bd50e0660545
test: Add missing semicolons to suppress output in some plot %!tests.
Rik <rik@octave.org>
parents:
17107
diff
changeset
|
55 %! 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
|
56 %! unwind_protect |
13111
ebb42fb2da04
Various fixes for tests in scripts/plot
Kai Habel <kai.habel@gmx.de>
parents:
13096
diff
changeset
|
57 %! h = findall (hf); |
17238
3fd617363762
findobj.m: Return handles in hierarchy order rather than sorted order (bug #39767).
Rik <rik@octave.org>
parents:
17122
diff
changeset
|
58 %! all_handles(1) = {"figure"}; |
17868 | 59 %! all_handles(2:12,1) = {"uimenu"}; |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
60 %! assert (get (h, "type"), all_handles); |
13096 | 61 %! unwind_protect_cleanup |
62 %! close (hf); | |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
63 %! graphics_toolkit (toolkit); |
13096 | 64 %! 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
|
65 |