2 * Copyright (c) 1993 Barton P. Miller, Morgan Clark, Timothy Torzewski,
3 * Jeff Hollingsworth, and Bruce Irvin. All rights reserved.
5 * This software is furnished under the condition that it may not
6 * be provided or otherwise made available to, or used by, any
7 * other person. No title to or ownership of the software is
8 * hereby transferred. The name of the principals
9 * may not be used in any advertising or publicity related to this
10 * software without specific, written prior authorization.
11 * Any use of this software must include the above copyright notice.
16 * $Log: Histogram.h,v $
17 * Revision 1.1 1993/08/26 18:23:09 hollings
20 * Revision 1.2 1993/01/26 21:10:30 hollings
21 * Changed to use IPS style selection of ymax and increments.
23 * Revision 1.1 1993/01/08 21:20:23 hollings
28 /*****************************************************************
30 ******************************************************************/
35 #include <X11/Xaw/Form.h>
43 /******************************************************************/
47 Name Class RepType Default Value
48 ---- ----- ------- -------------
49 background Background Pixel XtDefaultBackground
50 border BorderColor Pixel XtDefaultForeground
51 borderWidth BorderWidth Dimension 1
52 foreground Foreground Pixel XtDefaultForeground
53 graphHeight GraphHeight Dimension 200
54 graphWidth GraphWidth Dimension 600
56 maxCurve MaxCurve Int 10
57 maxGroup MaxGroup Int 10
58 colorLineStyle ColorLineStyle String
59 bwLineStyle BwLineStyle String
60 numXMarks NumXMarks Int 10
63 smoothNpts SmoothNpts Int 8
64 compact Compact Blloean Flase
67 #define XtCGraphForeground "GraphForeground"
68 #define XtCGraphBackground "GraphBackground"
69 #define XtCGraphWidth "GraphWidth"
70 #define XtCGraphHeight "GraphHeight"
71 #define XtCMaxCurve "MaxCurve"
72 #define XtCMaxGroup "MaxGroup"
73 #define XtCNumXMarks "NumXMarks"
74 #define XtCColorLineStyles "ColorLineStyles"
75 #define XtCBwLineStyles "BwLineStyles"
76 #define XtCYInc "YInc"
77 #define XtCYMin "YMin"
78 #define XtCSmoothNpts "SmoothNpts"
79 #define XtCCompact "Compact"
81 #define XtNgraphForeground "graphForeground"
82 #define XtNgraphBackground "graphBackground"
83 #define XtNgraphWidth "graphWidth"
84 #define XtNgraphHeight "graphHeight"
85 #define XtNmaxCurve "maxCurve"
86 #define XtNmaxGroup "maxGroup"
87 #define XtNnumXMarks "numXMarks"
88 #define XtNcolorLineStyles "colorLineStyles"
89 #define XtNbwLineStyles "bwLineStyles"
90 #define XtNyInc "yInc"
91 #define XtNyMin "yMin"
92 #define XtNsmoothNpts "smoothNpts"
93 #define XtNcompact "compact"
96 /* define mask for each bit in a mask */
106 #define MASK_10 01000
109 /* used to indicate what fields in CurveInfo are specified,
112 /* LINEPROPERTY to mask the property of a line : linestyle,
113 * foreground and width.
114 * once used, all three properties have to be supplied
116 LINEPROPERTY = MASK_3,
121 /* property of a curve, use CurveInfoMASK to indicate what are defined*/
122 typedef struct _CurveInfo {
123 Pixel foreground; /* foreground color */
124 int lineWidth; /* width of line */
126 int yInterval; /* interval in y-axis */
127 int yInc; /* yInc more when out of yMax limit*/
128 int yMax; /* max value of y-axis */
129 char *yTitle; /* title for y-axis */
134 typedef struct _CurveRec {
135 int curveID; /* filled after return, will be used
136 as a reference thereafter */
137 int groupID; /* used to find its group */
138 char *name; /* curve label shown at the bottom */
143 /**************************************************************/
145 typedef struct _HistogramClassRec *HistogramWidgetClass;
146 typedef struct _HistogramRec *HistogramWidget;
148 extern WidgetClass histogramWidgetClass;
150 /******************************************************/
152 extern void HistAddNewCurve(Widget, unsigned long, CurveRec *,Boolean);
153 extern void HistSampleInfo(Widget, double, int, double, Boolean);
154 extern void HistSetCurveData(Widget, int, int, int, float*);
155 extern void HistDeleteCurve(Widget, int **, int *);
156 extern void HistRestoreCurve(Widget, int *, int);
157 extern void HistClose(Widget);
158 extern void HistSmoothCurve(Widget, int **, int *);
159 extern void HistUnsmoothCurve(Widget, int **, int *);
165 #endif /* _Histogram_h */