1cdk_histogram(3)           Library Functions Manual           cdk_histogram(3)
2
3
4

NAME

6       cdk_histogram - curses histogram widget
7

SYNOPSIS

9       cc [ flag ... ] file ...  -lcdk [ library ... ]
10
11       #include <cdk.h>
12
13       void activateCDKHistogram (
14                      CDKHISTOGRAM *histogram,
15                      chtype unused);
16
17       void destroyCDKHistogram (
18                      CDKHISTOGRAM *histogram);
19
20       void drawCDKHistogram (
21                      CDKHISTOGRAM *histogram,
22                      boolean box);
23
24       void eraseCDKHistogram (
25                      CDKHISTOGRAM *histogram);
26
27       boolean getCDKHistogramBox (
28                      CDKHISTOGRAM *histogram);
29
30       chtype getCDKHistogramFillerChar (
31                      CDKHISTOGRAM *histogram);
32
33       int getCDKHistogramHighValue (
34                      CDKHISTOGRAM *histogram);
35
36       int getCDKHistogramLowValue (
37                      CDKHISTOGRAM *histogram);
38
39       chtype getCDKHistogramStatsAttr (
40                      CDKHISTOGRAM *histogram);
41
42       int getCDKHistogramStatsPos (
43                      CDKHISTOGRAM *histogram);
44
45       int getCDKHistogramValue (
46                      CDKHISTOGRAM *histogram);
47
48       EHistogramDisplayType getCDKHistogramViewType (
49                      CDKHISTOGRAM *histogram);
50
51       void moveCDKHistogram (
52                      CDKHISTOGRAM *histogram,
53                      int xpos,
54                      int ypos,
55                      boolean relative,
56                      boolean refresh);
57
58       CDKHISTOGRAM *newCDKHistogram (
59                      CDKSCREEN *cdkscreen,
60                      int xpos,
61                      int ypos,
62                      int height,
63                      int width,
64                      int orient,
65                      const char *title,
66                      boolean box,
67                      boolean shadow);
68
69       void positionCDKHistogram (
70                      CDKHISTOGRAM *histogram);
71
72       void setCDKHistogram (
73                      CDKHISTOGRAM *histogram,
74                      EHistogramDisplayType viewType,
75                      int statsPos,
76                      chtype statsAttribute,
77                      int lowValue,
78                      int highValue,
79                      int currentValue,
80                      chtype fillerCharacter,
81                      boolean box);
82
83       void setCDKHistogramBackgroundAttrib (
84                      CDKHISTOGRAM *histogram,
85                      chtype attribute);
86
87       void setCDKHistogramBackgroundColor (
88                      CDKHISTOGRAM *histogram,
89                      const char * color);
90
91       void setCDKHistogramBox (
92                      CDKHISTOGRAM *histogram,
93                      boolean box);
94
95       void setCDKHistogramBoxAttribute (
96                      CDKHISTOGRAM *histogram,
97                      chtype character);
98
99       void setCDKHistogramDisplayType (
100                      CDKHISTOGRAM *histogram,
101                      EHistogramDisplayType viewtype);
102
103       void setCDKHistogramFillerChar (
104                      CDKHISTOGRAM *histogram,
105                      chtype fillerCharacter);
106
107       void setCDKHistogramHorizontalChar (
108                      CDKHISTOGRAM *histogram,
109                      chtype character);
110
111       void setCDKHistogramLLChar (
112                      CDKHISTOGRAM *histogram,
113                      chtype character);
114
115       void setCDKHistogramLRChar (
116                      CDKHISTOGRAM *histogram,
117                      chtype character);
118
119       void setCDKHistogramStatsAttr (
120                      CDKHISTOGRAM *histogram,
121                      chtype statsAttribute);
122
123       void setCDKHistogramStatsPos (
124                      CDKHISTOGRAM *histogram,
125                      int statsPosition);
126
127       void setCDKHistogramULChar (
128                      CDKHISTOGRAM *histogram,
129                      chtype character);
130
131       void setCDKHistogramURChar (
132                      CDKHISTOGRAM *histogram,
133                      chtype character);
134
135       void setCDKHistogramValue (
136                      CDKHISTOGRAM *histogram,
137                      int lowValue,
138                      int highValue,
139                      int currentValue);
140
141       void setCDKHistogramVerticalChar (
142                      CDKHISTOGRAM *histogram,
143                      chtype character);
144
145       void setCDKHistogramViewType (
146                      CDKHISTOGRAM *histogram,
147                      EHistogramDisplayType viewType);
148

DESCRIPTION

150       The  Cdk  histogram widget creates a histogram widget.  This widget can
151       draw a vertical or  horizontal  histogram.   The  functions  create  or
152       manipulate the Cdk histogram box widget.
153

AVAILABLE FUNCTIONS

155       activateCDKHistogram
156            obsolete entrypoint which calls drawCDKHistogram.
157
158       destroyCDKHistogram
159            removes  the  widget  from  the screen and frees memory the object
160            used.
161
162       drawCDKHistogram
163            draws the histogram widget on the screen.  If the box parameter is
164            true, the widget is drawn with a box.
165
166       eraseCDKHistogram
167            removes  the  widget  from  the screen.  This does NOT destroy the
168            widget.
169
170       getCDKHistogramBox
171            returns true if the widget will be drawn with a box around it.
172
173       getCDKHistogramFillerChar
174            returns the character being used to draw the histogram bar.
175
176       getCDKHistogramHighValue
177            returns the high value of the histogram.
178
179       getCDKHistogramLowValue
180            returns the low value of the histogram.
181
182       getCDKHistogramStatsAttr
183            returns the attribute of the statistics of the histogram.
184
185       getCDKHistogramStatsPos
186            returns where the histogram will draw the statistics.
187
188       getCDKHistogramValue
189            returns the current value of the histogram.
190
191       getCDKHistogramViewType
192            returns the view type of the histogram widget.
193
194       moveCDKHistogram
195            moves the given widget to the given position.
196
197            ·   The parameters xpos and ypos are the new position of the  wid‐
198                get.
199
200            ·   The parameter xpos may be an integer or one of the pre-defined
201                values TOP, BOTTOM, and CENTER.
202
203            ·   The parameter ypos can be an integer or one of the pre-defined
204                values LEFT, RIGHT, and CENTER.
205
206            ·   The  parameter relative states whether the xpos/ypos pair is a
207                relative move or an absolute move.
208
209                For example if xpos = 1 and ypos = 2 and relative = TRUE, then
210                the  widget would move one row down and two columns right.  If
211                the value of relative was FALSE, then the widget would move to
212                the position (1,2).
213
214                Do not use the values TOP, BOTTOM, LEFT, RIGHT, or CENTER when
215                relative = TRUE.  (weird things may happen).
216
217            ·   The final parameter refresh is a boolean  value  which  states
218                whether the widget will get refreshed after the move.
219
220       newCDKHistogram
221            creates  a  histogram widget and returns a pointer to it.  Parame‐
222            ters:
223
224            screen
225                 is the screen you wish this widget to be placed in.
226
227            xpos controls the placement of the  object  along  the  horizontal
228                 axis.   It may be an integer or one of the pre-defined values
229                 LEFT, RIGHT, and CENTER.
230
231            ypos controls the placement of the object along the vertical axis.
232                 It  may  be  an integer or one of the pre-defined values TOP,
233                 BOTTOM, and CENTER.
234
235            title
236                 is the string which will be displayed at the top of the  wid‐
237                 get.   The  title  can  be more than one line; just provide a
238                 carriage return character at the line break.
239
240            height and
241
242            width
243                 control the height and width of the widget.  If you provide a
244                 value of zero for either of the height or the width, the wid‐
245                 get will be created with the full width  and  height  of  the
246                 screen.   If you provide a negative value, the widget will be
247                 created the full height or width minus the value provided.
248
249            orient
250                 specifies the orientation of the histogram.   It  is  one  of
251                 these pre-defined values: VERTICAL and HORIZONTAL.
252
253            label
254                 is the string to use as the label of the histogram.
255
256            box  is true if the widget should be drawn with a box around it.
257
258            shadow
259                 turns the shadow on or off around this widget.
260
261            If  the  widget  could  not  be  created  then  a  NULL pointer is
262            returned.
263
264       positionCDKHistogram
265            allows the user to move the widget around the screen via the  cur‐
266            sor/keypad keys.  See cdk_position (3) for key bindings.
267
268       setCDKHistogram
269            lets  the programmer set the specific values of the histogram wid‐
270            get.
271
272            ·   The parameter viewType specifies  the  type  of  histogram  to
273                draw.   The  following  table  lists  the valid values and the
274                results.
275
276                    ┌────────────────┬────────────────────────────────┐
277Display_Type    Result                         
278                    ├────────────────┼────────────────────────────────┤
279                    │vNONE           │ Displays no information  about │
280                    │                │ the current values.            │
281                    ├────────────────┼────────────────────────────────┤
282                    │vPERCENT        │ Displays  the current value as │
283                    │                │ a percentage.                  │
284                    ├────────────────┼────────────────────────────────┤
285                    │vFRACTION       │ Displays the current value  as │
286                    │                │ a fraction.                    │
287                    ├────────────────┼────────────────────────────────┤
288                    │vREAL           │ Displays the current value.    │
289                    └────────────────┴────────────────────────────────┘
290
291            ·   The  statsPosition  parameter states where the statistics will
292                be displayed.  It accepts TOP, BOTTOM, and CENTER.
293
294            ·   The parameter statsAttribute sets the attributes of  the  sta‐
295                tistics.
296
297            ·   The  parameters  lowValue, highValue, and currentValue are the
298                low, high, and current values respectively.
299
300            ·   The filler character is the character to  use  in  the  unused
301                space in the histogram.
302
303            ·   If the box parameter is true, the widget is drawn with a box.
304
305       setCDKHistogramBackgroundAttrib
306            the   background   color  attribute  the  widget.   The  parameter
307            attribute is a curses attribute, e.g., A_BOLD.
308
309       setCDKHistogramBackgroundColor
310            the background color of the widget.  The parameter color is in the
311            format of the Cdk format strings.  See cdk_display (3).
312
313       setCDKHistogramBox
314            sets whether the widget will be drawn with a box around it.
315
316       setCDKHistogramBoxAttribute
317            sets the attribute of the box.
318
319       setCDKHistogramDisplayType
320            sets the display type (see getCDKHistogramViewType).
321
322       setCDKHistogramFillerChar
323            sets the character to use when drawing the histogram bar.
324
325       setCDKHistogramHorizontalChar
326            sets  the  horizontal  drawing  character for the box to the given
327            character.
328
329       setCDKHistogramLLChar
330            sets the lower left hand corner of the widget's box to  the  given
331            character.
332
333       setCDKHistogramLRChar
334            sets  the lower right hand corner of the widget's box to the given
335            character.
336
337       setCDKHistogramStatsAttr
338            sets the attribute to use when drawing the histogram statistics.
339
340       setCDKHistogramStatsPos
341            sets where the statistics will be drawn on the  widget.   See  the
342            setCDKHistogram description for more details.
343
344       setCDKHistogramULChar
345            sets  the  upper left hand corner of the widget's box to the given
346            character.
347
348       setCDKHistogramURChar
349            sets the upper right hand corner of the widget's box to the  given
350            character.
351
352       setCDKHistogramValue
353            sets the low, high, and current value of the histogram.
354
355       setCDKHistogramVerticalChar
356            sets the vertical drawing character for the box to the given char‐
357            acter.
358
359       setCDKHistogramViewType
360            sets the view type of the histogram.  Look at the  setCDKHistogram
361            description for more details.
362

SEE ALSO

364       cdk(3), cdk_binding(3), cdk_display(3), cdk_position(3), cdk_screen(3)
365
366
367
368                                                              cdk_histogram(3)
Impressum