274 lines
7.3 KiB
HTML
274 lines
7.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of XMESSAGE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>XMESSAGE</H1>
|
|
Section: User Commands (1)<BR>Updated: xmessage 1.0.5<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
xmessage - display a message or query in a window (X-based /bin/echo)
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>xmessage</B>
|
|
|
|
[
|
|
<B>-buttons</B>
|
|
|
|
<I>label1</I>[<B>:</B>value1]<B>,</B>label2[<B>:</B>value2]<B>,</B>
|
|
|
|
...
|
|
] [
|
|
<I>options</I>
|
|
|
|
]
|
|
<B>-file</B>
|
|
|
|
<I>filename</I>
|
|
|
|
<BR>
|
|
|
|
<B>xmessage</B>
|
|
|
|
[
|
|
<B>-buttons</B>
|
|
|
|
<I>label1</I>[<B>:</B>value1]<B>,</B>label2[<B>:</B>value2]<B>,</B>
|
|
|
|
...
|
|
] [
|
|
<I>options</I>
|
|
|
|
]
|
|
<I>message</I>
|
|
|
|
...
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The
|
|
<I>xmessage</I>
|
|
|
|
program
|
|
displays a window containing a message from the command line, a file,
|
|
or standard input.
|
|
Along the lower edge of the message is row
|
|
of buttons; clicking the left mouse button
|
|
on any of these buttons will cause <I>xmessage</I> to exit.
|
|
Which button was pressed is returned in the exit status and,
|
|
optionally, by writing the label of the button to standard output.
|
|
<P>
|
|
|
|
The program
|
|
is typically used by shell scripts to display information to the user
|
|
or to ask the user to make a choice.
|
|
<P>
|
|
|
|
Unless a size is specified, <I>xmessage</I>
|
|
sizes itself to fit the message, up to a maximum size.
|
|
If the message is too big for the window, <I>xmessage</I> will display
|
|
scroll bars.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
These are the command line options that <I>xmessage</I> understands, in addition
|
|
to the standard ones listed in
|
|
<B><A HREF="/cgi-bin/man/man2html?7+X">X</A></B>(7).
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-buttons </B><I>button,button,...</I>
|
|
|
|
<DD>
|
|
This option will cause <I>xmessage</I> to create one button for each
|
|
comma-separated <I>button</I> argument.
|
|
The corresponding resource is <B>buttons</B>.
|
|
Each <I>button</I> consists of a label optionally followed by a colon
|
|
and an exit value.
|
|
The label is the name of the Command button widget created and will be the
|
|
default text displayed to the user. Since this is the name of the widget
|
|
it may be used to change any of the resources associated with that button.
|
|
The exit value will be returned by <I>xmessage</I>
|
|
if that button is selected. The default exit value is 100 plus the
|
|
button number. Buttons are numbered from the left starting with one.
|
|
The default string if no <B>-buttons</B> option is given is <B>okay:0</B>.
|
|
<DT id="2"><B>-default </B><I>label</I>
|
|
|
|
<DD>
|
|
Defines the button with a matching <I>label</I> to be the default.
|
|
If not specified there is no default.
|
|
The corresponding resource is <B>defaultButton</B>.
|
|
Pressing Return anywhere in the <I>xmessage</I> window will activate
|
|
the default button.
|
|
The default button has a wider border than the others.
|
|
<DT id="3"><B>-file </B><I>filename</I>
|
|
|
|
<DD>
|
|
File to display.
|
|
The corresponding resource is <B>file</B>.
|
|
A <I>filename</I> of `<B>-</B>' reads from standard input.
|
|
If this option is not supplied, <I>xmessage</I> will
|
|
display all non-option arguments in the style of <I>echo</I>.
|
|
Either <B>-file</B> or a message on the command line
|
|
should be provided, but not both.
|
|
<DT id="4"><B>-print</B>
|
|
|
|
<DD>
|
|
This will cause the program to write the label of the button pressed to
|
|
standard output. Equivalent to setting the <B>printValue</B> resource
|
|
to TRUE.
|
|
This is one way to get feedback as to which button was pressed.
|
|
<DT id="5"><B>-center</B>
|
|
|
|
<DD>
|
|
Pop up the window at the center of the screen.
|
|
Equivalent to setting the <B>center</B> resource to TRUE.
|
|
<DT id="6"><B>-nearmouse</B>
|
|
|
|
<DD>
|
|
Pop up the window near the mouse cursor.
|
|
Equivalent to setting the <B>nearMouse</B> resource to TRUE.
|
|
<DT id="7"><B>-timeout </B><I>secs</I>
|
|
|
|
<DD>
|
|
Exit with status 0 after <I>secs</I> seconds if the user has not
|
|
clicked on a button yet.
|
|
The corresponding resource is <B>timeout</B>.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>WIDGET HIERARCHY</H2>
|
|
|
|
Knowing the name and position in the hierarchy of each widget is
|
|
useful when specifying resources for them. In the following chart, the
|
|
class and name of each widget is given.
|
|
<P>
|
|
|
|
<PRE>
|
|
Xmessage (xmessage)
|
|
Form form
|
|
Text message
|
|
Command (label1)
|
|
Command (label2)
|
|
.
|
|
.
|
|
.
|
|
</PRE>
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>RESOURCES</H2>
|
|
|
|
The program has a few top-level application resources that allow
|
|
customizations that are specific to <I>xmessage</I>.
|
|
<DL COMPACT>
|
|
<DT id="8"><B>file</B>
|
|
|
|
<DD>
|
|
A String specifying the file to display.
|
|
<DT id="9"><B>buttons</B>
|
|
|
|
<DD>
|
|
A String specifying the buttons to display.
|
|
See the <B>-buttons</B> command-line option.
|
|
<DT id="10"><B>defaultButton</B>
|
|
|
|
<DD>
|
|
A String specifying a default button by label.
|
|
<DT id="11"><B>printValue</B>
|
|
|
|
<DD>
|
|
A Boolean value specifying whether the label of the
|
|
button pressed to exit the program is written to standard output.
|
|
The default is FALSE.
|
|
<DT id="12"><B>center</B>
|
|
|
|
<DD>
|
|
A Boolean value specifying whether to pop up the window at the center
|
|
of the screen. The default is FALSE.
|
|
<DT id="13"><B>nearMouse</B>
|
|
|
|
<DD>
|
|
A Boolean value specifying whether to pop up the window near the mouse
|
|
cursor. The default is FALSE.
|
|
<DT id="14"><B>timeout</B>
|
|
|
|
<DD>
|
|
The number of seconds after which to exit with
|
|
status 0. The default is 0, which means never time out.
|
|
<DT id="15"><B>maxHeight (</B>class<B> Maximum)</B>
|
|
|
|
<DD>
|
|
The maximum height of the text part of the window in pixels,
|
|
used if no size was specified in the geometry.
|
|
The default is 0, which means use 70% of the height of the screen.
|
|
<DT id="16"><B>maxWidth (</B>class<B> Maximum)</B>
|
|
|
|
<DD>
|
|
The maximum width of the text part of the window in pixels,
|
|
used if no size was specified in the geometry.
|
|
The default is 0, which means use 70% of the width of the screen.
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>ACTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="17"><B>exit(</B><I>value</I>)
|
|
|
|
<DD>
|
|
exit immediately with an exit status of <I>value</I> (default 0). This
|
|
action can be used with translations to provide alternate ways of
|
|
exiting <I>xmessage</I>.
|
|
<DT id="18"><B>default-exit()</B>
|
|
|
|
<DD>
|
|
exit immediately with the exit status specified by the default button.
|
|
If there is no default button, this action has no effect.
|
|
</DL>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>EXIT STATUS</H2>
|
|
|
|
If it detects an error, <I>xmessage</I> returns 1, so this value should
|
|
not be used with a button.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?7+X">X</A></I>(7),
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?1+echo">echo</A></I>(1),
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?1+cat">cat</A></I>(1)
|
|
|
|
<BR>
|
|
|
|
<A NAME="lbAK"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
Chris Peterson, MIT Project Athena
|
|
<BR>
|
|
|
|
Stephen Gildea, X Consortium
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="19"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="20"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="21"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="22"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="23"><A HREF="#lbAF">WIDGET HIERARCHY</A><DD>
|
|
<DT id="24"><A HREF="#lbAG">RESOURCES</A><DD>
|
|
<DT id="25"><A HREF="#lbAH">ACTIONS</A><DD>
|
|
<DT id="26"><A HREF="#lbAI">EXIT STATUS</A><DD>
|
|
<DT id="27"><A HREF="#lbAJ">SEE ALSO</A><DD>
|
|
<DT id="28"><A HREF="#lbAK">AUTHORS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:31 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|