[0m


GS(1)		    UNIX Programmer's Manual		    GS(1)



[1mNAME
     [0mgs - get a text string from a dialogue box

[1mSYNOPSIS
     gs [0m[ [1m-z [0m] [ [1m-r width height [0m] [ [1m-t timeout [0m] [ [1m-n title [0m] [
     [1m-standard X Toolkit options ... [0m] [ [1mtext to be displayed [0m]

[1mDESCRIPTION
     [0m_G_s is a utility designed for use in shell scripts for
     obtaining short text responses from users.

     _G_s opens a window containing a box to display the text
     passed on the command line.  If the [1m-r [0moption is present,
     another box is created into which the user may enter a reply
     (the maximum number characters that may be entered is given
     by _w_i_d_t_hx_h_e_i_g_h_t fields from the [1m-r [0moption).  The reply box
     allows simple character editing (such as cursor movement,
     character insertion and deletion).  The window can be closed
     and any text typed by the user sent to standard output by
     clicking the `Finished' button with the mouse.  The window
     is also closed and any text sent if a timeout has been
     specified (see the [1m-t [0moption) and this has been exceeded.

     _G_s can take the following options:

     [1m-z      [0mNo Zoom.  _G_s will attempt to bypass the window
	     manager and appear immediately, rather than going
	     through the window manager's placement and sizing
	     scheme.

     [1m-r [0m_w_i_d_t_h _h_e_i_g_h_t
	     A reply box of _w_i_d_t_h characters wide and _h_e_i_g_h_t
	     characters high will be created (if the window
	     manager or screen size allows).  The maximum number
	     of characters the user may enter is always _w_i_d_t_hx-
	     _h_e_i_g_h_t characters.  The text in the reply box may be
	     scrolled if the box cannot be made large enough or
	     lots of short lines have been entered.

     [1m-n [0m_t_i_t_l_e or [1m-title [0m_t_i_t_l_e
	     Specifies the title for the _g_s window.  The default,
	     if this option is not supplied, is `Get string'.

     [1m-t [0m_n_u_m_b_e_r
	     Specifies a timeout value (in seconds) in which the
	     user must enter a reply.  If the time limit is
	     exceeded, any text already typed will be sent to s'
	     standard output and _g_s will exit.

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




Printed 16/12/93	 3 October 1988                         1






GS(1)		    UNIX Programmer's Manual		    GS(1)



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

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

     [1m-bw [0m_n_u_m_b_e_r or [1m-borderwidth [0m_n_u_m_b_e_r
	     This option specifies the width in pixels of the
	     border surrounding the main window.

     [1m-fg [0m_c_o_l_o_u_r or [1m-foreground [0m_c_o_l_o_u_r
	     This option specifies the colour to use for the
	     text.  The default is `black'.

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

     [1m-name [0m_n_a_m_e
	     This option specifies the application name under
	     which resources are to be obtained, rather than the
	     default executable file name, `gs'.

     [1m-geometry [0m_g_e_o_m_e_t_r_y
	     This option specifies the preferred size and posi-
	     tion of the gs window; see _X(_1);

     [1m-display [0m_d_i_s_p_l_a_y
	     This option specifies the X server to contact; see
	     _X(_1).

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

[1mX DEFAULTS
     [0m_G_s is implemented using the Athena widgets.  Each widget can
     individually or in groups have various visual and opera-
     tional 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 _T_o_o_l_k_i_t
     _W_i_d_g_e_t_s - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e.





Printed 16/12/93	 3 October 1988                         2






GS(1)		    UNIX Programmer's Manual		    GS(1)



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

     _X_X_X[1m.gsbox
	     [0mThe widget that is a child of root.  All the other
	     widgets used by the gs box are children or grand
	     children of this widget.

     _X_X_X[1m.gsbox.contents
	     [0mA form widget that manages the layout of the gs box.
	     Normally completely covers the `gsbox' widget.

     _X_X_X[1m.gsbox.contents.message
	     [0mA widget to display and format the text message.

     _X_X_X[1m.gsbox.contents.Finished
	     [0mA command button widget that when clicked causes _g_s
	     to write any text entered by the user to standard
	     output and exit.

     _X_X_X[1m.gsbox.contents.reply
	     [0mA text widget where the user can type a reply.

     Additionally, the following item is also fetched from the
     resource database:

     [1mbackgroundPixmap.foreground
	     [0mOne of two colours (the other is the widget's back-
	     ground colour) required when converting a bitmap
	     file into a pixmap for use as the widget's back-
	     ground pixmap.

[1mRETURN CODES
	  [0m0 - Termination via the tick box or the timeout value
	  being exceeded.

	  2 - Termination due to some internal error.

[1mENVIRONMENT
     [0mDISPLAY -
	      the default host and display number of the X server.

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

[1mEXAMPLES
	  [0mgs -r 40 1 Please enter the name of a file to edit

     Will open an gs box with the title _G_e_t _s_t_r_i_n_g and containing
     a box displaying the text _P_l_e_a_s_e _e_n_t_e_r _t_h_e _n_a_m_e _o_f _a and
     another box where the user may type upto 40 characters.



Printed 16/12/93	 3 October 1988                         3






GS(1)		    UNIX Programmer's Manual		    GS(1)



[1mFILES
     [0m$HOME/.Xdefaults /usr/lib/X11/app-defaults/Xopentop

[1mSEE ALSO
     [0malert(1), yorn(1)

[1mBUGS
     [0mIf the font is too large or the message too long, the text
     will be clipped and the window will have to be scrolled
     before the whole message may be read.

     The title may not be displayed if the window manager does
     not provide title bars around windows or the [1m-z [0moption is
     used.

[1mAUTHOR
     [0mGary Henderson & Mark E. Howells, Torch Computers Ltd.






































Printed 16/12/93	 3 October 1988                         4



[0m