Name: WGINI   29
The routine  WGINI initializes the widget routines and creates a
main widget.
The call is:  CALL WGINI (COPT, ID)
         or:  int  wgini (char *copt);
COPT          is a character string  that defines  how  children
              widgets are laid out in the main widget:
  = 'VERT'    means  that children  widgets are laid out  in co-
              lumns from top to bottom.
  = 'HORI'    means that  children widgets are  laid out in rows
              from left to right.
  = 'FORM'    means that the position  and size of children wid-
              gets is defined by the user with the routines SWG-
              POS, SWGSIZ and SWGWIN.
ID            is the returned widget index.  It can be used as a
              parent  widget  index  in  other  widget calls.
Name: WGFIN   29
WGFIN terminates the widget routines.  The widgets  will be dis-
played on the screen.  After choosing OK in the Exit menu,  all
widgets are deleted  and the program  is continued after WGFIN.
After choosing  Quit in the Exit menu,  the program is termina-
ted.
The call is:  CALL WGFIN
         or:  void wgfin ();
Name: WGBAS   29
The routine WGBAS creates a container widget. It can be used as
a parent widget for other widgets.
The call is:  CALL WGBAS (IP, COPT, ID)
         or:  int  wgbas (int ip, char *copt);
IP            is the index of the parent widget.
COPT          is a character string  that  can have  the values
              'HORI',  'VERT'  and  'FORM'.  It determines  how 
              children widgets  are laid out  in the  container
              widget (s. WGINI).
ID            is the returned widget index. It can be used as a
              parent widget index in other widget calls.
Name: WGPOP   29
The routine  WGPOP  creates  a popup menu in the menubar of the 
main widget.  Entries in the popup menu must be created with
WGAPP.
The call is:  CALL WGPOP (IP, CLAB, ID)
         or:  int  wgpop (int ip, char *clab);
IP            is the  index  of the parent widget where the pa-
              rent widget must be created with WGINI.
CLAB          is a character string containing the title of the
              popup menu.
ID            is the  returned widget index.  It can be used as
              a parent widget index for WGAPP. 
Name: WGAPP   29
The routine  WGAPP creates an entry in a popup menu.  The popup
menu be created with the routine WGPOP.
The call is:  CALL WGAPP (IP, CLAB, ID)
         or:  int  wgapp (int ip, char *clab);
IP            is the index of a popup menu created with WGPOP.
CLAB          is a character string containing a label.
ID            is  the  returned  widget  index.  It  should  be
              connected with a callback routine (see SWGCB).
Name:         29
The routine  WGLTXT  creates a labeled text widget.  The widget
can be used get text from the keyboard.
The call is:  CALL WGLTXT (IP, CLAB, CSTR, NWTH, ID)
         or:  int  wgltxt (int ip, char *clab, char *cstr,
                                                     int nwth);
IP            is the index of the parent widget.
CLAB          is a character string containing a label. It will
              be displayed on the left side of the widget.
CSTR          is a character string  that will be  displayed in
              the text widget.
NWTH          defines  the width of the text field   (0 <= NWTH 
              <= 100).  For example,  NWTH = 30 means  that the 
              width of the text field is 0.3 * widget width.  
ID            is the returned widget index.
Name:         29
The routine  WGQUIT creates a push button widget where the but-
ton has the same meaning as the QUIT entry in the Exit menu.
If the button is pressed, the program is terminated.
The call is:  CALL WGQUIT (IP, ID)
         or:  int  wgquit (int ip);
IP            is the index of the parent widget.
ID            is the returned widget index.
Name: WGPBUT  29
The routine WGPBUT creates a push button widget. 
The call is:  CALL WGPBUT (IP, CLAB, ID)
         or:  int  wgpbut (int ip, char *clab);
IP            is the index of the parent widget.
CLAB          is a  character  string  that will  be used  as a
              label.
ID            is  the  returned  widget  index.  It  should  be  
              connected with a callback routine.
Name: WGCMD   29
The routine  WGCMD  creates a push button widget.  A correspon-
ding system will be executed if the button is pressed. 
The call is:  CALL WGCMD (IP, CLAB, CMD, ID)
         or:  int  wgcmd (int ip, char *clab, char *cmd);
IP            is the index of the parent widget.
CLAB          is a character  string  that will be used as a
              label.
CMD           is a character string containing a system com-
              mand.
ID            is the  returned  widget  index.  It should be 
              connected with a callback routine.
Name: WGLAB   29
The routine  WGLAB  creates  a label widget.  The widget can be 
used to display a character string.
The call is:  CALL WGLAB (IP, CSTR, ID)
         or:  int  wglab (int ip, char *cstr); 
IP            is the index of the parent widget.
CSTR          is a character string that should be displayed.
ID            is the returned widget index.
Name: WGBUT   29
The routine  WGBUT  creates a button widget.  The widget repre-
sents a  labeled button  that the  user  can turn on  or off by
clicking.
The call is:  CALL WGBUT (IP, CLAB, IVAL, ID)
         or:  int  wgbut (int ip, char *clab, int ival);
IP            is the index of the parent widget.
CLAB          is a character string  that will be used as a la-
              bel.
IVAL          can have  the values  0 (off)  and 1 (on)  and is
              used to initialize the button.
ID            is the returned widget index.
Name: WGTXT   29
The routine WGTXT creates a text widget. The widget can be used
to get text from the keyboard.
The call is:  CALL WGTXT (IP, CSTR, ID)
         or:  int  wgtxt (int ip, char *cstr);
IP            is the index of the parent widget.
CSTR          is a character string  that will be displayed  in
              the text widget.
ID            is the returned widget index.
Name: WGFIL   29
The routine WGFIL creates a file widget. The widget can be used
to get a filename from the keyboard.  The filename can be typed
directly  into the  file field  or can be selected  from a file
selection box if an entry in the File menu is chosen.
The call is:  CALL WGFIL (IP, CLAB, CFIL, CMASK, ID)
         or:  int  wgfil (int ip, char *clab, char *cfil, 
                                              char *cmask) 
IP            is the index of the parent widget.
CLAB          is a character string  used for  an entry  in the
              File menu.
CFIL          is a character string  that will  be displayed in
              the file widget.
CMASK         specifies the search pattern  used in determining
              the  files  to be displayed in the file selection
              box.
ID            is the returned widget index.
Name: WGLIS   29
The routine  WGLIS  creates a list widget.  This widget is used
whenever an application must present a list of names from which
the user can choose.
The call is:  CALL WGLIS (IP, CLIS, ISEL, ID)
         or:  int  wglis (int ip, char *clis, int isel);
IP            is the index of the parent widget.
CLIS          is a character string that contains the list ele-
              ments. Elements must be separated  by the charac-
              ter '|'.
ISEL          defines the pre-selected element (>= 1).
ID            is the returned widget index.
Name: WGBOX   29
The routine WGBOX creates a list widget where the list elements
are displayed as toggle buttons.
The call is:  CALL WGBOX (IP, CLIS, ISEL, ID)
         or:  int  wgbox (int ip, char *clis, int isel);
IP            is the index of the parent widget.
CLIS          is a character string that contains the list ele-
              ments. Elements  must be separated by the charac-
              ter '|'.
ISEL          defines the pre-selected element (>= 1).
ID            is the returned widget index.
Name: WGSCL   29
The routine  WGSCL  creates  a scale widget.  The widget can be
displayed in horizontal or vertical direction.
The call is:  CALL WGSCL (IP, CLAB, XMIN, XMAX, XVAL, NDEZ, ID)
         or:  int  wgscl (int ip, char *clab, float xmin,
                          float xmax, float xval, int ndez);
IP            is the index of the parent widget.
CLAB          is a character string used for a label.
XMIN          is a floating-point  value that defines the mini-
              mal value of the scale widget.
XMAX          is a floating-point  value that defines the maxi-
              mal value of the scale widget.
XVAL          defines the value of the scale widget.
NDEZ          is the  number  of digits used  in the scale wid-
              get.
ID            is the returned widget index.
Name: WGOK    29
The routine  WGOK creates a push button widget where the button
has the same meaning as the  OK  entry in the Exit menu. If the
button is pressed,  all widgets are  deleted and the program is
continued after WGFIN.
The call is:  CALL WGOK (IP, ID)
         or:  int  wgok (int ip);   
IP            is the index of the parent widget.
ID            is the returned widget index.
Name: SWGWTH  29
The routine SWGWTH sets the default width of widgets.
The call is:  CALL SWGWTH (NWTH)
         or:  void swgwth (int nwth);   
NWTH          in an integer containing a number of characters.
                                            Default: NWTH = 20.
Note:         SWGWTH affects  widgets whose  parents  have  the
              layouts 'VERT' and 'HORI'.     
Name: SWGPOP  29
The routine  SWGPOP  modifies the appearance of the popup menu-
bar.
The call is:  CALL SWGPOP (COPT)
         or:  void swgpop (char *copt);   
COPT          is a character string containing an option:
 = 'NOOK'     suppresses the 'OK' entry in the  'EXIT' menu.
 = 'NOQUIT'   suppresses the  'QUIT'  entry  in  the  'EXIT'
              menu.
 = 'NOHELP'   suppresses the 'HELP' button in the menubar.
 = 'OK'       enables the 'OK' entry in the 'EXIT' menu (de-
              fault).
 = 'QUIT'     enables the  'QUIT'  entry in the  'EXIT' menu
              (default).
 = 'HELP'     enables the  'HELP' button in the menubar (de-
              fault).
              the value 'SEP'.
Name: SWGCB   29
The routine SWGCB connects a widget with a callback routine.
The callback routine is called  if the status  of the widget
is changed.  Callback routines be defined for button,  push-
button,  file,  list,  box and text widgets,  for popup menu
entries.
The call is:  CALL SWGCB (ID, ROUTINE, IRAY)
         or:  void swgcb (int id, void (*routine) (),
                                                 int *iray);
ID            is a widget ID.
ROUTINE       is the name  of a routine defined by the user. 
              In Fortran,  the routine  must be declared  as
              EXTERNAL.
IRAY          is an integer  array  that will be passed as a
              parameter  to the  callback routine. It can be
              used for passing values.
Note:         See section 15.6 for examples. 
Name: SWGBUT  29
The routine SWGBUT sets the status of a button widget.
The call is:  CALL SWGBUT (ID, IVAL)
         or:  void swgbut (int id, int ival);   
ID            is a widget ID of a button widget.
IVAL          can have the values 0 and 1.
Name: SWGLIS  29
The routine SWGLIS changes the selection in a list widget.
The call is:  CALL SWGLIS (ID, ISEL)
         or:  void swglis (int id, int isel);   
ID            is a widget ID of a list widget.
ISEL          defines the selected element (>= 1).
Name: SWGBOX  29
The routine SWGBOX changes the selection in a box widget.
The call is:  CALL SWGBOX (ID, ISEL)
         or:  void swgbox (int id, int isel);   
ID            is a widget ID of a box widget.
ISEL          defines the selected element (>= 1).
Name: SWGTXT  29
The routine SWGTXT changes the value of a text widget.
The call is:  CALL SWGTXT (ID, CVAL)
         or:  void swgtxt (int id, char *cval);   
ID            is a widget ID of a text widget.
CVAL          is a character string containing the new text.
Name: SWGFIL  29
The routine SWGFIL changes the value of a file widget.
The call is:  CALL SWGFIL (ID, CFIL)
         or:  void swgfil (int id, char *cfil);   
ID            is a widget ID of a file widget.
CFIL          is a character string containing the new file-
              name.
Name: SWGSCL  29
The routine SWGSCL changes the value of a scale widget.
The call is:  CALL SWGSCL (ID, XVAL)
         or:  void swgscl (int id, float xval);   
ID            is a widget ID of a scale widget.
XVAL          is a floatingpoint number containing the new 
              value of the scale widget.
Name: MSGBOX  29
The routine  MSGBOX  displays a message  in form of a dialog
widget.  It can be used to display messages in callback rou-
tines.
The call is:  CALL MSGBOX (CSTR)
         or:  void swgbox (char *cstr);   
CSTR          is a character string containing a message.
Name: SWGMOD  29
The widget routines  can be used  on X Window terminals  and on
other terminals.  Normally, the routine WGINI checks the termi-
nal type  and uses an ASCII mode  on non X Window terminals and
widgets on X Window terminals. The routine SWGMOD can overwrite
this behaviour.
The call is:  CALL SWGMOD (CMOD)
         or:  void swgmod (char *cmod);
CMOD          is a character string containing the mode:
  = 'XWIN'    means  that the widget  routines  should use wid-
              gets.  On a non  X Window terminal,  the  program
              will be terminated in WGINI.
  = 'ASCI'    means that the widget routines use write and read
              statements instead of a graphical user interface.
  = 'AUTO'    defines  'XWIN' on X Window terminals  and 'ASCI'
              on other terminals.       Default: CMOD = 'AUTO'.
Name: SWGTIT  29
The routine  SWGTIT  defines a title displayed in the main wid-
get.
The call is:  CALL SWGTIT (CTIT)
         or:  void swgtit (char *ctit);
CTIT          is a character string containing the title.
Name: SWGHLP  29
The routine  SWGHLP  sets a character string  that will be dis-
played if the Help menu is clicked by the user.
The call is:  CALL SWGHLP (CSTR)
         or:  void swghlp (char *cstr);
CSTR          is a character string  that will be  displayed in
              the help box.  The character '|' can be used as a
              newline character.
Name: SWGSIZ  29
The routine SWGSIZ defines the size of widgets.
The call is:  CALL SWGSIZ (NW, NH)
         or:  void swgsiz (int nw, int nh);
NW, NH        are the width and height of the widget in pixels.
Name: SWGPOS  29
The routine SWGPOS defines the position of widgets.
The call is:  CALL SWGPOS (NX, NY)
         or:  void swgpos (int nx, int ny);  
CSTR          is a character string  that will be  displayed in
NX, NY        are the upper left corner  of the widget  in pix-
              els.  The point  is relative  to  the upper  left
              corner of the parent widget.
Name: SWGWIN  29
The routine SWGWIN defines the position and size of widgets.
The call is:  CALL SWGWIN (NX, NY, NW, NH)
         or:  void swgwin (int nx, int ny, int nw, int nh);
CSTR          is a character string  that will be  displayed in
NX, NY        are the upper left corner  of the widget  in pix-
              els.  The point  is relative  to  the upper  left
              corner of the parent widget.
NW, NH        are the width and height of the widget in pixels.
Name: SWGTYP  29
The routine  SWGTYP modifies the appearance of certain widgets.
The call is:  CALL SWGTYP (CTYPE, CLASS)
         or:  void swgtyp (char *ctype, char *class);
CTYPE         is a character string containing a keyword:
  = 'VERT'    means  that list elements in box widgets or scale
              widgets will be displayed in vertical direction.
  = 'HORI'    means  that list elements in box widgets or scale
              widgets will be displayed  in horizontal directi-
              on.
  = 'SCROLL'  means  that scrollbars  will be  created  in list
              widgets.
  = 'NOSCR'   means that  no scrollbars will be created in list
              widgets.
  = 'AUTO'    means  that  scrollbars  will be created  in list
              widgets  if the  number  of elements  is  greater
              than 8.
CLASS         is a character string containing the widget class
              where  CLASS can have  the values  'LIST',  'BOX' 
              and  'SCALE'.  If CLASS = 'LIST',  CTYPE can have
              the values  'AUTO',  'SCROLL' and 'NOSCROLL'.  If
              CLASS = 'BOX'  or CLASS = 'SCALE', CTYPE can have
              the values 'VERT' and 'HORI'.
              Defaults:   ('VERT', 'BOX'),   ('HORI', 'SCALE'),
                                              ('AUTO', 'LIST').
Name: SWGJUS  29
The routine SWGJUS defines the alignment of labels in label and
button widgets.
The call is:  CALL SWGJUS (CJUS, CLASS)
         or:  void swgjus (char *cjus, char *class);
CJUS          is a character string defining the alignment:
  = 'LEFT'    means that labels  will  be displayed on the left
              side of label and button widgets.
  = 'CENTER'  means that labels will be displayed in the center
              of label and button widgets.
  = 'RIGHT'   means that labels will  be displayed on the right
              side of label and button widgets.
CLASS         is a character string defining the  widget class.
              CLASS can have the values 'LABEL' and 'BUTTON'.
              Defaults:  ('LEFT', 'LABEL'), ('LEFT', 'BUTTON').
Name: SWGMRG  29
The routine SWGMRG defines margins for widgets.
The call is:  CALL SWGMRG (IVAL, CMRG)
         or:  void swgmrg (int ival, char *cmrg);
IVAL          is the margin value in pixels.
CMRG          is a  character string  that can have  the values
              'LEFT', 'TOP', 'RIGHT'  and 'BOTTOM'. By default,
              all margins are zero.
Name: SWGMIX  29
The routine  SWGMIX  defines control characters  for separating
elements in list strings.
The call is:  CALL SWGMIX (CHAR, CMIX)
         or:  void swgmix (char *char, char *cmix);
CHAR          is a new control character.
CMIX          is a character string  that defines the function
              of the control character.  CMIX can have the va-
              lue 'SEP'.
Name: GWGBUT  29
The routine GWGBUT returns the status of a button widget.
The call is:  CALL GWGBUT (ID, IVAL)
         or:  int  gwgbut (int id);
IP            is the index of the button widget.
IVAL          is the  returned status where IVAL = 0 means off
              and IVAL = 1 means on.
Name: GWGTXT  29
The routine GWGTXT returns the input of a text widget.
The call is:  CALL GWGTXT  (ID, CSTR)
         or:  gwgtxt (int id, char *cstr);
IP            is the index of the text widget.
CSTR          is the returned character string.
Name: GWGFIL  29
The routine GWGFIL returns the input of a file widget.
The call is:  CALL GWGFIL  (ID, CFIL)
         or:  void gwgfil (int id, char *cfil);
IP            is the index of the file widget.
CFIL          is the returned filename.
Name: GWGLIS  29
The routine GWGLIS returns the selected element of a list wid-
get.
The call is:  CALL GWGLIS (ID, ISEL)
         or:  int  gwglis (int id);
IP            is the index of the list widget.
ISEL          is the selected list element returned by GWGLIS.
Name: GWGBOX  29
The routine GWGBOX returns the selected  element of a box wid-
get.
The call is:  CALL GWGBOX (ID, ISEL)
         or:  int  gwgbox (int id);
IP            is the index of the box widget.
ISEL          is the selected element returned by GWGBOX.
Name: GWGSCL  29
The routine GWGSCL returns the value of a scale widget.
The call is:  CALL  GWGSCL (ID, XVAL)
         or:  float gwgscl (int id); 
IP            is the index of the scale widget.
XVAL          is the returned value.
Name: GETDSP  29
The routine GETDSP returns the terminal type.
The call is:  CALL GETDSP  (CDSP)
         or:  char *getdsp ();
CDSP          is a  returned character string that can have the
              values  'XWIN'  for X Window terminals and 'NOXW'
              for non X Window terminals.
Name: ITMSTR  29
The routine  ITMSTR extracts a list element from a list string.
The call is:  CALL ITMSTR (CLIS, IDX, CITEM)
         or:  char *itmstr (char *clis, int idx);
CLIS          is a character string that contains the list ele-
              ments (s. WGLIS).
IDX           is the  index  of the element  that should be ex-
              tracted from CLIS.
CITEM         is a  character string  containing the  extracted
              list element.
Name: ITMCNT  29
The routine  ITMCNT  returns  the number of elements  in a list
string.
The call is:  N = ITMCNT (CLIS)
         or:  int  itmcnt (char *clis);
CLIS          is a character string that contains the list ele-
              ments (s. WGLIS).
N             is the calculated number of elements in CLIS.
Name: ITMCAT  29  
The routine ITMCAT concatenates an element to a list string.
The call is:  CALL ITMCAT (CLIS, CITEM)
         or:  void itmcat (char *clis, char *citem);
CLIS          is a character string that contains the list ele-
              ments (s. WGLIS).
CITEM         is a character string  that will  be concatenated
              to CLIS.  If CLIS is blank,  CITEM  will  be  the 
              first element in CLIS.
Name: DWGMSG  29
The routine DWGMSG displays a message.
The call is:  CALL DWGMSG (CSTR)
         or:  void dwgmsg (char *cstr);
CSTR          is a character string that will be displayed in a
              message box.  Multiple lines  can be separated by
              the character '|'.
Name: DWGBUT  29
The routine  DWGBUT  displays a message that can be answered by
the user with 'Yes' or 'No'.
The call is:  CALL DWGBUT (CSTR, IVAL)
         or:  int dwgbut (char *cstr, ival);
CSTR          is a character string that will be displayed in a
              message box.  Multiple lines  can be separated by
              the character '|'.
IVAL          is  the returned  answer  of the  user.  IVAL = 1
              means 'Yes', IVAL = 0 means 'No'.
Name: DWGTXT  29
The routine  DWGTXT creates a dialog widget that can be used to
prompt the user for input.
The call is:  CALL DWGTXT (CLAB, CSTR)
         or:  char *dwgtxt (char *clab, char *cstr);
CLAB          is a character string  that will  be displayed in
              the dialog widget.
CSTR          is the returned input of the user.
Name: DWGFIL  29
The routine  DWGFIL  creates  a file selection box  that can be
used to get a filename.
The call is:  CALL DWGFIL (CLAB, CFIL, CMASK)
         or:  char *dwgfil (char *clab, char *cfil, 
                                                  char *cmask);
CLAB          is a character string  that will  be displayed in
              the dialog widget.
CSTR          is the returned filename selected by the user.
CMASK         specifies the search pattern  used in determining
              the files to be displayed  in the  file selection
              box.
Name: DWGLIS  29
The routine  DWGLIS creates a dialog widget that can be used to
get a selection from a list of items.
The call is:  CALL DWGLIS (CLAB, CLIS, ISEL)
         or:  int dwglis (char *clab, char *clis, int isel);
CLAB          is a character string  that will be  displayed in
              the dialog widget.
CLIS          is a character string that contains the list ele-
              ments. Elements must  be separated by the charac-
              ter '|'.
ISEL          defines the pre-selected element and contains the
              selected element after return.  Element numbering
              begins with the number 1.
