      /********************************************************/
      /*                   Widget-Builder               (0)   */
      /* This program was written by Brian R. Gardner, 1988.  */
      /* It was created as a visual, easy to use, technique   */
      /* for rapid proto-typing of user interfaces. It allows */
      /* its user to design the layout of an X-window based   */
      /* user interface, complete with sub-windows, buttons,  */
      /* labels, and other "widgets". This program will also  */
      /* serve as a programmer's aid by writing out to a file */
      /* the source code required to re-generate the created  */
      /* visual user interface. The code generated is usually */
      /* substantial, reflecting immense savings in the time  */
      /* neccessary to program using X-windows.               */
      /*    Note that this program is only a simple test      */
      /* version. It was the author's first introduction to   */
      /* the Athena environment, as well as X-windows and the */
      /*  X-Toolkit. It was written in 2 weeks.               */
      /*    This was written under the roof of Project Athena */
      /* at Massachusetts Institute of Technology, by         */
      /* Brian Gardner (DEC), and hence reasonably available. */
      /* Read that as "FREE"         :-)                      */
      /* with the usual friendly restrictions.                */
      /********************************************************/

     /************************************************************/
     /* Copyright 1988, Massachusetts Institute of Technology.   */
     /* See X(1) for a full statement of rights and permissions. */
     /************************************************************/
#ifndef _wbP_h_
#define _wbP_h_

#include "widget-builder.h"

#define DEF_WIDTH    600    /* was 600 */
#define DEF_HEIGHT   300

/****************************************************************/

  /* Widget Action related globals */
  /* ----------------------------- */
XtActionsRec action_list[] = {
  {"EditWidget",    EditWidget},
  {"MarkWidget",    MarkWidget},
  {"StartMoving",   StartMoving},
  {"WidgetMover",   WidgetMover},
  {"DoneMoving",    DoneMoving},
  {"StartResizing", StartResizing},
  {"WidgetSizer",   WidgetSizer},
  {"DoneSizing",    DoneSizing},
  {"GotFilename",   GotFilename},
  {"WBPopup",       WBPopup},
  {"WBPopdown",     WBPopdown},
  {"MyDebug",       MyDebug},
  { NULL, NULL}
  };

int num_actions = 12;


/****************************************************************/

/* Useful global variables */
/* ----------------------- */

/* Position  start_rootx, start_rooty; */
/* int resz_border_width, resz_width, resz_height, resz_code; */

/* struct widgetusage widgetsUsed; */ /* flags what types of widgets in use */
Widget WBMarkedShell;                /* most recent popup edit shell */
Widget WBMarkedWidget;               /* widget marked for editing    */
char WBMarkedWidgetType[TYPSIZE];    /* marked widget's type         */
char WBMarkedWidgetOption[OPTSIZE];  /* resource to change on widget */

Widget filename_widget[10];  /* dialog widget to get filename to save C code */
int filename_not_done = TRUE;   /* used by dialogbox to get filename */

Widget userArea;
Widget documentation_line_widget; /* used to display useful msgs */
char documentation_string[MAX_DOCUMENTATION_LINE_LENGTH + 10];

Display *the_display;                     /* the display for this run */
XEvent the_event;                         /* used for XSendEvent()    */
Cursor the_cursor;                        /* Cursor used to point     */
Cursor the_other_cursor;                  /* Cursor used to point     */
XFontStruct *timesRoman12, *timesBold12;  /* font structures needed   */
XFontStruct *timesRoman14, *timesBold14;  /* font structures needed   */
XFontStruct *fixedFont;

int actions_added = 0;

Arg arg_list[30];

Arg userArea_arg_list[] = {
  /* Form related instance variables, about appearance */
  { XtNborderWidth, (XtArgVal) 1},      /* normal */
  { XtNdefaultDistance, (XtArgVal) 0},  /* normal */
/*  { XtNheight, (XtArgVal) DEF_HEIGHT},
  { XtNwidth, (XtArgVal) DEF_WIDTH}, */
  { XtNx, (XtArgVal) NULL},
  { XtNy, (XtArgVal) NULL},
  { XtNresizable, TRUE},
  { NULL, NULL}
 };

Arg minsize_userArea_arg_list[] = {
  /* Form related instance variables, about appearance */
  { XtNborderWidth, (XtArgVal) 0},      /* normal */
  { XtNdefaultDistance, (XtArgVal) 4},  /* normal */
  { XtNx, (XtArgVal) 356},
  { XtNy, (XtArgVal) 661},
  { XtNlabel, (XtArgVal) "          "},
  { XtNheight, (XtArgVal)  17 + 2 + 4},
  { XtNwidth, (XtArgVal)  62 + 2 + 4},
  { XtNleft, (XtArgVal) XtChainLeft},
  { XtNtop, (XtArgVal) XtChainTop},
  { XtNresizable, FALSE},
  { NULL, NULL}
 };

Arg wb_label_arg_list[] = {
  /* Label related instance variables, about appearance */
  { XtNborderWidth, (XtArgVal) 1},
  { XtNjustify, (XtArgVal) XtJustifyCenter},
  { XtNlabel, (XtArgVal)
"                               Widget Builder                              "},
  { XtNresizable, TRUE},
  { XtNleft, (XtArgVal) XtChainLeft},
  { XtNtop, (XtArgVal) XtChainTop},
  { XtNright, (XtArgVal) XtChainRight},
/*  { XtNwidth, (XtArgVal) DEF_WIDTH}, */
  { NULL, NULL}
 };

String widget_builder_options[] = {
    WBAddCommandButton,
    WBAddLabel,
    WBAddVideo,
    WBAddBlankLine,
    WBAddFormWidget,
    WBAddKeyedMailField,
/*    WBAddBlankMailField,
      WBResizeWorkingArea, */
    WBQuit,
    NULL
    };

/*  WBSaveAsCCode and WBSaveAsCCodeOp options are added to above in main() */


/****************************************************************/


#endif         /* end of ifndef _wbP_h_  :: DO NOT WRITE BELOW THIS LINE. */
