Sophie

Sophie

distrib > Mageia > 6 > i586 > by-pkgid > 4174c5d615fc447bb42b54c389ed1453 > files > 114

Xdialog-2.3.1-8.mga6.i586.rpm

<html>
<head>
<title>Xdialog documentation - General syntax and usage</title>
</head>
<body bgcolor="#102050" text="#F0E0A0" link="#00E000" vlink="#FF00B0" alink="#FF0000">
<table border=0 width="100%"><tr>
<td align="left"><a href="intro.html">previous</a><a name="TOP">&nbsp;</a>&nbsp;<a href="common.html">next</a>&nbsp;&nbsp;<a href="index.html">contents</a></td>
<td align="right"><a href="#BOTTOM">bottom</a></td>
</tr></table>
<hr>
<center>
<h1>Xdialog documentation - General syntax and usage</h1>
<hr width=30%>
</center>
<p>&nbsp;
<h2>Usage:</h2>
<pre>Xdialog [&lt;<a href="gtk.html">GTK+ options</a>&gt;] [&lt;common options&gt;] [&lt;transient options&gt;] &lt;box option&gt; ...</pre>
<p>and:
<pre>Xdialog &lt;special option&gt;</pre>
<p align="justify">The [&lt;common options&gt;] [&lt;transient options&gt;] &lt;box option&gt; sequence may be repeated several times in the same Xdialog command line (this is called <b>dialog chaining</b>). The common/transient options may be omited but there must always be a &lt;box option&gt; as the last Xdialog option.
<ul>
<p><li>The &lt;<a href="common.html">common options</a>&gt; are options applying to all following &lt;box options&gt; until the same or opposite &lt;common options&gt; are encountered into the Xdialog command line. These options are mostly dealing with menu look, style, placement and behaviour.
<p><li>The &lt;<a href="transient.html">transient options</a>&gt; only apply to the next &lt;box option&gt; into the Xdialog command line. These options are used to tune the widgets (number and type of buttons, menu icon) or to trigger some of the widgets specific features.
<p><li>The &lt;<a href="box.html">box option</a>&gt; tells to Xdialog which widget must be used and is followed by three or more parameters:
<ul>
<li>the first parameter is a text string or a filename (this depends on the box option);
<li>the second and the third parameters are menu &lt;height&gt; and &lt;width&gt; in characters;
<li>some box options require additional parameters such as tags, menu items, labels or default values.
</ul>
<p align="justify">On completion of each box option (i.e. every time a widget is closed) Xdialog sends any result (text, numbers) as one or more strings to stderr (this can be changed so that the results are sent to stdout thanks to a common option).
<p align="justify">When Xdialog terminates (i.e. when all the &lt;box options&gt; are processed or when an error occurs), the exit code may take the following values:
<ul><p>
<li><b>0</b>&nbsp;:&nbsp;<i>OK</i>, <i>Yes</i> or <i>Next</i> button pressed.
<li><b>1</b>&nbsp;:&nbsp;<i>Cancel</i> or <i>No</i> button pressed.
<li><b>2</b>&nbsp;:&nbsp;<i>Help</i> button pressed (see the --help transient option for details).
<li><b>3</b>&nbsp;:&nbsp;<i>Previous</i> button pressed (see the --wizard transient option for details).
<li><b>255</b>&nbsp;:&nbsp;an error occured or the box was closed through the window manager (same exit code as when the ESC key is pressed in (c)dialog).
</ul>
<p align="justify">Note that when chaining dialogs, the chain is broken and Xdialog terminates as soon as a widget returns a non zero exit code.
<p align="justify">When using Xdialog from a shell, it is therefore usually invoked as follow:
<pre>
RESULTS=`Xdialog --stdout ...` # It is also possible to redirect Xdialog output to a temporary file.
EXIT_CODE=$?
case $EXIT_CODE in
    0) # All OK. The $RESULTS variable holds everything entered/choosed by the user.
       .../...
       ;;
    1) # Cancel/No pressed.
       .../...
       ;;
  255) # An error occured or the box was closed.
       .../...
       ;;
esac
</pre>
<p align="justify">For examples of how to use each widget, please read the <a href="box.html">box options</a> section of this documentation and browse the <a href="samples/">samples directory</a>.
<p><li>The &lt;<a href="special.html">special options</a>&gt; take no parameter and are to be used alone into the command line. They just make Xdialog to print a string on stderr and to exit immediately (with a 0 exit code).
</ul>
<p align="justify">See also the <a href="compatibility.html#FEATURES">(c)dialog compatibility notes</a>.
<hr>
<table border=0 width="100%"><tr>
<td align="left"><a href="intro.html">previous</a><a name="BOTTOM">&nbsp;</a>&nbsp;<a href="common.html">next</a>&nbsp;&nbsp;<a href="index.html">contents</a></td>
<td align="right"><a href="#TOP">top</a></td>
</tr></table>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</body>
</html>