Mercurial > octave
annotate scripts/gui/helpdlg.m @ 27919:1891570abac8
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2020.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 06 Jan 2020 22:29:51 -0500 |
parents | b442ec6dda5c |
children | bd51beb6205e |
rev | line source |
---|---|
27919
1891570abac8
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27918
diff
changeset
|
1 ## Copyright (C) 2010-2020 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
2 ## |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
3 ## See the file COPYRIGHT.md in the top-level directory of this distribution |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
4 ## or <https://octave.org/COPYRIGHT.html/>. |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
5 ## |
15625
acf0addfc610
include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
6 ## |
15746
da26f72408a7
update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents:
15709
diff
changeset
|
7 ## This file is part of Octave. |
15625
acf0addfc610
include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 ## |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
9 ## Octave is free software: you can redistribute it and/or modify it |
15746
da26f72408a7
update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents:
15709
diff
changeset
|
10 ## under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
11 ## the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
12 ## (at your option) any later version. |
15746
da26f72408a7
update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents:
15709
diff
changeset
|
13 ## |
da26f72408a7
update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents:
15709
diff
changeset
|
14 ## Octave is distributed in the hope that it will be useful, but |
da26f72408a7
update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents:
15709
diff
changeset
|
15 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
17 ## GNU General Public License for more details. |
15625
acf0addfc610
include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
18 ## |
acf0addfc610
include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
19 ## You should have received a copy of the GNU General Public License |
15746
da26f72408a7
update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents:
15709
diff
changeset
|
20 ## along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
21 ## <https://www.gnu.org/licenses/>. |
15625
acf0addfc610
include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
22 |
acf0addfc610
include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
23 ## -*- texinfo -*- |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
24 ## @deftypefn {} {} helpdlg () |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
25 ## @deftypefnx {} {} helpdlg (@var{msg}) |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
26 ## @deftypefnx {} {} helpdlg (@var{msg}, @var{title}) |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
27 ## @deftypefnx {} {@var{h} =} helpdlg (@dots{}) |
21637
59ebef9680ef
More cleanup associated with removing Java dialog boxes (cset b5d9b95d1e1a).
Rik <rik@octave.org>
parents:
21630
diff
changeset
|
28 ## Display a help dialog box with help message @var{msg} and caption |
59ebef9680ef
More cleanup associated with removing Java dialog boxes (cset b5d9b95d1e1a).
Rik <rik@octave.org>
parents:
21630
diff
changeset
|
29 ## @var{title}. |
59ebef9680ef
More cleanup associated with removing Java dialog boxes (cset b5d9b95d1e1a).
Rik <rik@octave.org>
parents:
21630
diff
changeset
|
30 ## |
26035
0a39db17170c
doc: Clean up docstrings for XXXdlg.m functions
Rik <rik@octave.org>
parents:
25948
diff
changeset
|
31 ## The default help message is @qcode{"This is the default help string.@:"} |
0a39db17170c
doc: Clean up docstrings for XXXdlg.m functions
Rik <rik@octave.org>
parents:
25948
diff
changeset
|
32 ## and the default caption is @qcode{"Help Dialog"}. |
21630
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
33 ## |
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
34 ## The help message may have multiple lines separated by newline characters |
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
35 ## ("\n"), or it may be a cellstr array with one element for each line. |
15709
9fee0b741de6
Update Java dialog scrips to latest octave-forge status
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
15625
diff
changeset
|
36 ## |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
37 ## The return value @var{h} is a handle to the figure object used for |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
38 ## building the dialog. |
21630
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
39 ## |
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
40 ## Examples: |
20173
777f26aa8e3e
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
17745
diff
changeset
|
41 ## |
21630
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
42 ## @example |
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
43 ## @group |
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
44 ## helpdlg ("Some helpful text for the user."); |
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
45 ## helpdlg ("Some helpful text\nwith two lines."); |
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
46 ## helpdlg (@{"Some helpful text", "with two lines."@}); |
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
47 ## helpdlg ("Some helpful text for the user.", "Fancy caption"); |
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
48 ## @end group |
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
49 ## @end example |
15748
54e8c2527a9e
style and doc fixes for newly imported Java package .m files
John W. Eaton <jwe@octave.org>
parents:
15746
diff
changeset
|
50 ## |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
51 ## @seealso{errordlg, warndlg, msgbox, inputdlg, listdlg, questdlg} |
15625
acf0addfc610
include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
52 ## @end deftypefn |
acf0addfc610
include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
53 |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
54 function h = helpdlg (varargin) |
21630
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
55 |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
56 msg = "This is the default help."; |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
57 tit = "Help Dialog"; |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
58 opt = "non-modal"; |
21630
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
59 |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
60 nargs = numel (varargin); |
25948
700b3f415ebe
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
25921
diff
changeset
|
61 |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
62 if (nargs > 2) |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
63 print_usage (); |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
64 elseif (nargs == 1) |
21637
59ebef9680ef
More cleanup associated with removing Java dialog boxes (cset b5d9b95d1e1a).
Rik <rik@octave.org>
parents:
21630
diff
changeset
|
65 msg = varargin{1}; |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
66 elseif (nargs == 2) |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
67 msg = varargin{1}; |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
68 tit = varargin{2}; |
21630
b5d9b95d1e1a
Removing Java dialog boxes.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
20852
diff
changeset
|
69 endif |
25948
700b3f415ebe
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
25921
diff
changeset
|
70 |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
71 htmp = msgbox (msg, tit, "help", opt); |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
72 |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
73 if (nargout) |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
74 h = htmp; |
15772
0f1a143e5002
Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents:
15750
diff
changeset
|
75 endif |
15709
9fee0b741de6
Update Java dialog scrips to latest octave-forge status
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
15625
diff
changeset
|
76 |
15625
acf0addfc610
include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
77 endfunction |
15772
0f1a143e5002
Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents:
15750
diff
changeset
|
78 |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
79 ## No BIST tests. This function just dispatches to msgbox(). |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
80 %!assert (1) |