StripCharP.h revision 994689c1
132001f49Smrg/***********************************************************
232001f49Smrg
332001f49SmrgCopyright 1987, 1988, 1998  The Open Group
432001f49Smrg
532001f49SmrgPermission to use, copy, modify, distribute, and sell this software and its
632001f49Smrgdocumentation for any purpose is hereby granted without fee, provided that
732001f49Smrgthe above copyright notice appear in all copies and that both that
832001f49Smrgcopyright notice and this permission notice appear in supporting
932001f49Smrgdocumentation.
1032001f49Smrg
1132001f49SmrgThe above copyright notice and this permission notice shall be included in
1232001f49Smrgall copies or substantial portions of the Software.
1332001f49Smrg
1432001f49SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1532001f49SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1632001f49SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
1732001f49SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
1832001f49SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1932001f49SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2032001f49Smrg
2132001f49SmrgExcept as contained in this notice, the name of The Open Group shall not be
2232001f49Smrgused in advertising or otherwise to promote the sale, use or other dealings
2332001f49Smrgin this Software without prior written authorization from The Open Group.
2432001f49Smrg
2532001f49Smrg
2632001f49SmrgCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
2732001f49Smrg
2832001f49Smrg                        All Rights Reserved
2932001f49Smrg
3032001f49SmrgPermission to use, copy, modify, and distribute this software and its
3132001f49Smrgdocumentation for any purpose and without fee is hereby granted,
3232001f49Smrgprovided that the above copyright notice appear in all copies and that
3332001f49Smrgboth that copyright notice and this permission notice appear in
3432001f49Smrgsupporting documentation, and that the name of Digital not be
3532001f49Smrgused in advertising or publicity pertaining to distribution of the
3632001f49Smrgsoftware without specific, written prior permission.
3732001f49Smrg
3832001f49SmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
3932001f49SmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
4032001f49SmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
4132001f49SmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
4232001f49SmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
4332001f49SmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
4432001f49SmrgSOFTWARE.
4532001f49Smrg
4632001f49Smrg******************************************************************/
4732001f49Smrg
4832001f49Smrg#ifndef _XawStripChartP_h
4932001f49Smrg#define _XawStripChartP_h
5032001f49Smrg
5132001f49Smrg#include <X11/Xaw/StripChart.h>
5232001f49Smrg#include <X11/Xaw/SimpleP.h>
5332001f49Smrg
5432001f49Smrg#define NO_GCS 0
5532001f49Smrg#define FOREGROUND	(1 << 0)
5632001f49Smrg#define HIGHLIGHT	(1 << 1)
5732001f49Smrg#define ALL_GCS (FOREGROUND | HIGHLIGHT)
5832001f49Smrg
5932001f49Smrg/* new fields for the stripChart widget */
6032001f49Smrgtypedef struct {
6132001f49Smrg    /* resources */
6232001f49Smrg    Pixel fgpixel;		/* color index for graph */
6332001f49Smrg    Pixel hipixel;		/* color index for lines */
6432001f49Smrg    GC fgGC;			/* graphics context for fgpixel */
6532001f49Smrg    GC hiGC;			/* graphics context for hipixel */
6632001f49Smrg
6732001f49Smrg    /* private */
6832001f49Smrg    int update;			/* update frequence */
6932001f49Smrg    int scale;			/* scale factor */
7032001f49Smrg    int min_scale;		/* smallest scale factor */
7132001f49Smrg    int interval;		/* data point interval */
7232001f49Smrg    XPoint *points;		/* Poly point for repairing graph lines */
7332001f49Smrg    double max_value;		/* Max Value in window */
7432001f49Smrg    double valuedata[2048];	/* record of data points */
7532001f49Smrg    XtIntervalId interval_id;
7632001f49Smrg    XtCallbackList get_value;	/* proc to call to fetch load pt */
7732001f49Smrg    int jump_val;		/* Amount to jump on each scroll */
7832001f49Smrg#ifndef OLDXAW
7932001f49Smrg    XtPointer pad[4];	/* for future use and keep binary compatability */
8032001f49Smrg#endif
8132001f49Smrg} StripChartPart;
8232001f49Smrg
8332001f49Smrg/* instance record declaration */
8432001f49Smrgtypedef struct _StripChartRec {
8532001f49Smrg    CorePart core;
8632001f49Smrg    SimplePart simple;
8732001f49Smrg    StripChartPart strip_chart;
8832001f49Smrg} StripChartRec;
8932001f49Smrg
9032001f49Smrg/* new fields for the StripChart widget class record */
9132001f49Smrgtypedef struct {
9232001f49Smrg    XtPointer extension;
9332001f49Smrg} StripChartClassPart;
9432001f49Smrg
9532001f49Smrg/* class record declaration */
9632001f49Smrgtypedef struct _StripChartClassRec {
9732001f49Smrg    CoreClassPart core_class;
9832001f49Smrg    SimpleClassPart simple_class;
9932001f49Smrg    StripChartClassPart strip_chart_class;
10032001f49Smrg} StripChartClassRec;
10132001f49Smrg
10232001f49Smrgextern StripChartClassRec stripChartClassRec;
10332001f49Smrg
10432001f49Smrg#endif /* _XawStripChartP_h */
10532001f49Smrg