The common options apply to all the following box options until the same or opposite common options are encountered into the Xdialog command line; each common option either got one opposite or several complementary options, or allow to reset the parameter they change to its default value; their effect may therefore later be cancelled or changed for the other box options that follow in a chained dialogs command line.
This option allows to set the window manager class name for Xdialog so that its window may be differenciated and decorated differently from other applications windows. This, of course, will depend on your window manager features... This also allows to use different decorations for different scripts using Xdialog. The --wmclass option must be followed by a <name> (the wmclass name of Xdialog then becomes <name>/<name>).
This option allows to change the GTK+ theme for the following box options into the Xdialog command line. This option must be followed by the name of a file in the gtkrc format. As an example, the following lines may be put into a rc file which name will be passed to Xdialog after the --rc-file option; the result will be blue Xdialog boxes with white text:
bluebox.rc file contents:
style 'blue_background' { bg[NORMAL] = { 0.0, 0.3, 0.8 } fg[NORMAL] = { 1.0, 1.0, 1.0 } } widget '*' style 'blue_background'Using the bluebox.rc file: Xdialog --rc-file bluebox.rc --msgbox "--rc-file demonstration." 0 0 |
Result:
|
|
Title, backtitle and text positions in Xdialog windows:
|
--allow-close is the default and entitles the user to close the Xdialog window through the window manager; when a close event is received by Xdialog, it exits immediately and returns 255 as the exit code to the shell. Specifying --no-close will make Xdialog ignore any close (sometimes called delete) event originating from the window manager. Note that it is always possible, although not recommended, to destroy a Xdialog window using the window manager destroy event.
These options control the Xdialog widgets placement (ditto). The default is --screen-center. The --auto-placement option lets the window manager decide where to pop up Xdialog widgets. Note that some window managers may perfectly ignore these options (which are only requests sent by GTK+ to the window manager) and place the widgets where they feel like...
These options instruct Xdialog to justify the text centered, left or right into the text and backtitle labels. Default is --center. The effect of these options is only sensible for multiple-lines text/backtitle.
They also affect the labels used in --2inputsbox, --3inputsbox, --2rangesbox and --3rangesbox widgets above each text entry/horizontal slider, even if these labels are held on a single line.
When --wrap is is force, Xdialog automatically wraps the backtitle and text around so to make them fit the widget width. Note that because of what I consider to be a bug in GTK+, this will only work if the auto-size feature of GTK+ is in force, i.e. if a size of 0 0 (or 0x0) was passed to Xdialog. The default is --no-wrap.
The default behaviour of Xdialog is to mimic (c)dialog and send all its results to stderr. This may sometimes be inapropriate and you may want to get separate output (one for the true errors/warnings and one for the results). This is why the "--stdout" common option was implemented: it makes Xdialog to output all the widgets results to stdout instead of stderr. The "--stderr" common option is there so that you can revert to the default stderr output in a chained dialogs command line.
The --separator option allows to change the separator used by the Xdialog widgets that return more than one result (--2inputsbox, --3inputsbox, --2rangesbox, --3rangesbox, --checklist, --buildlist). The default separator is "/" but this may be unpractical to use such a separator. You can therefore change the separator to any character (examples: "\n" (line feed) or "|").
The --separate-output is a (c)dialog compatible option and is synonym to --separator "\n".
Note: former Xdialog releases used the "\n" (line feed) as a results separator for the --checklist widget; this has been changed to "/" in Xdialog v1.5.0 so to make it compatible with (c)dialog. In your old scripts using the Xdialog checklist, you will then have to add the --separate-output option before the --checklist one.
The --buttons-style option must be followed by a parameter (the style name, case sensitive !) which must be either "default" (both icon and text in each button), "icon" (icon only in each button) or "text" (text only in each button). The button style does not apply to the OK and Cancel buttons of the --fselect and --dselect widgets (because these widgets are almost entirely set up by GTK+ itself and Xdialog got very little control over them).