home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat1 / xmessage.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  7.3 KB  |  199 lines

  1.  
  2.  
  3.  
  4. XMESSAGE(1)                          XMESSAGE(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        xmessage - display a message or query in a window (X-based
  9.        /bin/echo)
  10.  
  11. SSYYNNOOPPSSIISS
  12.        xxmmeessssaaggee [ --bbuuttttoonnss  _l_a_b_e_l_1[::_v_a_l_u_e_1],,_l_a_b_e_l_2[::_v_a_l_u_e_2],,  ...
  13.        ] [ _o_p_t_i_o_n_s ] --ffiillee _f_i_l_e_n_a_m_e
  14.        xxmmeessssaaggee     [  --bbuuttttoonnss _l_a_b_e_l_1[::_v_a_l_u_e_1],,_l_a_b_e_l_2[::_v_a_l_u_e_2],, ...
  15.        ] [ _o_p_t_i_o_n_s ] _m_e_s_s_a_g_e ...
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.        The _x_m_e_s_s_a_g_e program displays a window containing  a  mes-
  19.        sage  from  the    command     line, a file, or standard input.
  20.        Along the lower edge of the message  is    row  of     buttons;
  21.        clicking     the  left  mouse  button on any of these buttons
  22.        will cause _x_m_e_s_s_a_g_e to exit.  Which button was pressed  is
  23.        returned     in  the  exit status and, optionally, by writing
  24.        the label of the button to standard output.
  25.  
  26.        The program is typically used by shell scripts to  display
  27.        information  to    the  user  or  to  ask the user to make a
  28.        choice.
  29.  
  30.        Unless a size is specified, _x_m_e_s_s_a_g_e sizes itself  to  fit
  31.        the  message, up to a maximum size.  If the message is too
  32.        big for the window, _x_m_e_s_s_a_g_e will display scroll bars.
  33.  
  34. OOPPTTIIOONNSS
  35.        These are the command line options  that     _x_m_e_s_s_a_g_e  under-
  36.        stands.
  37.  
  38.        --bbuuttttoonnss _b_u_t_t_o_n_,_b_u_t_t_o_n_,_._._.
  39.            This option will cause _x_m_e_s_s_a_g_e to create one but-
  40.            ton for each comma-separated _b_u_t_t_o_n argument.  The
  41.            corresponding  resource    is  bbuuttttoonnss.  Each _b_u_t_t_o_n
  42.            consists of a label optionally followed by a colon
  43.            and  an    exit value.  The label is the name of the
  44.            Command button widget  created  and  will  be  the
  45.            default text displayed to the user.  Since this is
  46.            the name of the widget it may be     used  to  change
  47.            any  of the resources associated with that button.
  48.            The exit value will be  returned     by  _x_m_e_s_s_a_g_e  if
  49.            that  button  is selected.  The default exit value
  50.            is 100 plus the button number.  Buttons    are  num-
  51.            bered  from  the     left  starting     with  one.   The
  52.            default string if no --bbuuttttoonnss option is    given  is
  53.            ookkaayy::00.
  54.  
  55.        --ddeeffaauulltt _l_a_b_e_l
  56.            Defines the button with a matching _l_a_b_e_l to be the
  57.            default.     If not specified there     is  no     default.
  58.            The   corresponding   resource  is  ddeeffaauullttBBuuttttoonn.
  59.            Pressing Return anywhere in  the     _x_m_e_s_s_a_g_e  window
  60.            will  activate  the  default  button.  The default
  61.  
  62.  
  63.  
  64. X Version 11           26 July 1994                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XMESSAGE(1)                          XMESSAGE(1)
  71.  
  72.  
  73.            button has a wider border than the others.
  74.  
  75.        --ffiillee _f_i_l_e_n_a_m_e
  76.            File to display.     The  corresponding  resource  is
  77.            ffiillee.   A  _f_i_l_e_n_a_m_e  of    `--'  reads  from standard
  78.            input.  If this option is not  supplied,     _x_m_e_s_s_a_g_e
  79.            will display all non-option arguments in the style
  80.            of _e_c_h_o.     Either --ffiillee or a message on the command
  81.            line should be provided, but not both.
  82.  
  83.        --pprriinntt  This  will cause the program to write the label of
  84.            the button pressed to standard output.  Equivalent
  85.            to  setting the pprriinnttVVaalluuee resource to TRUE.  This
  86.            is one way to get feedback as to which button  was
  87.            pressed.
  88.  
  89.        --cceenntteerr Pop  up    the  window  at the center of the screen.
  90.            Equivalent to setting the cceenntteerr resource to TRUE.
  91.  
  92.        --nneeaarrmmoouussee
  93.            Pop  up the window near the mouse cursor.  Equiva-
  94.            lent to setting the nneeaarrMMoouussee resource to TRUE.
  95.  
  96.        --ttiimmeeoouutt _s_e_c_s
  97.            Exit with status 0 after _s_e_c_s seconds if the  user
  98.            has  not clicked on a button yet.  The correspond-
  99.            ing resource is ttiimmeeoouutt.
  100.  
  101. WWIIDDGGEETT HHIIEERRAARRCCHHYY
  102.        Knowing the name and position in     the  hierarchy     of  each
  103.        widget  is  useful when specifying resources for them.  In
  104.        the following chart, the class and name of each widget  is
  105.        given.
  106.  
  107.        Xmessage (xmessage)
  108.         Form form
  109.          Text message
  110.          Command (label1)
  111.          Command (label2)
  112.          .
  113.          .
  114.          .
  115.  
  116. RREESSOOUURRCCEESS
  117.        The program has a few top-level application resources that
  118.        allow customizations that are specific to _x_m_e_s_s_a_g_e.
  119.  
  120.        ffiillee    A String specifying the file to display.
  121.  
  122.        bbuuttttoonnss A String specifying the buttons to  display.   See
  123.            the --bbuuttttoonnss command-line option.
  124.  
  125.        ddeeffaauullttBBuuttttoonn
  126.            A String specifying a default button by label.
  127.  
  128.  
  129.  
  130. X Version 11           26 July 1994                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XMESSAGE(1)                          XMESSAGE(1)
  137.  
  138.  
  139.        pprriinnttVVaalluuee
  140.            A  Boolean  value  specifying whether the label of
  141.            the button pressed to exit the program is  written
  142.            to standard output.  The default is FALSE.
  143.  
  144.        cceenntteerr  A  Boolean  value specifying whether to pop up the
  145.            window at the center of the screen.   The  default
  146.            is FALSE.
  147.  
  148.        nneeaarrMMoouussee
  149.            A  Boolean  value specifying whether to pop up the
  150.            window near the    mouse  cursor.     The  default  is
  151.            FALSE.
  152.  
  153.        ttiimmeeoouutt The  number  of    seconds     after which to exit with
  154.            status 0.  The default is  0,  which  means  never
  155.            time out.
  156.  
  157.        mmaaxxHHeeiigghhtt ((class MMaaxxiimmuumm))
  158.            The  maximum height of the text part of the window
  159.            in pixels, used if no size was  specified  in  the
  160.            geometry.   The    default is 0, which means use 70%
  161.            of the height of the screen.
  162.  
  163.        mmaaxxWWiiddtthh ((class MMaaxxiimmuumm))
  164.            The maximum width of the text part of  the  window
  165.            in  pixels,  used  if no size was specified in the
  166.            geometry.  The default is 0, which means     use  70%
  167.            of the width of the screen.
  168.  
  169. AACCTTIIOONNSS
  170.        eexxiitt((_v_a_l_u_e))
  171.            exit  immediately  with    an  exit  status of _v_a_l_u_e
  172.            (default 0).  This action can be used with  trans-
  173.            lations to provide alternate ways of exiting _x_m_e_s_-
  174.            _s_a_g_e.
  175.  
  176.        ddeeffaauulltt--eexxiitt(())
  177.            exit immediately with the exit status specified by
  178.            the  default  button.  If there is no default but-
  179.            ton, this action has no effect.
  180.  
  181. EEXXIITT SSTTAATTUUSS
  182.        If it detects an error, _x_m_e_s_s_a_g_e returns 1, so this  value
  183.        should not be used with a button.
  184.  
  185. SSEEEE AALLSSOO
  186.        _X(1), _e_c_h_o(1), _c_a_t(1)
  187.  
  188. AAUUTTHHOORRSS
  189.        Chris Peterson, MIT Project Athena
  190.        Stephen Gildea, X Consortium
  191.  
  192.  
  193.  
  194.  
  195.  
  196. X Version 11           26 July 1994                3
  197.  
  198.  
  199.