/****************************************************************** 
 *
 * graphclass.h --
 *
 *     Interface to graph class.
 *
 *
 * $Author: mstoufer $
 * $Source: /home/g2/src/projects/NetLogger/src/nlv/graphclass.h,v $
 * $RCSfile: graphclass.h,v $
 * $Revision: 1.1.1.1 $
 * $Locker:  $
 * $Date: 2000/12/05 19:52:32 $
 *
 ****************************************************************** 
 */
#ifndef NLV_GRAPH_INCLUDED
#define NLV_GRAPH_INCLUDED

#include <string.h>
#include <tcl.h>
#include <tk.h>
#include <blt.h>
#include "const.h"
#include "util.h"
#include "errclass.h"
#include "structs.h"
#include "keysclass.h"
#include "clientsclass.h"
#include "highlightclass.h"

/*========= DATA =====================================================*/

#define T Nlv_gr
typedef struct T *T;

/*========= FUNCTIONS ================================================*/

T           Nlv_grNew( );

int         Nlv_grAddClient( T, Nlv_ky keyObj, Nlv_Client*, int graphType );
void        Nlv_grClearHighlights( T );
void        Nlv_grClearMem( T );
int         Nlv_grDecolor( T );
int         Nlv_grDraw( T, int clientIndex, int flush );
void        Nlv_grFlush( T this, int drawFlag );
int         Nlv_grGetAutoResize( T );
Nlv_Bounds *Nlv_grGetYBounds( T );
int         Nlv_grGetClientVisible( T, int clIndex );
void        Nlv_grGetElementColorString( T, int type, int idx, char *buf );
long        Nlv_grGetFilePos( T, int ty, int elnum, int ypos );
Graph      *Nlv_grGetGraphPtr( T );
char       *Nlv_grGetHostName( T, int idx );
int         Nlv_grGetIndexAtTick( T, int tickNum );
char       *Nlv_grGetLabel( T, int y );
double      Nlv_grGetLastTime( T this );
int         Nlv_grGetBufferSize( T);
double      Nlv_grGetStart( T this );
double      Nlv_grGetScaleFactor( T );
char       *Nlv_grGetTickScale( T, int y );
char       *Nlv_grGetWidget( T );
Nlv_Bounds *Nlv_grGetWindow( T );
double      Nlv_grGraphTime( T, double absTime );
int         Nlv_grInMem( T, Nlv_Bounds*);
int         Nlv_grKeepReading( T, Nlv_Bounds *b );
int         Nlv_grKeepScrolling( T, Nlv_Bounds *b );
void        Nlv_grMapKeys( T, Nlv_ky keys );
int         Nlv_grProcess( T, Nlv_GData *gd);
double      Nlv_grRealTime( T this, double t );
int         Nlv_grRecolor( T );
int         Nlv_grRescale( T, int cli, Nlv_KeySet *ksPtr,double newlimit, int direction );
int         Nlv_grResetAllElements( T );
void        Nlv_grResetClientData( T, int cl );
void        Nlv_grSetAutoResize( T, int val  );
void        Nlv_grSetClientVisible( T, char *hostName, unsigned char newVis );
void        Nlv_grSetLatest( T, double t );
int         Nlv_grSetHighlights( T, long *list, int   size, char *symStr );
void        Nlv_grSetMaxElements( T, int max );
void        Nlv_grSetStart( T, double startTime );
int         Nlv_grSetSymbols( T, int typeNum, char *symStr );
void        Nlv_grSetWindow( T, Nlv_Bounds *b );
void        Nlv_grShiftClientData( T, int oldcl, int newcl );
char *      Nlv_grWriteGnuplot( T, int file_flag, char *dev_name,
				char *output_fmt, char *page_orient,
				char *color_mode, double xmin, double xmax,
				double ymin, double ymax );
#undef T
#endif

