Scroll to navigation

cdk_graph(3) Library Functions Manual cdk_graph(3)

NAME

cdk_graph - curses graph widget

SYNOPSIS

cc [ flag ... ] file ... -lcdk [ library ... ]

#include <cdk.h>

CDKGRAPH *graph,
chtype *unused);
CDKGRAPH *graph);
CDKGRAPH *graph,
boolean box);
CDKGRAPH *graph);
CDKGRAPH *graph);
CDKGRAPH *graph,
int index);
CDKGRAPH *graph);
CDKGRAPH *graph);
CDKGRAPH *graph,
int index);
CDKGRAPH *graph,
int *size);
CDKGRAPH *graph,
int xpos,
int ypos,
boolean relative,
boolean refresh);
CDKSCREEN *cdkscreen,
int xpos,
int ypos,
int height,
int width,
const char *title,
const char *xtitle,
const char *ytitle);
CDKGRAPH *graph);
CDKGRAPH *graph,
int *values,
int valueCount,
const char *graphCharacters,
boolean startAtZero,
EGraphDisplayType displayType);
CDKGRAPH *graph,
chtype attribute);
CDKGRAPH *graph,
const char * color);
CDKGRAPH *graph,
boolean box);
CDKGRAPH *graph,
chtype character);
CDKGRAPH *graph,
int index,
const char *graphCharacter);
CDKGRAPH *graph,
const char *graphCharacters);
CDKGRAPH *graph,
EGraphDisplayType type);
CDKGRAPH *graph,
chtype character);
CDKGRAPH *graph,
chtype character);
CDKGRAPH *graph,
chtype character);
CDKGRAPH *graph,
chtype character);
CDKGRAPH *graph,
chtype character);
CDKGRAPH *graph,
int index,
int value,
boolean startAtZero);
CDKGRAPH *graph,
int *values,
int valueCount,
boolean startAtZero);
CDKGRAPH *graph,
chtype character);

DESCRIPTION

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

AVAILABLE FUNCTIONS

this is an obsolete function that calls drawCDKGraph.
removes the widget from the screen and frees memory the object used.
draws the graph widget on the screen. The box option tells whether to draw the widget with a box.
removes the widget from the screen. This does NOT destroy the widget.
returns true if the widget will be drawn with a box around it.
returns the character in the graph at the given index.
returns all the characters currently in the graph widget.
returns the current display type of the widget.
returns the value in the graph at the given index.
returns all the values currently in the graph widget.
moves the given widget to the given position.
  • The parameters xpos and ypos are the new position of the widget. The parameter xpos may be an integer or one of the pre-defined values TOP, BOTTOM, and CENTER. The parameter ypos may be an integer or one of the pre-defined values LEFT, RIGHT, and CENTER.
  • The parameter relative states whether the xpos/ypos pair is a relative move or an absolute move.
For example, if xpos = 1 and ypos = 2 and relative = TRUE, then the widget would move one row down and two columns right. If the value of relative was FALSE, then the widget would move to the position (1,2). Do not use the values TOP, BOTTOM, LEFT, RIGHT, or CENTER when relative = TRUE. (weird things may happen).
The final parameter refresh is a boolean value which states whether the widget will get refreshed after the move.
creates a pointer to a graph widget. Parameters:
is the screen you wish this widget to be placed in.
controls the placement of the object along the horizontal axis. It may be an integer or one of the pre-defined values LEFT, RIGHT, and CENTER.
controls the placement of the object along the vertical axis. It may be an integer or one of the pre-defined values TOP, BOTTOM, and CENTER.
control the height and width of the widget. If you provide a 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.
are the graph title, the X axis title, and the Y axis title respectively. The graph title may be more than one line by providing a carriage return character at the line break.
If the widget could not be created then a NULL pointer is returned.
allows the user to move the widget around the screen via the cursor/keypad keys. See cdk_position (3) for key bindings.
lets the programmer set the specific values of the graph widget.
  • The parameter values is an integer array of the values to display in the widget; valueCount is the number of values in the array.
  • The parameter graphCharacters is an array of the characters to use for each graph point.
  • The parameter startAtZero states whether you want the graph to start at zero or the lowest values of the X and Y axis'.
  • The parameter displayType may be vPLOT, to make the graph draw the values as a plot graph, or vLINE to draw the values as a line graph.
sets the background attribute of the widget. The parameter attribute is a curses attribute, e.g., A_BOLD.
sets the background color of the widget. The parameter color is in the format of the Cdk format strings. See cdk_display (3).
sets whether the widget will be drawn with a box around it.
function sets the attribute of the box.
lets the programmer set a specific character of the graph widget. The parameter character is the new character, while index is the index where the new character will be stored.
lets the programmer set the specific characters of the graph widget. The parameter characters is a char pointer array of the characters to display in the widget.
allows the programmer tochange the way the graph draws itself. The parameter displayType may be vPLOT, to make the graph draw the values as a plot graph, or vLINE to draw the values as a line graph.
sets the horizontal drawing character for the box to the given character.
sets the lower left hand corner of the widget's box to the given character.
sets the lower right hand corner of the widget's box to the given character.
sets the upper left hand corner of the widget's box to the given character.
sets the upper right hand corner of the widget's box to the given character.
lets the programmer set a specific value of the graph widget.
  • The parameter value is the new value, while index is the index where the new value will be stored.
  • The parameter startAtZero states whether you want the graph to start at zero or the lowest values of the X and Y axis.
lets the programmer set the specific values of the graph widget.
  • The parameter values is an integer array of the values to display in the widget.
  • valueCount is the number of values in the array.
  • The parameter startAtZero states whether you want the graph to start at zero or the lowest values of the X and Y axis'.
sets the vertical drawing character for the box to the given character.

SEE ALSO

cdk(3), cdk_binding(3), cdk_display(3), cdk_position(3), cdk_screen(3)