#include<Xm/XmP.h>
#include<X11/StringDefs.h>
#include<X11/Shell.h>
#include"Stripchart.h"
#include<stdio.h>

static XrmOptionDescRec options[] = {
        {"-margin_hgt","*stripchart.marginHeight",XrmoptionSepArg,NULL},
	{"-margin_wdth","*stripchart.marginWidth",XrmoptionSepArg,NULL},
	{"-num_xdiv","*stripchart.xDivisions",XrmoptionSepArg, NULL},
	{"-num_ydiv","*stripchart.yDivisions",XrmoptionSepArg,NULL},
	{"-xdiv_sz","*stripchart.xDivisionSize",XrmoptionSepArg,"NULL"},
	{"-ydiv_sz","*stripchart.yDivisionSize",XrmoptionSepArg,"NULL"},
	{"-xunits","*stripchart.xunits",XrmoptionSepArg,NULL},
	{"-yunits","*stripchart.yunits",XrmoptionSepArg,NULL},
	{"-xunit/div","*stripchart.xUnitsPerDivision",XrmoptionSepArg,NULL},
	{"-yunit/div","*stripchart.yUnitsPerDivision", XrmoptionSepArg, NULL},
      };

/**********************************************************************/
/* The main program for the application and the XtMainLoop            */
/**********************************************************************/

main(argc,argv)
     int argc;
     char *argv[];

{
  Widget toplevel, wstripchart;
  Arg arglist[5];
  int i;

  /** creation of the toplevel widget.  This is the parent of pane  **/
  toplevel = XtInitialize("main","AtStripchart",options,XtNumber(options),
			  &argc, argv);
  
  /** creation of the stripchart widget (and callbacks) **/
  i=0;
  XtSetArg(arglist[i], XtNheight, 500); i++;
  XtSetArg(arglist[i], XtNwidth, 500); i++;
  wstripchart = XtCreateManagedWidget("stripchart",atStripchartWidgetClass,
				      toplevel, arglist,i);

  /** The infinite loop that processes events **/

  XtRealizeWidget(toplevel);
  XtMainLoop();

}  /** end main() **/


