Xdialog - (c)dialog replacement for X-Windows
SYNTAX
Xdialog [<common options>] [<transient options>] <box
option> ...
and:
Xdialog <special option>
DESCRIPTION
Xdialog is designed to be a drop in replacement for the
dialog and cdialog programs (BTW Xdialog may also be used
in place of gdialog). It converts any terminal based pro
gram into a program with an X-windows interface. The
dialogs are easier to see and use and the new widgets adds
even more functionnalities.
To achieve this, Xdialog uses the Gimp ToolKit (also known
as GTK+).
OPTIONS
The [<common options>] [<transient options>] <box option>
sequence may be repeated several times in the same Xdialog
command line (this is called dialog chaining). The com
mon/transient options may be omited but there must always
be a box option as the last Xdialog option.
Common options:
The <common options> are options applying to all following
<box options> until the same or opposite <common options>
are encountered into the Xdialog command line. These
options are mostly dealing with menu look, style, place
ment and behaviour.
Available common options:
--wmclass <name>
--rc-file <gtkrc filename>
--backtitle <backtitle>
--title <title>
--allow-close | --no-close
--screen-center | --under-mouse | --auto-placement
--center | --right | --left | --fill
--cr-wrap | --no-cr-wrap
--stderr | --stdout
--separator <character> | --separate-output
--buttons-style default|icon|text
Transient options:
The <transient options> only apply to the next <box
option> 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.
Available transient options:
--fixed-font
--password
This option may be repeated 2 or 3 times before
--2inputsbox or --3inputsbox.
--editable
--time-stamp | --date-stamp
--reverse
--keep-colors
--interval <timeout>
--no-tags
--item-help
When this option is used, the <helpN> parameters of
the --menubox, --checklist, --radiolist,
--buildlist and --treeview options must be speci
fied (while they must be omitted if --item-help is
not specified).
--default-item <tag>
--icon <xpm filename>
--no-ok
--no-cancel
--default-no
--wizard
--help <help>
--print <printer>
--check <label>
--beep
--beep-after
--begin <Yorg> <Xorg>
--ignore-eof
--smooth
Box options:
The <box option> tells to Xdialog which widget must be
used and is followed by three or more parameters:
the first parameter is a text string or a filename
(this depends on the box option);
the second and the third parameters are menu
<height> and <width> in characters. These two
parameters may be replaced by a single <XSIZExY
SIZE> parameter, giving the width and height in
pixels. When a size of 0 0 (or 0x0) is passed to
Xdialog, then the widget is auto-sized by GTK+.
When a size of -1 -1 (or -1x-1) is passed, then the
Xdialog widget is set to the maximum size so to fit
the screen. It is possible to give the widget an
absolute origin on the screen (provided your window
manager lets you do so), either by using the
--begin transient option (when the size is given in
characters) or by using a "-geometry"-like origin
(e.g. 400x200+20-30).
some box options require additional parameters such
as tags, menu items, labels or default values.
Available box options:
--yesno <text> <height> <width>
--msgbox <text> <height> <width>
--gauge <text> <height> <width> [<percent>]
--progress <text> <height> <width> [<maxdots>
[[-]<msglen>]]
--inputbox <text> <height> <width> [<init>]
--2inputsbox <text> <height> <width> <label1> <init1>
<label2> <init2>
--3inputsbox <text> <height> <width> <label1> <init1>
<label2> <init2> <label3> <init3>
--combobox <text> <height> <width> <item1> ... <itemN>
--rangebox <text> <height> <width> <min value> <max
value> [<default value>]
--2rangesbox <text> <height> <width> <label1> <min1>
<max1> <def1> <label2> <min2> <max2> <def2>
--3rangesbox <text> <height> <width> <label1> <min1>
<max1> <def1> <label2> <min2> <max2> <def2>
<label3> <min3> <max3> <def3>
--spinbox <text> <height> <width> <min> <max> <def>
<label>
--2spinsbox <text> <height> <width> <min1> <max1>
<def1> <label1> <min2> <max2> <def2> <label2>
--3spinsbox <text> <height> <width> <min1> <max1>
<def1> <label1> <min2> <max2> <def2> <label2>
<min3> <max3> <def3> <label3>
--textbox <file> <height> <width>
--editbox <file> <height> <width>
--tailbox <file> <height> <width>
--logbox <file> <height> <width>
--menubox <text> <height> <width> <menu height>
<tag1> <item1> {<help1>}...
--checklist <text> <height> <width> <list height>
<tag1> <item1> <status1> {<help1>}...
--radiolist <text> <height> <width> <list height>
<tag1> <item1> <status1> {<help1>}...
<tag1> <item1> <status1> {<help1>}...
--treeview <text> <height> <width> <list height>
<tag1> <item1> <status1> <item_depth1> {<help1>}...
--fselect <file> <height> <width>
--dselect <directory> <height> <width>
--calendar <text> <height> <width> <day> <month>
<year>
--timebox <text> <height> <width>
Special options:
The <special options> 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).
Available special options:
--version (prints version number to stderr and
exits).
--print-version (same as above in a
cdialog-compatible way).
--print-maxsize (prints maximum menu size in
characters and exits).
DIAGNOSTICS
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).
When Xdialog terminates (i.e. when all the <box options>
are processed or when an error occurs), the exit code may
take the following values:
0 : OK, Yes or Next button pressed.
1 : Cancel or No button pressed.
2 : Help button pressed (when the --help transient
option was passed an empty string).
3 : Previous button pressed (--wizard transient option in
force).
window manager (same exit code as when the ESC key
is pressed in (c)dia log).
Note that when chaining dialogs, the chain is broken and
Xdialog terminates as soon as a widget returns a non zero
exit code.
FILES
/usr/bin/Xdialog
/usr/share/locale/*/LC_MESSAGES/Xdialog.mo
/usr/share/man/man1/Xdialog.1*
/usr/share/doc/Xdialog-2.0.2/*
/usr/share/doc/Xdialog-2.0.2/samples/*
ENVIRONMENT VARIABLES
XDIALOG_HIGH_DIALOG_COMPAT
When set to 1 or true (case insensitive), this
environment variable turns the (c)dialog high com
patibility mode on. The net effect is that:
- a fixed (monospacing) font is used in all Xdialog
widgets (including labels, tags, menu/list items
and buttons);
- the --left common option is used as the default
justification option instead of the --center one;
- the <text> wrapping is always in force (--wrap)
and the --fill option is ignored.
- the --no-cr-wrap common option is used as the
default instead of the --cr-wrap one (but it does
not apply to the <backtitle> in this case).
- regardless of the specified box size, the
auto-sizing feature of Xdialog is forced when XDIA
LOG_FORCE_AUTOSIZE environment variable is set it
to 1 or true. This makes for the sizing problems of
some menus (e.g. when the specified box size is
actually too small for the number of specified
menu/list entries to fit).
- the Cancel button is not displayed into the tail
box and textbox widgets;
- the infobox widget is turned into a msgbox unless
the XDIALOG_INFOBOX_TIMEOUT environment variable is
set (in 1/1000s) and greater than 0, in which case
an actual infobox without button is used;
- the --version special option returns the same
string as --print-version.
XDIALOG_INFOBOX_TIMEOUT
See the notes about XDIALOG_HIGH_DIALOG_COMPAT
above.
EXAMPLES
Sample scripts are available in the /usr/share/doc/Xdia
log-2.0.2/samples/ directory.
Full HTML doc with screen shots, examples and FAQ is
available in the /usr/share/doc/Xdialog-2.0.2/ directory.
AUTHORS
Thierry Godefroy <xdialog@free.fr> (from v1.1.0 onwards)
Alfred Reynolds <alfred@cyberone.com.au> (v1.0 only)
SEE ALSO
dialog(1), cdialog(1)
Man(1) output converted with
man2html