/* This is the private .h file for the chart widget       */
/*  Created by Lisa N. Paradis for Project Athena         */
#ifndef _At_StripchartP_h
#define _At_StripchartP_h

#include "Stripchart.h"
#include<X11/CoreP.h>

typedef struct {
  
  double xdivision_pixels;  /** gives the division sz in pixels **/
  double ydivision_pixels;  
  int	 num_segs;    /* number of segments to make the grid on the screen */
  int    xstart;      /** gives the start and end positions of the xaxis */
  int    xend; 
  int    ystart;            /* gives the start and end positions of the yaxis */
  int    yend;
  GC     drawGC;            /* to draw labels, grippers, etc */
  int    xscale;            /* converts data from real-world to pixel */
  int    yscale;
  double xpix_per_mm;       /* conversion factor for pixels per mm */
  double ypix_per_mm;
} ScreenLayout;

typedef struct {

 	int		ft_size;	/* size of the font */
  	AtFontFamily	font;		/* font family for titles, etc */

	Boolean		force_square;	/*does user square divisions?? */
	Boolean         timer_on;       /* usr wants internal timer to run*/

	Pixel           fgpixel;        /* foreground color */

	int             xdivision_size; /* size of the divisions */
	int		ydivision_size;
	
	int             margin_hgt;     /* height of the margin in pixels*/
	int             margin_wdth;    /* width of the margin in pixels */
	int             percent_shift;  /* percent of scrn shft when data*/
                                        /* reaches the end of the screen */
	int		sample_interval; /* used to divide the axis into time*/
	int             timer_interval;

	int		xdiv;    	/* number of divisions on an axis */
	int             ydiv;
	double          xdiv_units;     /* units per division */
        double          ydiv_units;
 

	String          xunits;         /* name of units for axes */
	String          yunits;

	ScreenLayout    layout;         /* layout of the screen */


	XSegment        *grid_lines;    /* array of lines for the grid */
	
	XtCallbackProc  click_callbk;   /* callbacks */
	XtCallbackProc  drag_callbk;
	XtCallbackProc  drag_grip_callbk;
	XtCallbackProc  select_callbk;

	XtIntervalId	interval_id;    /* for internal timer */

} AtStripchartPart; 


/* Full instance record declaration */

typedef struct _AtStripchartRec {
  CorePart core;
  XmPrimitivePart primitive;
  AtStripchartPart stripchart;
} AtStripchartRec;

/* New fields for the AtStripchart widget class record */

typedef struct {int dummy;} AtStripchartClassPart;


/* Full class record declaration */

typedef struct _AtStripchartClassRec {
  CoreClassPart core_class;
  XmPrimitiveClassPart primitive_class;
  AtStripchartClassPart atstripchart_class;
} AtStripchartClassRec;


/* The Class pointer... */

extern AtStripchartClassRec atstripchartClass;

#endif _At_StripchartP_h
