eraseCDKGraph3
Cdk graph widget
Part of cdk_graph(3).
Usage
cc [flag ...]
file ...
-lcdk
[library ...]
Overview
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
activateCDKGraph-
this is an obsolete function that calls
drawCDKGraph.
destroyCDKGraph-
removes the widget from the screen and frees memory the object used.
drawCDKGraph-
draws the graph widget on the screen. The
boxoption tells whether to draw the widget with a box.
eraseCDKGraph-
removes the widget from the screen. This does NOT destroy the widget.
getCDKGraphBox-
returns true if the widget will be drawn with a box around it.
getCDKGraphCharacter-
returns the character in the graph at the given index.
getCDKGraphCharacters-
returns all the characters currently in the graph widget.
getCDKGraphDisplayType-
returns the current display type of the widget.
getCDKGraphValue-
returns the value in the graph at the given index.
getCDKGraphValues-
returns all the values currently in the graph widget.
moveCDKGraph-
moves the given widget to the given position.
- •
-
The parameters
xposandyposare the new position of the widget. The parameterxposmay be an integer or one of the pre-defined values TOP, BOTTOM, and CENTER. The parameteryposmay be an integer or one of the pre-defined values LEFT, RIGHT, and CENTER.
- •
-
The parameter
relativestates whether thexpos/ypospair is a relative move or an absolute move.
-
For example, if
xpos= 1 andypos= 2 andrelative= TRUE, then the widget would move one row down and two columns right. If the value ofrelativewas FALSE, then the widget would move to the position (1,2). Do not use the values TOP, BOTTOM, LEFT, RIGHT, or CENTER whenrelative= TRUE. (weird things may happen).
- •
-
The final parameter
refreshis a boolean value which states whether the widget will get refreshed after the move.
newCDKGraph-
creates a pointer to a graph widget. Parameters:
screen-
is the screen you wish this widget to be placed in.
xpos-
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.
ypos-
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.
heightand
width-
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.
title,
xtitleand
ytitle-
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.
positionCDKGraph-
allows the user to move the widget around the screen via the cursor/keypad keys. See cdk_position (3) for key bindings.
setCDKGraph-
lets the programmer set the specific values of the graph widget.
- •
-
The parameter
valuesis an integer array of the values to display in the widget;valueCountis the number of values in the array.
- •
-
The parameter
graphCharactersis an array of the characters to use for each graph point.
- •
-
The parameter
startAtZerostates whether you want the graph to start at zero or the lowest values of the X and Y axis'.
- •
-
The parameter
displayTypemay be vPLOT, to make the graph draw the values as a plot graph, or vLINE to draw the values as a line graph.
setCDKGraphBackgroundAttrib-
sets the background attribute of the widget. The parameter
attributeis a curses attribute, e.g., A_BOLD.
setCDKGraphBackgroundColor-
sets the background color of the widget. The parameter
coloris in the format of the Cdk format strings. See cdk_display (3).
setCDKGraphBox-
sets whether the widget will be drawn with a box around it.
setCDKGraphBoxAttribute-
function sets the attribute of the box.
setCDKGraphCharacter-
lets the programmer set a specific character of the graph widget. The parameter
characteris the new character, whileindexis the index where the new character will be stored.
setCDKGraphCharacters-
lets the programmer set the specific characters of the graph widget. The parameter
charactersis a char pointer array of the characters to display in the widget.
setCDKGraphDisplayType-
allows the programmer tochange the way the graph draws itself. The parameter
displayTypemay be vPLOT, to make the graph draw the values as a plot graph, or vLINE to draw the values as a line graph.
setCDKGraphHorizontalChar-
sets the horizontal drawing character for the box to the given character.
setCDKGraphLLChar-
sets the lower left hand corner of the widget's box to the given character.
setCDKGraphLRChar-
sets the lower right hand corner of the widget's box to the given character.
setCDKGraphULChar-
sets the upper left hand corner of the widget's box to the given character.
setCDKGraphURChar-
sets the upper right hand corner of the widget's box to the given character.
setCDKGraphValue-
lets the programmer set a specific value of the graph widget.
- •
-
The parameter
valueis the new value, whileindexis the index where the new value will be stored.
- •
-
The parameter
startAtZerostates whether you want the graph to start at zero or the lowest values of the X and Y axis.
setCDKGraphValues-
lets the programmer set the specific values of the graph widget.
- •
-
The parameter
valuesis an integer array of the values to display in the widget.
- •
-
valueCountis the number of values in the array.
- •
-
The parameter
startAtZerostates whether you want the graph to start at zero or the lowest values of the X and Y axis'.
setCDKGraphVerticalChar-
sets the vertical drawing character for the box to the given character.
History
- Debian 13 (Trixie): the text shown here
- Debian 12 (Bookworm) to Debian 9 (Stretch)
- Debian 8 (Jessie) to Debian 7 (Wheezy)
- Debian 6.0 (Squeeze) to Debian 5.0 (Lenny)
- Debian 4.0 (Etch)
- Debian 3.1 (Sarge) to Debian 3.0 (Woody)