comparison scripts/gui/msgbox.m @ 20071:98d10871018a

Accept CREATEMODE argument for errordlg, warndlg, msgbox (bug #44775). * errordlg.m: Update docstring. Use varargin to pass extra argument to msg_box. * warndlg.m: Update docstring. Use varargin to pass extra argument to msg_box. * msgbox.m: Update docstring. * message_dialog.m: Issue warning if unimplemented CREATEMODE argument given. Issue warning if icon type "custom" is used.
author Rik <rik@octave.org>
date Sat, 11 Apr 2015 08:18:42 -0700
parents 0e1f5a750d00
children
comparison
equal deleted inserted replaced
20070:d7f7ce99532b 20071:98d10871018a
18 18
19 ## -*- texinfo -*- 19 ## -*- texinfo -*-
20 ## @deftypefn {Function File} {@var{h} =} msgbox (@var{msg}) 20 ## @deftypefn {Function File} {@var{h} =} msgbox (@var{msg})
21 ## @deftypefnx {Function File} {@var{h} =} msgbox (@var{msg}, @var{title}) 21 ## @deftypefnx {Function File} {@var{h} =} msgbox (@var{msg}, @var{title})
22 ## @deftypefnx {Function File} {@var{h} =} msgbox (@var{msg}, @var{title}, @var{icon}) 22 ## @deftypefnx {Function File} {@var{h} =} msgbox (@var{msg}, @var{title}, @var{icon})
23 ## @deftypefnx {Function File} {@var{h} =} msgbox (@dots{}, @var{createmode})
23 ## Display @var{msg} using a message dialog box. 24 ## Display @var{msg} using a message dialog box.
24 ## 25 ##
25 ## The message may have multiple lines separated by newline characters 26 ## The message may have multiple lines separated by newline characters
26 ## (@qcode{"\n"}), or it may be a cellstr array with one element for each 27 ## ("\n"), or it may be a cellstr array with one element for each
27 ## line. The optional input @var{title} (character string) can be used to 28 ## line. The optional input @var{title} (character string) can be used to
28 ## decorate the dialog caption. 29 ## decorate the dialog caption.
29 ## 30 ##
30 ## The optional argument @var{icon} selects a dialog icon. 31 ## The optional argument @var{icon} selects a dialog icon.
31 ## It can be one of @qcode{"none"} (default), @qcode{"error"}, 32 ## It can be one of @qcode{"none"} (default), @qcode{"error"},
32 ## @qcode{"help"}, or @qcode{"warn"}. 33 ## @qcode{"help"}, or @qcode{"warn"}.
33 ## 34 ##
34 ## The return value is always 1. 35 ## The return value is always 1.
36 ##
37 ## Compatibility Note: The optional argument @var{createmode} is accepted for
38 ## @sc{matlab} compatibility, but is not implemented.
39 #
35 ## @seealso{errordlg, helpdlg, inputdlg, listdlg, questdlg, warndlg} 40 ## @seealso{errordlg, helpdlg, inputdlg, listdlg, questdlg, warndlg}
36 ## @end deftypefn 41 ## @end deftypefn
37 42
38 function retval = msgbox (msg, title = "", varargin) 43 function retval = msgbox (msg, title = "", varargin)
39 44
40 if (nargin < 1 || nargin > 3) 45 if (nargin < 1 || nargin > 4)
41 print_usage (); 46 print_usage ();
42 endif 47 endif
43 48
44 retval = message_dialog ("msgbox", msg, title, varargin{:}); 49 retval = message_dialog ("msgbox", msg, title, varargin{:});
45 50