Mercurial > hg > octave-nkf
comparison scripts/gui/helpdlg.m @ 17700:dba2e06dcdb5
maint: Move scripts/ui directory into scripts/gui directory.
* scripts/gui/errordlg.m, scripts/gui/helpdlg.m, scripts/gui/inputdlg.m,
scripts/gui/listdlg.m, scripts/gui/msgbox.m,
scripts/gui/private/message_dialog.m, scripts/gui/questdlg.m,
scripts/gui/warndlg.m: Moved from scripts/ui directory.
* scripts/gui/module.mk: Add scripts to build system.
* scripts/Makefile.am: Remove include for ui/module.mk
* scripts/ui/module.mk: Remove unused file.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 19 Oct 2013 12:05:50 -0700 |
parents | scripts/ui/helpdlg.m@bc924baa2c4e |
children | d63878346099 |
comparison
equal
deleted
inserted
replaced
17699:1be2993d3656 | 17700:dba2e06dcdb5 |
---|---|
1 ## Copyright (C) 2010 Martin Hepperle | |
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 -*- | |
20 ## @deftypefn {Function File} {@var{h} =} helpdlg (@var{msg}) | |
21 ## @deftypefnx {Function File} {@var{h} =} helpdlg (@var{msg}, @var{title}) | |
22 ## Display @var{msg} in a help dialog box. | |
23 ## | |
24 ## The message may have multiple lines separated by newline characters | |
25 ## ("\n"), or it may be a cellstr array with one element for each | |
26 ## line. The optional input @var{title} (character string) can be used to | |
27 ## set the dialog caption. The default title is @qcode{"Help Dialog"}. | |
28 ## | |
29 ## The return value is always 1. | |
30 ## @seealso{errordlg, inputdlg, listdlg, msgbox, questdlg, warndlg} | |
31 ## @end deftypefn | |
32 | |
33 function retval = helpdlg (msg, title = "Help Dialog") | |
34 | |
35 if (nargin < 1 || nargin > 2) | |
36 print_usage (); | |
37 endif | |
38 | |
39 retval = message_dialog ("helpdlg", msg, title, "help"); | |
40 | |
41 endfunction | |
42 | |
43 | |
44 %!demo | |
45 %! disp ('- test helpdlg with a help message only.'); | |
46 %! helpdlg ("Below, you should see 3 lines:\nline #1\nline #2, and\nline #3."); | |
47 | |
48 %!demo | |
49 %! disp ('- test helpdlg with help message and caption.'); | |
50 %! helpdlg ('You should see a single line.','A help dialog'); | |
51 |