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.  The parameters xpos
181            and ypos are the new position of the widget.  The  parameter  xpos
182            may  be  an  integer or one of the pre-defined values TOP, BOTTOM,
183            and CENTER.  The parameter ypos may be an integer or  one  of  the
184            pre-defined  values  LEFT, RIGHT, and CENTER.  The parameter rela‐
185            tive states whether the xpos/ypos pair is a relative  move  or  an
186            absolute move.  For example, if xpos = 1 and ypos = 2 and relative
187            = TRUE, then the widget would move one row down  and  two  columns
188            right.   If  the value of relative was FALSE then the widget would
189            move to the position (1,2).  Do not use the  values  TOP,  BOTTOM,
190            LEFT,  RIGHT,  or  CENTER when relative = TRUE.  (weird things may
191            happen).  The final parameter refresh is  a  boolean  value  which
192            states whether the widget will get refreshed after the move.
193
194       newCDKGraph
195            creates a pointer to a graph widget.  Parameters:
196
197            screen
198                 is the screen you wish this widget to be placed in.
199
200            xpos controls  the  placement  of  the object along the horizontal
201                 axis.  It may be an integer or one of the pre-defined  values
202                 LEFT, RIGHT, and CENTER.
203
204            ypos controls the placement of the object along the vertical axis.
205                 It may be an integer or one of the  pre-defined  values  TOP,
206                 BOTTOM, and CENTER.
207
208            height and
209
210            width
211                 control the height and width of the widget.  If you provide a
212                 zero for either of the height or the width, the  widget  will
213                 be  created with the full width and height of the screen.  If
214                 you provide a negative value, the widget will be created  the
215                 full height or width minus the value provided.
216
217            title,
218
219            xtitle and
220
221            ytitle
222                 are  the  graph title, the X axis title, and the Y axis title
223                 respectively.  The graph title may be more than one  line  by
224                 providing a carriage return character at the line break.
225
226            If  the  widget  could  not  be  created  then  a  NULL pointer is
227            returned.
228
229       positionCDKGraph
230            allows the user to move the widget around the screen via the  cur‐
231            sor/keypad keys.  See cdk_position (3) for key bindings.
232
233       setCDKGraph
234            lets  the  programmer set the specific values of the graph widget.
235            The parameter values is an integer array of the values to  display
236            in  the  widget;  valueCount is the number of values in the array.
237            The parameter graphCharacters is an array of the characters to use
238            for  each  graph  point.  The parameter startAtZero states whether
239            you want the graph to start at zero or the lowest values of the  X
240            and  Y axis'.  The parameter displayType may be vPLOT, to make the
241            graph draw the values as a plot graph, or vLINE to draw the values
242            as a line graph.
243
244       setCDKGraphBackgroundAttrib
245            sets  the  background  attribute  of  the  widget.   The parameter
246            attribute is a curses attribute, e.g., A_BOLD.
247
248       setCDKGraphBackgroundColor
249            sets the background color of the widget.  The parameter  color  is
250            in the format of the Cdk format strings.  See cdk_display (3).
251
252       setCDKGraphBox
253            sets whether the widget will be drawn with a box around it.
254
255       setCDKGraphBoxAttribute
256            function sets the attribute of the box.
257
258       setCDKGraphCharacter
259            lets  the programmer set a specific character of the graph widget.
260            The parameter character is the new character, while index  is  the
261            index where the new character will be stored.
262
263       setCDKGraphCharacters
264            lets  the programmer set the specific characters of the graph wid‐
265            get.  The parameter characters is a  char  pointer  array  of  the
266            characters to display in the widget.
267
268       setCDKGraphDisplayType
269            allows  the  programmer  tochange  the way the graph draws itself.
270            The parameter displayType may be vPLOT, to make the graph draw the
271            values  as  a  plot  graph,  or vLINE to draw the values as a line
272            graph.
273
274       setCDKGraphHorizontalChar
275            sets the horizontal drawing character for the  box  to  the  given
276            character.
277
278       setCDKGraphLLChar
279            sets  the  lower left hand corner of the widget's box to the given
280            character.
281
282       setCDKGraphLRChar
283            sets the lower right hand corner of the widget's box to the  given
284            character.
285
286       setCDKGraphULChar
287            sets  the  upper left hand corner of the widget's box to the given
288            character.
289
290       setCDKGraphURChar
291            sets the upper right hand corner of the widget's box to the  given
292            character.
293
294       setCDKGraphValue
295            lets the programmer set a specific value of the graph widget.  The
296            parameter value is the new value, while index is the  index  where
297            the  new  value  will be stored.  The parameter startAtZero states
298            whether you want the graph to start at zero or the  lowest  values
299            of the X and Y axis.
300
301       setCDKGraphValues
302            lets  the  programmer set the specific values of the graph widget.
303            The parameter values is an integer array of the values to  display
304            in  the  widget;  where  valueCount is the number of values in the
305            array.  The parameter startAtZero  states  whether  you  want  the
306            graph to start at zero or the lowest values of the X and Y axis'.
307
308       setCDKGraphVerticalChar
309            sets the vertical drawing character for the box to the given char‐
310            acter.
311

SEE ALSO

313       cdk(3), cdk_binding(3), cdk_display(3), cdk_position(3), cdk_screen(3)
314
315
316
317                                                                  cdk_graph(3)
Impressum