2
#define CDKHISTOGRAM_H 1
7
* Description of the widget:
12
* Copyright 1999, Mike Glover
13
* All rights reserved.
15
* Redistribution and use in source and binary forms, with or without
16
* modification, are permitted provided that the following conditions
18
* 1. Redistributions of source code must retain the above copyright
19
* notice, this list of conditions and the following disclaimer.
20
* 2. Redistributions in binary form must reproduce the above copyright
21
* notice, this list of conditions and the following disclaimer in the
22
* documentation and/or other materials provided with the distribution.
23
* 3. All advertising materials mentioning features or use of this software
24
* must display the following acknowledgment:
25
* This product includes software developed by Mike Glover
27
* 4. Neither the name of Mike Glover, nor the names of contributors
28
* may be used to endorse or promote products derived from this software
29
* without specific prior written permission.
31
* THIS SOFTWARE IS PROVIDED BY MIKE GLOVER AND CONTRIBUTORS ``AS IS'' AND
32
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34
* ARE DISCLAIMED. IN NO EVENT SHALL MIKE GLOVER OR CONTRIBUTORS BE LIABLE
35
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
45
* Declare the histogram structure.
51
chtype * title[MAX_LINES];
52
int titlePos[MAX_LINES];
53
int titleLen[MAX_LINES];
67
EHistogramDisplayType viewType;
88
typedef struct SHistogram CDKHISTOGRAM;
91
* This returns a new pointer to a histogram pointer.
93
CDKHISTOGRAM *newCDKHistogram (
94
CDKSCREEN * /* cdkscreen */,
102
boolean /* shadow */);
105
* This was added to make the build simpler. All this will
106
* do is call drawCDKHistogram.
108
void activateCDKHistogram (
109
CDKHISTOGRAM * /* histogram */,
110
chtype * /* actions */);
113
* These set specific attributes of the histogram.
115
void setCDKHistogram (
116
CDKHISTOGRAM * /* histogram */,
117
EHistogramDisplayType /* viewtype */,
119
chtype /* statsAttr */,
127
* This sets the low/high/current value of the histogram.
129
void setCDKHistogramValue (
130
CDKHISTOGRAM * /* histogram */,
135
int getCDKHistogramValue (
136
CDKHISTOGRAM * /* histogram */);
138
int getCDKHistogramLowValue (
139
CDKHISTOGRAM * /* histogram */);
141
int getCDKHistogramHighValue (
142
CDKHISTOGRAM * /* histogram */);
145
* This sets the view type of the histogram.
147
void setCDKHistogramDisplayType (
148
CDKHISTOGRAM * /* histogram */,
149
EHistogramDisplayType /* viewtype */);
151
EHistogramDisplayType getCDKHistogramViewType (
152
CDKHISTOGRAM * /* histogram */);
155
* This returns the filler character used to draw the histogram.
157
void setCDKHistogramFillerChar (
158
CDKHISTOGRAM * /* histogram */,
159
chtype /* character */);
161
chtype getCDKHistogramFillerChar (
162
CDKHISTOGRAM * /* histogram */);
165
* This states where the statistics value is to be located on the histogram.
167
void setCDKHistogramStatsPos (
168
CDKHISTOGRAM * /* histogram */,
171
int getCDKHistogramStatsPos (
172
CDKHISTOGRAM * /* histogram */);
175
* This sets the attribute of the statistics.
177
void setCDKHistogramStatsAttr (
178
CDKHISTOGRAM * /* histogram */,
179
chtype /* statsAttr */);
181
chtype getCDKHistogramStatsAttr (
182
CDKHISTOGRAM * /* histogram */);
185
* This sets the box attribute of the widget.
187
void setCDKHistogramBox (
188
CDKHISTOGRAM * /* histogram */,
191
boolean getCDKHistogramBox (
192
CDKHISTOGRAM * /* histogram */);
195
* These functions set the drawing characters of the widget.
197
void setCDKHistogramULChar (
198
CDKHISTOGRAM * /* histogram */,
199
chtype /* character */);
201
void setCDKHistogramURChar (
202
CDKHISTOGRAM * /* histogram */,
203
chtype /* character */);
205
void setCDKHistogramLLChar (
206
CDKHISTOGRAM * /* histogram */,
207
chtype /* character */);
209
void setCDKHistogramLRChar (
210
CDKHISTOGRAM * /* histogram */,
211
chtype /* character */);
213
void setCDKHistogramVerticalChar (
214
CDKHISTOGRAM * /* histogram */,
215
chtype /* character */);
217
void setCDKHistogramHorizontalChar (
218
CDKHISTOGRAM * /* histogram */,
219
chtype /* character */);
221
void setCDKHistogramBoxAttribute (
222
CDKHISTOGRAM * /* histogram */,
223
chtype /* character */);
226
* This sets the background color of the widget.
228
void setCDKHistogramBackgroundColor (
229
CDKHISTOGRAM * /* histogram */,
233
* This draws the widget on the screen.
235
#define drawCDKHistogram(obj,Box) drawCDKObject(obj,Box)
238
* This removes the widget from the screen.
240
#define eraseCDKHistogram(obj) eraseCDKObject(obj)
243
* This moves the widget to the given location.
245
#define moveCDKHistogram(obj,xpos,ypos,relative,refresh) moveCDKObject(obj,xpos,ypos,relative,refresh)
248
* This allows the user to interactively position the widget on the screen.
250
#define positionCDKHistogram(widget) positionCDKObject(ObjOf(widget),widget->win)
253
* This destroys the histogram and all related pointers.
255
void destroyCDKHistogram (
256
CDKHISTOGRAM * /* histogram */);
258
#endif /* CDKHISTOGRAM_H */