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