Xaw3_1StripCharP.h revision 749
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer/*
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer* $XConsortium: StripCharP.h,v 1.3 89/11/11 14:53:47 kit Exp $
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer*/
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer/***********************************************************
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerand the Massachusetts Institute of Technology, Cambridge, Massachusetts.
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer All Rights Reserved
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerPermission to use, copy, modify, and distribute this software and its
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerdocumentation for any purpose and without fee is hereby granted,
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerprovided that the above copyright notice appear in all copies and that
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerboth that copyright notice and this permission notice appear in
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremersupporting documentation, and that the names of Digital or MIT not be
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerused in advertising or publicity pertaining to distribution of the
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremersoftware without specific, written prior permission.
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerSOFTWARE.
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer******************************************************************/
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#ifndef _XawStripChartP_h
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#define _XawStripChartP_h
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#include <./Xaw3_1StripChart.h>
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#include <./Xaw3_1SimpleP.h>
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#define NO_GCS 0
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#define FOREGROUND 1 << 0
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#define HIGHLIGHT 1 << 1
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#define ALL_GCS (FOREGROUND | HIGHLIGHT)
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer/* New fields for the stripChart widget instance record */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremertypedef struct {
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer Pixel fgpixel; /* color index for graph */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer Pixel hipixel; /* color index for lines */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer GC fgGC; /* graphics context for fgpixel */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer GC hiGC; /* graphics context for hipixel */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer /* start of graph stuff */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer int update; /* update frequence */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer int scale; /* scale factor */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer int min_scale; /* smallest scale factor */
744e50acbaaf22481b25b921b2bc199c8dd4a35cStephen Brooks int interval; /* data point interval */
744e50acbaaf22481b25b921b2bc199c8dd4a35cStephen Brooks XPoint * points ; /* Poly point for repairing graph lines. */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer Boolean reverse_video; /* display in reverse video */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer double max_value; /* Max Value in window */
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks double valuedata[2048];/* record of data points */
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks XtIntervalId interval_id;
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks XtCallbackList get_value; /* proc to call to fetch load pt */
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks int jump_val; /* Amount to jump on each scroll. */
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks} StripChartPart;
7a0878494fd11b7a861d0b3e2034534c10b5fb46Stephen Brooks
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer/* Full instance record declaration */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremertypedef struct _StripChartRec {
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer CorePart core;
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer SimplePart simple;
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer StripChartPart strip_chart;
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer} StripChartRec;
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer/* New fields for the StripChart widget class record */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremertypedef struct {int dummy;} StripChartClassPart;
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer/* Full class record declaration. */
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremertypedef struct _StripChartClassRec {
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer CoreClassPart core_class;
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer SimpleClassPart simple_class;
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer StripChartClassPart strip_chart_class;
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer} StripChartClassRec;
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks/* Class pointer. */
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooksextern StripChartClassRec stripChartClassRec;
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks#endif /* _XawStripChartP_h */
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks