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

NAME

6       cdk_graph - curses graph widget
7

SYNOPSIS

9       cc [ flag ... ] file ...  -lcdk [ library ... ]
10
11       #include <cdk.h>
12
13       void activateCDKGraph (
14                      CDKGRAPH *graph,
15                      chtype *unused);
16
17       void destroyCDKGraph (
18                      CDKGRAPH *graph);
19
20       void drawCDKGraph (
21                      CDKGRAPH *graph,
22                      boolean box);
23
24       void eraseCDKGraph (
25                      CDKGRAPH *graph);
26
27       boolean getCDKGraphBox (
28                      CDKGRAPH *graph);
29
30       chtype getCDKGraphCharacter (
31                      CDKGRAPH *graph,
32                      int index);
33
34       chtype *getCDKGraphCharacters (
35                      CDKGRAPH *graph);
36
37       EGraphDisplayType getCDKGraphDisplayType (
38                      CDKGRAPH *graph);
39
40       int getCDKGraphValue (
41                      CDKGRAPH *graph,
42                      int index);
43
44       int *getCDKGraphValues (
45                      CDKGRAPH *graph,
46                      int *size);
47
48       void moveCDKGraph (
49                      CDKGRAPH *graph,
50                      int xpos,
51                      int ypos,
52                      boolean relative,
53                      boolean refresh);
54
55       CDKGRAPH *newCDKGraph (
56                      CDKSCREEN *cdkscreen,
57                      int xpos,
58                      int ypos,
59                      int height,
60                      int width,
61                      const char *title,
62                      const char *xtitle,
63                      const char *ytitle);
64
65       void positionCDKGraph (
66                      CDKGRAPH *graph);
67
68       int setCDKGraph (
69                      CDKGRAPH *graph,
70                      int *values,
71                      int valueCount,
72                      const char *graphCharacters,
73                      boolean startAtZero,
74                      EGraphDisplayType displayType);
75
76       void setCDKGraphBackgroundAttrib (
77                      CDKGRAPH *graph,
78                      chtype attribute);
79
80       void setCDKGraphBackgroundColor (
81                      CDKGRAPH *graph,
82                      const char * color);
83
84       void setCDKGraphBox (
85                      CDKGRAPH *graph,
86                      boolean box);
87
88       void setCDKGraphBoxAttribute (
89                      CDKGRAPH *graph,
90                      chtype character);
91
92       int setCDKGraphCharacter (
93                      CDKGRAPH *graph,
94                      int index,
95                      const char *graphCharacter);
96
97       int setCDKGraphCharacters (
98                      CDKGRAPH *graph,
99                      const char *graphCharacters);
100
101       void setCDKGraphDisplayType (
102                      CDKGRAPH *graph,
103                      EGraphDisplayType type);
104
105       void setCDKGraphHorizontalChar (
106                      CDKGRAPH *graph,
107                      chtype character);
108
109       void setCDKGraphLLChar (
110                      CDKGRAPH *graph,
111                      chtype character);
112
113       void setCDKGraphLRChar (
114                      CDKGRAPH *graph,
115                      chtype character);
116
117       void setCDKGraphULChar (
118                      CDKGRAPH *graph,
119                      chtype character);
120
121       void setCDKGraphURChar (
122                      CDKGRAPH *graph,
123                      chtype character);
124
125       int setCDKGraphValue (
126                      CDKGRAPH *graph,
127                      int index,
128                      int value,
129                      boolean startAtZero);
130
131       int setCDKGraphValues (
132                      CDKGRAPH *graph,
133                      int *values,
134                      int valueCount,
135                      boolean startAtZero);
136
137       void setCDKGraphVerticalChar (
138                      CDKGRAPH *graph,
139                      chtype character);
140

DESCRIPTION

142       The  Cdk  graph widget creates a graph in either X/Y plot or line mode.
143       The following functions create or manipulate the Cdk graph box widget.
144

AVAILABLE FUNCTIONS

146       activateCDKGraph
147            this is an obsolete function that calls drawCDKGraph.
148
149       destroyCDKGraph
150            removes the widget from the screen and  frees  memory  the  object
151            used.
152
153       drawCDKGraph
154            draws  the  graph  widget  on  the  screen.   The box option tells
155            whether to draw the widget with a box.
156
157       eraseCDKGraph
158            removes the widget from the screen.  This  does  NOT  destroy  the
159            widget.
160
161       getCDKGraphBox
162            returns true if the widget will be drawn with a box around it.
163
164       getCDKGraphCharacter
165            returns the character in the graph at the given index.
166
167       getCDKGraphCharacters
168            returns all the characters currently in the graph widget.
169
170       getCDKGraphDisplayType
171            returns the current display type of the widget.
172
173       getCDKGraphValue
174            returns the value in the graph at the given index.
175
176       getCDKGraphValues
177            returns all the values currently in the graph widget.
178
179       moveCDKGraph
180            moves the given widget to the given position.
181
182            ·   The  parameters xpos and ypos are the new position of the wid‐
183                get.  The parameter xpos may be an integer or one of the  pre-
184                defined  values  TOP,  BOTTOM, and CENTER.  The parameter ypos
185                may be an integer or  one  of  the  pre-defined  values  LEFT,
186                RIGHT, and CENTER.
187
188            ·   The  parameter relative states whether the xpos/ypos pair is a
189                relative move or an absolute move.
190
191                For example, if xpos = 1 and ypos = 2  and  relative  =  TRUE,
192                then the widget would move one row down and two columns right.
193                If the value of relative was FALSE, then the widget would move
194                to  the  position  (1,2).   Do not use the values TOP, BOTTOM,
195                LEFT, RIGHT, or CENTER when relative =  TRUE.   (weird  things
196                may happen).
197
198            ·   The  final  parameter  refresh is a boolean value which states
199                whether the widget will get refreshed after the move.
200
201       newCDKGraph
202            creates a pointer to a graph widget.  Parameters:
203
204            screen
205                 is the screen you wish this widget to be placed in.
206
207            xpos controls the placement of the  object  along  the  horizontal
208                 axis.   It may be an integer or one of the pre-defined values
209                 LEFT, RIGHT, and CENTER.
210
211            ypos controls the placement of the object along the vertical axis.
212                 It  may  be  an integer or one of the pre-defined values TOP,
213                 BOTTOM, and CENTER.
214
215            height and
216
217            width
218                 control the height and width of the widget.  If you provide a
219                 zero  for  either of the height or the width, the widget will
220                 be created with the full width and height of the screen.   If
221                 you  provide a negative value, the widget will be created the
222                 full height or width minus the value provided.
223
224            title,
225
226            xtitle and
227
228            ytitle
229                 are the graph title, the X axis title, and the Y  axis  title
230                 respectively.   The  graph title may be more than one line by
231                 providing a carriage return character at the line break.
232
233            If the widget  could  not  be  created  then  a  NULL  pointer  is
234            returned.
235
236       positionCDKGraph
237            allows  the user to move the widget around the screen via the cur‐
238            sor/keypad keys.  See cdk_position (3) for key bindings.
239
240       setCDKGraph
241            lets the programmer set the specific values of the graph widget.
242
243            ·   The parameter values is an integer array of the values to dis‐
244                play  in the widget; valueCount is the number of values in the
245                array.
246
247            ·   The parameter graphCharacters is an array of the characters to
248                use for each graph point.
249
250            ·   The parameter startAtZero states whether you want the graph to
251                start at zero or the lowest values of the X and Y axis'.
252
253            ·   The parameter displayType may be vPLOT, to make the graph draw
254                the  values  as a plot graph, or vLINE to draw the values as a
255                line graph.
256
257       setCDKGraphBackgroundAttrib
258            sets the  background  attribute  of  the  widget.   The  parameter
259            attribute is a curses attribute, e.g., A_BOLD.
260
261       setCDKGraphBackgroundColor
262            sets  the  background color of the widget.  The parameter color is
263            in the format of the Cdk format strings.  See cdk_display (3).
264
265       setCDKGraphBox
266            sets whether the widget will be drawn with a box around it.
267
268       setCDKGraphBoxAttribute
269            function sets the attribute of the box.
270
271       setCDKGraphCharacter
272            lets the programmer set a specific character of the graph  widget.
273            The  parameter  character is the new character, while index is the
274            index where the new character will be stored.
275
276       setCDKGraphCharacters
277            lets the programmer set the specific characters of the graph  wid‐
278            get.   The  parameter  characters  is  a char pointer array of the
279            characters to display in the widget.
280
281       setCDKGraphDisplayType
282            allows the programmer tochange the way  the  graph  draws  itself.
283            The parameter displayType may be vPLOT, to make the graph draw the
284            values as a plot graph, or vLINE to draw  the  values  as  a  line
285            graph.
286
287       setCDKGraphHorizontalChar
288            sets  the  horizontal  drawing  character for the box to the given
289            character.
290
291       setCDKGraphLLChar
292            sets the lower left hand corner of the widget's box to  the  given
293            character.
294
295       setCDKGraphLRChar
296            sets  the lower right hand corner of the widget's box to the given
297            character.
298
299       setCDKGraphULChar
300            sets the upper left hand corner of the widget's box to  the  given
301            character.
302
303       setCDKGraphURChar
304            sets  the upper right hand corner of the widget's box to the given
305            character.
306
307       setCDKGraphValue
308            lets the programmer set a specific value of the graph widget.
309
310            ·   The parameter value is the new value, while index is the index
311                where the new value will be stored.
312
313            ·   The parameter startAtZero states whether you want the graph to
314                start at zero or the lowest values of the X and Y axis.
315
316       setCDKGraphValues
317            lets the programmer set the specific values of the graph widget.
318
319            ·   The parameter values is an integer array of the values to dis‐
320                play in the widget.
321
322            ·   valueCount is the number of values in the array.
323
324            ·   The parameter startAtZero states whether you want the graph to
325                start at zero or the lowest values of the X and Y axis'.
326
327       setCDKGraphVerticalChar
328            sets the vertical drawing character for the box to the given char‐
329            acter.
330

SEE ALSO

332       cdk(3), cdk_binding(3), cdk_display(3), cdk_position(3), cdk_screen(3)
333
334
335
336                                                                  cdk_graph(3)
Impressum