YORN(1)

NAME
yorn - display a dialogue box

SYNOPSIS
yorn [ -z ] [ -standard X Toolkit options ... ] "TITLE" text to be displayed

DESCRIPTION
Yorn is a utility that asks the user a question that can be answered yes or no. It displays a question mark symbol, some justified text and two buttons labelled with a tick and a cross, representing yes or no respectively. The question can be answered by clicking one of the boxes with the mouse.

If the connection to the X server cannot be established, the title and text is printed on yorn's standard output and the user is requested to press Y or N to answer the question.

Yorn can take the following option:

-z  No Zoom. The window will attempt to by pass the window manager and appear immediately, rather than going through the window manager's placement and sizing scheme.

yorn additionally recognizes the following standard X Toolkit command line arguments:

-bg colour or -background colour
    This option specifies the colour to use for the background of the window and widgets. The default is `white.'

-bd colour or -bordercolor colour
    This option specifies the colour to use for the border of the main window. The default is `black.'

-bw number or -borderwidth number
    This option specifies the width in pixels of the border surrounding the main window.

-fg colour or -foreground colour
    This option specifies the colour to use for all text and symbols. The default is `black'.

-fn font
    This option specifies the font to be used for displaying the text warning message. The default is `serif10'.

-name name
    This option specifies the application name under which resources are to be obtained, rather than the default executable file name, `yorn'.

-geometry geometry
    This option specifies the preferred size and position yorn window; see X(1);

-display display
    This option specifies the X server to contact; see X(1).

-xrm resourcestring
    This option specifies a resource string to be used. This is especially useful for setting resources that do not have separate command line options.

X DEFAULTS
Yorn is implemented using the Athena widgets. Each widget can individually or in groups have various visual and operational aspects changed via a `.Xdefaults' file on the client machine or the `RESOURCE_MANAGER' property on the server. All widgets have a common set of resources (background, backgroundPixmap, etc.) and resources unique to each type of widget; a `command button' widget, for example, also has a cursor resource. For a full list see the document X Toolkit Widgets - C Language X Interface.

The path names and types of all widgets used by yorn are as follows:

XXX.alert/yorn
    The widget that is a child of root. All the other widgets used by the yorn box are children or grand children of this widget.

XXX.alert/yorn.contents
    A form widget that manages the layout of the yorn box. Normally completely covers the `alert/yorn' widget.

XXX.alert/yorn.contents.symbol
    A widget to display the `query' symbol.

XXX.alert/yorn.contents.ok/yes button
    A command button widget to obtain a `yes' answer from the user, normally displaying a `tick' symbol.

XXX.alert/yorn.contents.no button
    A command button widget to obtain a `no' answer from the user, normally displaying a `cross' symbol.

XXX.alert/yorn.contents.message
    A widget to display and format the text message. The `XXX' may be replaced by either yorn's classname, `Xopentop', or its application name, `yorn'.

Additionally, the following items are also fetched from the resource database:

yornsym
    The pathname of a bitmap file to use as an alternative to the `question-mark-in-a-triangle' symbol displayed in the `symbol' widget.

ticksym
    The pathname of a bitmap file to use as an alternative to the `tick' symbol displayed in the `ok/yes button' widget.

crosssym
    The pathname of a bitmap file to use as an alternative to the `cross' symbol displayed in the `no button' widget.

backgroundPixmap.foreground
    One of two colours (the other is the widget's background colour) required when converting a bitmap file into a pixmap for use as the widget's background pixmap.

RETURN CODES

    0 - Termination via the tick box.

    1 - Termination via the cross box.

    2 - Termination due to some internal error.

ENVIRONMENT

DISPLAY - the default host and display number of the X server.

XENVIRONMENT - the name of the Xdefaults file to use (normally
    $HOME/.Xdefaults).

EXAMPLES

    yorn "Yorn" "The file /etc/passwd exists. Are you sure you want to delete it ?"

Will open an yorn box with the title Yorn and containing the text The file /etc/passwd exists. Are you sure you want to delete it ? and waits for the user to click one of the buttons.

FILES
$HOME/.Xdefaults /usr/lib/X11/app-defaults/Xopentop

SEE ALSO
alert(1), gs(1)

BUGS

If the font is too large or the message too long, the text will be clipped.

The title may not be displayed if the window manager does not provide title bars around windows or the -z option is used.

AUTHOR
Gary Henderson & Mark E. Howells, Torch Computers Ltd.