File: cdk_histogram.3

package info (click to toggle)
libcdk5 5.0.20161210-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,440 kB
  • ctags: 2,833
  • sloc: ansic: 32,375; sh: 4,732; makefile: 1,122; sed: 43; cpp: 41
file content (417 lines) | stat: -rw-r--r-- 11,643 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
'\" t
.\" $Id: cdk_histogram.3,v 1.17 2016/12/10 16:59:39 tom Exp $
.de bP
.IP \(bu 4
..
.de XX
..
.TH cdk_histogram 3
.SH NAME
.XX activateCDKHistogram
.XX destroyCDKHistogram
.XX drawCDKHistogram
.XX eraseCDKHistogram
.XX getCDKHistogramBox
.XX getCDKHistogramFillerChar
.XX getCDKHistogramHighValue
.XX getCDKHistogramLowValue
.XX getCDKHistogramStatsAttr
.XX getCDKHistogramStatsPos
.XX getCDKHistogramValue
.XX getCDKHistogramViewType
.XX moveCDKHistogram
.XX newCDKHistogram
.XX positionCDKHistogram
.XX setCDKHistogram
.XX setCDKHistogramBackgroundAttrib
.XX setCDKHistogramBackgroundColor
.XX setCDKHistogramBox
.XX setCDKHistogramBoxAttribute
.XX setCDKHistogramDisplayType
.XX setCDKHistogramFillerChar
.XX setCDKHistogramHorizontalChar
.XX setCDKHistogramLLChar
.XX setCDKHistogramLRChar
.XX setCDKHistogramStatsAttr
.XX setCDKHistogramStatsPos
.XX setCDKHistogramULChar
.XX setCDKHistogramURChar
.XX setCDKHistogramValue
.XX setCDKHistogramVerticalChar
.XX setCDKHistogramViewType
cdk_histogram \- curses histogram widget
.SH SYNOPSIS
.LP
.B cc
.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
.B \-lcdk
.RI "[ " "library" " \|.\|.\|. ]"
.LP
#include <cdk.h>
.nf
.TP 15
.B "void activateCDKHistogram ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "unused");
.TP 15
.B "void destroyCDKHistogram ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "void drawCDKHistogram ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "boolean " "box");
.TP 15
.B "void eraseCDKHistogram ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "boolean getCDKHistogramBox ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "chtype getCDKHistogramFillerChar ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "int getCDKHistogramHighValue ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "int getCDKHistogramLowValue ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "chtype getCDKHistogramStatsAttr ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "int getCDKHistogramStatsPos ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "int getCDKHistogramValue ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "EHistogramDisplayType getCDKHistogramViewType ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "void moveCDKHistogram ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "int " "xpos",
.BI "int " "ypos",
.BI "boolean " "relative",
.BI "boolean " "refresh");
.TP 15
.B "CDKHISTOGRAM *newCDKHistogram ("
.BI "CDKSCREEN *" "cdkscreen",
.BI "int " "xpos",
.BI "int " "ypos",
.BI "int " "height",
.BI "int " "width",
.BI "int " "orient",
.BI "const char *" "title",
.BI "boolean " "box",
.BI "boolean " "shadow");
.TP 15
.B "void positionCDKHistogram ("
.BI "CDKHISTOGRAM *" "histogram");
.TP 15
.B "void setCDKHistogram ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "EHistogramDisplayType " "viewType",
.BI "int " "statsPos",
.BI "chtype " "statsAttribute",
.BI "int " "lowValue",
.BI "int " "highValue",
.BI "int " "currentValue",
.BI "chtype " "fillerCharacter",
.BI "boolean " "box");
.TP 15
.B "void setCDKHistogramBackgroundAttrib ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "attribute");
.TP 15
.B "void setCDKHistogramBackgroundColor ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "const char * " "color");
.TP 15
.B "void setCDKHistogramBox ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "boolean " "box");
.TP 15
.B "void setCDKHistogramBoxAttribute ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "character");
.TP 15
.B "void setCDKHistogramDisplayType ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "EHistogramDisplayType " "viewtype");
.TP 15
.B "void setCDKHistogramFillerChar ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "fillerCharacter");
.TP 15
.B "void setCDKHistogramHorizontalChar ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "character");
.TP 15
.B "void setCDKHistogramLLChar ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "character");
.TP 15
.B "void setCDKHistogramLRChar ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "character");
.TP 15
.B "void setCDKHistogramStatsAttr ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "statsAttribute");
.TP 15
.B "void setCDKHistogramStatsPos ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "int " "statsPosition");
.TP 15
.B "void setCDKHistogramULChar ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "character");
.TP 15
.B "void setCDKHistogramURChar ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "character");
.TP 15
.B "void setCDKHistogramValue ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "int " "lowValue",
.BI "int " "highValue",
.BI "int " "currentValue");
.TP 15
.B "void setCDKHistogramVerticalChar ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "chtype " "character");
.TP 15
.B "void setCDKHistogramViewType ("
.BI "CDKHISTOGRAM *" "histogram",
.BI "EHistogramDisplayType " "viewType");
.fi
.SH DESCRIPTION
The Cdk histogram widget creates a histogram widget.
This widget can draw a vertical or horizontal histogram.
The functions create or manipulate the Cdk histogram box widget.
.SH AVAILABLE FUNCTIONS
.TP 5
.B activateCDKHistogram
obsolete entrypoint which calls \fBdrawCDKHistogram\fP.
.TP 5
.B destroyCDKHistogram
removes the widget from the screen and frees memory the object used.
.TP 5
.B drawCDKHistogram
draws the histogram widget on the screen.
If the \fBbox\fR parameter is true, the widget is drawn with a box.
.TP 5
.B eraseCDKHistogram
removes the widget from the screen.
This does \fINOT\fR destroy the widget.
.TP 5
.B getCDKHistogramBox
returns true if the widget will be drawn with a box around it.
.TP 5
.B getCDKHistogramFillerChar
returns the character being used to draw the histogram bar.
.TP 5
.B getCDKHistogramHighValue
returns the high value of the histogram.
.TP 5
.B getCDKHistogramLowValue
returns the low value of the histogram.
.TP 5
.B getCDKHistogramStatsAttr
returns the attribute of the statistics of the histogram.
.TP 5
.B getCDKHistogramStatsPos
returns where the histogram will draw the statistics.
.TP 5
.B getCDKHistogramValue
returns the current value of the histogram.
.TP 5
.B getCDKHistogramViewType
returns the view type of the histogram widget.
.TP 5
.B moveCDKHistogram
moves the given widget to the given position.
.RS
.bP
The parameters \fBxpos\fR and \fBypos\fR are the new position of the widget.
.bP
The parameter \fBxpos\fR may be an integer or one of the pre-defined values
\fITOP\fR, \fIBOTTOM\fR, and \fICENTER\fR.
.bP
The parameter \fBypos\fR can be an integer or one of the pre-defined values
\fILEFT\fR, \fIRIGHT\fR, and \fICENTER\fR.
.bP
The parameter \fBrelative\fR states whether
the \fBxpos\fR/\fBypos\fR pair is a relative move or an absolute move.
.IP
For example
if \fBxpos\fR = 1 and \fBypos\fR = 2 and \fBrelative\fR = \fBTRUE\fR,
then the widget would move one row down and two columns right.
If the value of \fBrelative\fR was \fBFALSE\fR then the widget would move to the position (1,2).
.IP
Do not use the values \fITOP\fR, \fIBOTTOM\fR, \fILEFT\fR,
\fIRIGHT\fR, or \fICENTER\fR when \fBrelative\fR = \fITRUE\fR.
(weird things may happen).
.bP
The final parameter \fBrefresh\fR is a boolean value which states
whether the widget will get refreshed after the move.
.RE
.TP 5
.B newCDKHistogram
creates a histogram widget and returns a pointer to it.
Parameters:
.RS
.TP 5
\fBscreen\fR
is the screen you wish this widget to be placed in.
.TP 5
\fBxpos\fR
controls the placement of the object along the horizontal axis.
It may be an integer or one of the pre-defined values
\fILEFT\fR, \fIRIGHT\fR, and \fICENTER\fR.
.TP 5
\fBypos\fR
controls the placement of the object along the vertical axis.
It may be an integer or one of the pre-defined values
\fITOP\fR, \fIBOTTOM\fR, and \fICENTER\fR.
.TP 5
\fBtitle\fR
is the string which will be displayed at the top of the widget.
The title can be more than one line; just provide a carriage return
character at the line break.
.TP 5
\fBheight\fR and
.TP 5
\fBwidth\fR
control the height and width of the widget.
If you provide a value of zero for either
of the height or the width, the widget will be created with the full width and
height of the screen.
If you provide a negative value, the widget will be created
the full height or width minus the value provided.
.TP 5
\fBorient\fR
specifies the orientation of the histogram.
It is one of these pre-defined values: \fIVERTICAL\fR and \fIHORIZONTAL\fR.
.TP 5
\fBlabel\fR
is the string to use as the label of the histogram.
.TP 5
\fBbox\fR
is true if the widget should be drawn with a box around it.
.TP 5
\fBshadow\fR
turns the shadow on or off around this widget.
.RE
.IP
If the widget could not be created then a \fINULL\fR pointer is returned.
.TP 5
.B positionCDKHistogram
allows the user to move the widget around the screen via the
cursor/keypad keys.
See \fBcdk_position (3)\fR for key bindings.
.TP 5
.B setCDKHistogram
lets the programmer set the specific values of the histogram widget.
.RS
.bP
The parameter \fBviewType\fR specifies the type of histogram to draw.
The following table lists the valid values and the results.
.LP
.TS
center tab(/) allbox;
l l
lw15 lw30 .
\fBDisplay_Type/Result\fR
vNONE/T{
Displays no information about the current values.
T}
vPERCENT/T{
Displays the current value as a percentage.
T}
vFRACTION/T{
Displays the current value as a fraction.
T}
vREAL/Displays the current value.
.TE
.sp
.bP
The \fBstatsPosition\fR parameter states where the statistics will be displayed.
It accepts \fITOP\fR, \fIBOTTOM\fR, and \fICENTER\fR.
.bP
The parameter \fBstatsAttribute\fR sets the attributes of the statistics.
.bP
The parameters \fBlowValue\fR, \fBhighValue\fR, and \fBcurrentValue\fR are the low, high,
and current values respectively.
.bP
The \fBfiller\fR character is the character
to use in the unused space in the histogram.
.bP
If the \fBbox\fR parameter is true, the widget is drawn with a box.
.RE
.TP 5
.B setCDKHistogramBackgroundAttrib
the background color attribute the widget.
The parameter \fBattribute\fR is a curses attribute, e.g., A_BOLD.
.TP 5
.B setCDKHistogramBackgroundColor
the background color of the widget.
The parameter \fBcolor\fR
is in the format of the Cdk format strings.
See \fBcdk_display (3)\fR.
.TP 5
.B setCDKHistogramBox
sets whether the widget will be drawn with a box around it.
.TP 5
.B setCDKHistogramBoxAttribute
sets the attribute of the box.
.TP 5
.B setCDKHistogramDisplayType
sets the display type (see \fBgetCDKHistogramViewType\fP).
.TP 5
.B setCDKHistogramFillerChar
sets the character to use when drawing the histogram bar.
.TP 5
.B setCDKHistogramHorizontalChar
sets the horizontal drawing character for the box to
the given character.
.TP 5
.B setCDKHistogramLLChar
sets the lower left hand corner of the widget's box to
the given character.
.TP 5
.B setCDKHistogramLRChar
sets the lower right hand corner of the widget's box to
the given character.
.TP 5
.B setCDKHistogramStatsAttr
sets the attribute to use when drawing the histogram statistics.
.TP 5
.B setCDKHistogramStatsPos
sets where the statistics will be drawn on the widget.
See the \fBsetCDKHistogram\fR description for more details.
.TP 5
.B setCDKHistogramULChar
sets the upper left hand corner of the widget's box to the given character.
.TP 5
.B setCDKHistogramURChar
sets the upper right hand corner of the widget's box to
the given character.
.TP 5
.B setCDKHistogramValue
sets the low, high, and current value of the histogram.
.TP 5
.B setCDKHistogramVerticalChar
sets the vertical drawing character for the box to
the given character.
.TP 5
.B setCDKHistogramViewType
sets the view type of the histogram.
Look at the \fBsetCDKHistogram\fR description for more details.
.SH SEE ALSO
.BR cdk (3),
.BR cdk_binding (3),
.BR cdk_display (3),
.BR cdk_position (3),
.BR cdk_screen (3)