Typos and improvements
[scilab.git] / scilab / modules / gui / help / en_US / messagebox.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="messagebox">
3     <refnamediv>
4         <refname>messagebox</refname>
5         <refpurpose>Open a message box.</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Calling Sequence</title>
9         <synopsis>
10             [btn] = messagebox(msg)
11             [btn] = messagebox(msg, msgboxtitle)
12             [btn] = messagebox(msg, msgboxtitle, msgboxicon)
13             [btn] = messagebox(msg, msgboxtitle, msgboxicon)
14             [btn] = messagebox(msg, msgboxtitle, msgboxicon, buttons)
15             [btn] = messagebox(msg, msgboxtitle, msgboxicon, buttons, ismodal)
16         </synopsis>
17     </refsynopsisdiv>
18     <refsection>
19         <title>Arguments</title>
20         <variablelist>
21             <varlistentry>
22                 <term>msg</term>
23                 <listitem>
24                     <para>Matrix of strings: the message box displays each entry of this matrix (one entry per line).</para>
25                 </listitem>
26             </varlistentry>
27             <varlistentry>
28                 <term>msgboxtitle</term>
29                 <listitem>
30                     <para>String: the title of the message box (default value is "Scilab Message").</para>
31                 </listitem>
32             </varlistentry>
33             <varlistentry>
34                 <term>msgboxicon</term>
35                 <listitem>
36                     <para>String: the name of the icon to be displayed in the message box, its possible values are:</para>
37                     <itemizedlist>
38                         <listitem>
39                             <para>"error"</para>
40                         </listitem>
41                         <listitem>
42                             <para>"hourglass"</para>
43                         </listitem>
44                         <listitem>
45                             <para>"info"</para>
46                         </listitem>
47                         <listitem>
48                             <para>"passwd"</para>
49                         </listitem>
50                         <listitem>
51                             <para>"question"</para>
52                         </listitem>
53                         <listitem>
54                             <para>"warning"</para>
55                         </listitem>
56                         <listitem>
57                             <para>"scilab": default icon</para>
58                         </listitem>
59                     </itemizedlist>
60                 </listitem>
61             </varlistentry>
62             <varlistentry>
63                 <term>buttons</term>
64                 <listitem>
65                     <para>1xn vector of strings: the names of the buttons to be displayed in the message box. By default, only one button is displayed with label "OK".</para>
66                 </listitem>
67             </varlistentry>
68             <varlistentry>
69                 <term>modal</term>
70                 <listitem>
71                     <para>String: "modal" to create a modal dialog, any other string to create a non-modal dialog. Please note that "modal" can replace any of the other input arguments except msg (See examples).</para>
72                 </listitem>
73             </varlistentry>
74             <varlistentry>
75                 <term>btn</term>
76                 <listitem>
77                     <para>Scalar: number of the button that the user pressed (1 is the leftmost button) for a modal dialog, 0 else.</para>
78                 </listitem>
79             </varlistentry>
80         </variablelist>
81     </refsection>
82     <refsection>
83         <title>Description</title>
84         <para>Creates a dialog window to display a message waiting or not for a user action.</para>
85     </refsection>
86     <refsection>
87         <title>Examples</title>
88         <programlisting role="example"><![CDATA[ 
89 // Simple example
90 messagebox("Single line message")
91
92 // Multi line message with title
93 messagebox(["Multi-line" "message"], "User defined title")
94
95 // Icon specified by the user
96 messagebox("An error message", "Error", "error")
97
98 // Buttons labels + "modal" replaces title
99 messagebox("Have you seen this beautiful message", "modal", "info", ["Yes" "No"])
100
101 // "modal" given as fifth input argument
102 messagebox("An error message", "Error", "error", ["Continue" "Stop"], "modal")
103  ]]></programlisting>
104     </refsection>
105 </refentry>