Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
cdk_histogram(3)	   Library Functions Manual	      cdk_histogram(3)

NAME
       cdk_histogram - curses histogram	widget

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

       #include	<cdk.h>

       void activateCDKHistogram (
		      CDKHISTOGRAM *histogram,
		      chtype unused);

       void destroyCDKHistogram	(
		      CDKHISTOGRAM *histogram);

       void drawCDKHistogram (
		      CDKHISTOGRAM *histogram,
		      boolean box);

       void eraseCDKHistogram (
		      CDKHISTOGRAM *histogram);

       boolean getCDKHistogramBox (
		      CDKHISTOGRAM *histogram);

       chtype getCDKHistogramFillerChar	(
		      CDKHISTOGRAM *histogram);

       int getCDKHistogramHighValue (
		      CDKHISTOGRAM *histogram);

       int getCDKHistogramLowValue (
		      CDKHISTOGRAM *histogram);

       chtype getCDKHistogramStatsAttr (
		      CDKHISTOGRAM *histogram);

       int getCDKHistogramStatsPos (
		      CDKHISTOGRAM *histogram);

       int getCDKHistogramValue	(
		      CDKHISTOGRAM *histogram);

       EHistogramDisplayType getCDKHistogramViewType (
		      CDKHISTOGRAM *histogram);

       void moveCDKHistogram (
		      CDKHISTOGRAM *histogram,
		      int xpos,
		      int ypos,
		      boolean relative,
		      boolean refresh);

       CDKHISTOGRAM *newCDKHistogram (
		      CDKSCREEN	*cdkscreen,
		      int xpos,
		      int ypos,
		      int height,
		      int width,
		      int orient,
		      const char *title,
		      boolean box,
		      boolean shadow);

       void positionCDKHistogram (
		      CDKHISTOGRAM *histogram);

       void setCDKHistogram (
		      CDKHISTOGRAM *histogram,
		      EHistogramDisplayType viewType,
		      int statsPos,
		      chtype statsAttribute,
		      int lowValue,
		      int highValue,
		      int currentValue,
		      chtype fillerCharacter,
		      boolean box);

       void setCDKHistogramBackgroundAttrib (
		      CDKHISTOGRAM *histogram,
		      chtype attribute);

       void setCDKHistogramBackgroundColor (
		      CDKHISTOGRAM *histogram,
		      const char * color);

       void setCDKHistogramBox (
		      CDKHISTOGRAM *histogram,
		      boolean box);

       void setCDKHistogramBoxAttribute	(
		      CDKHISTOGRAM *histogram,
		      chtype character);

       void setCDKHistogramDisplayType (
		      CDKHISTOGRAM *histogram,
		      EHistogramDisplayType viewtype);

       void setCDKHistogramFillerChar (
		      CDKHISTOGRAM *histogram,
		      chtype fillerCharacter);

       void setCDKHistogramHorizontalChar (
		      CDKHISTOGRAM *histogram,
		      chtype character);

       void setCDKHistogramLLChar (
		      CDKHISTOGRAM *histogram,
		      chtype character);

       void setCDKHistogramLRChar (
		      CDKHISTOGRAM *histogram,
		      chtype character);

       void setCDKHistogramStatsAttr (
		      CDKHISTOGRAM *histogram,
		      chtype statsAttribute);

       void setCDKHistogramStatsPos (
		      CDKHISTOGRAM *histogram,
		      int statsPosition);

       void setCDKHistogramULChar (
		      CDKHISTOGRAM *histogram,
		      chtype character);

       void setCDKHistogramURChar (
		      CDKHISTOGRAM *histogram,
		      chtype character);

       void setCDKHistogramValue (
		      CDKHISTOGRAM *histogram,
		      int lowValue,
		      int highValue,
		      int currentValue);

       void setCDKHistogramVerticalChar	(
		      CDKHISTOGRAM *histogram,
		      chtype character);

       void setCDKHistogramViewType (
		      CDKHISTOGRAM *histogram,
		      EHistogramDisplayType viewType);

DESCRIPTION
       The  Cdk	 histogram widget creates a histogram widget.  This widget can
       draw a vertical or horizontal histogram.	 The functions create  or  ma-
       nipulate	the Cdk	histogram box widget.

AVAILABLE FUNCTIONS
       activateCDKHistogram
	    obsolete entrypoint	which calls drawCDKHistogram.

       destroyCDKHistogram
	    removes  the  widget  from	the screen and frees memory the	object
	    used.

       drawCDKHistogram
	    draws the histogram	widget on the screen.  If the box parameter is
	    true, the widget is	drawn with a box.

       eraseCDKHistogram
	    removes  the  widget  from	the screen.  This does NOT destroy the
	    widget.

       getCDKHistogramBox
	    returns true if the	widget will be drawn with a box	around it.

       getCDKHistogramFillerChar
	    returns the	character being	used to	draw the histogram bar.

       getCDKHistogramHighValue
	    returns the	high value of the histogram.

       getCDKHistogramLowValue
	    returns the	low value of the histogram.

       getCDKHistogramStatsAttr
	    returns the	attribute of the statistics of the histogram.

       getCDKHistogramStatsPos
	    returns where the histogram	will draw the statistics.

       getCDKHistogramValue
	    returns the	current	value of the histogram.

       getCDKHistogramViewType
	    returns the	view type of the histogram widget.

       moveCDKHistogram
	    moves the given widget to the given	position.

	    o	The parameters xpos and	ypos are the new position of the  wid-
		get.

	    o	The parameter xpos may be an integer or	one of the pre-defined
		values TOP, BOTTOM, and	CENTER.

	    o	The parameter ypos can be an integer or	one of the pre-defined
		values LEFT, RIGHT, and	CENTER.

	    o	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).

	    o	The final parameter refresh is a boolean  value	 which	states
		whether	the widget will	get refreshed after the	move.

       newCDKHistogram
	    creates  a	histogram widget and returns a pointer to it.  Parame-
	    ters:

	    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.

	    title
		 is the	string which will be displayed at the top of the  wid-
		 get.	The  title  can	 be more than one line;	just provide a
		 carriage return character at the line break.

	    height and

	    width
		 control the height and	width of the widget.  If you provide a
		 value of zero for either of the height	or the width, the wid-
		 get 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.

	    orient
		 specifies the orientation of the histogram.   It  is  one  of
		 these pre-defined values: VERTICAL and	HORIZONTAL.

	    label
		 is the	string to use as the label of the histogram.

	    box	 is true if the	widget should be drawn with a box around it.

	    shadow
		 turns the shadow on or	off around this	widget.

	    If	the  widget  could  not	 be created then a NULL	pointer	is re-
	    turned.

       positionCDKHistogram
	    allows the user to move the	widget around the screen via the  cur-
	    sor/keypad keys.  See cdk_position (3) for key bindings.

       setCDKHistogram
	    lets  the programmer set the specific values of the	histogram wid-
	    get.

	    o	The parameter viewType specifies  the  type  of	 histogram  to
		draw.	The following table lists the valid values and the re-
		sults.

		    +----------------+--------------------------------+
		    |Display_Type    | Result			      |
		    +----------------+--------------------------------+
		    |vNONE	     | Displays	no information	about |
		    |		     | the current values.	      |
		    +----------------+--------------------------------+
		    |vPERCENT	     | Displays	 the current value as |
		    |		     | a percentage.		      |
		    +----------------+--------------------------------+
		    |vFRACTION	     | Displays	the current value  as |
		    |		     | a fraction.		      |
		    +----------------+--------------------------------+
		    |vREAL	     | Displays	the current value.    |
		    +----------------+--------------------------------+

	    o	The  statsPosition  parameter states where the statistics will
		be displayed.  It accepts TOP, BOTTOM, and CENTER.

	    o	The parameter statsAttribute sets the attributes of  the  sta-
		tistics.

	    o	The  parameters	 lowValue, highValue, and currentValue are the
		low, high, and current values respectively.

	    o	The filler character is	the character to  use  in  the	unused
		space in the histogram.

	    o	If the box parameter is	true, the widget is drawn with a box.

       setCDKHistogramBackgroundAttrib
	    the	 background  color attribute the widget.  The parameter	attri-
	    bute is a curses attribute,	e.g., A_BOLD.

       setCDKHistogramBackgroundColor
	    the	background color of the	widget.	 The parameter color is	in the
	    format of the Cdk format strings.  See cdk_display (3).

       setCDKHistogramBox
	    sets whether the widget will be drawn with a box around it.

       setCDKHistogramBoxAttribute
	    sets the attribute of the box.

       setCDKHistogramDisplayType
	    sets the display type (see getCDKHistogramViewType).

       setCDKHistogramFillerChar
	    sets the character to use when drawing the histogram bar.

       setCDKHistogramHorizontalChar
	    sets  the  horizontal  drawing  character for the box to the given
	    character.

       setCDKHistogramLLChar
	    sets the lower left	hand corner of the widget's box	to  the	 given
	    character.

       setCDKHistogramLRChar
	    sets  the lower right hand corner of the widget's box to the given
	    character.

       setCDKHistogramStatsAttr
	    sets the attribute to use when drawing the histogram statistics.

       setCDKHistogramStatsPos
	    sets where the statistics will be drawn on the  widget.   See  the
	    setCDKHistogram description	for more details.

       setCDKHistogramULChar
	    sets  the  upper left hand corner of the widget's box to the given
	    character.

       setCDKHistogramURChar
	    sets the upper right hand corner of	the widget's box to the	 given
	    character.

       setCDKHistogramValue
	    sets the low, high,	and current value of the histogram.

       setCDKHistogramVerticalChar
	    sets the vertical drawing character	for the	box to the given char-
	    acter.

       setCDKHistogramViewType
	    sets the view type of the histogram.  Look at the  setCDKHistogram
	    description	for more details.

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

							      cdk_histogram(3)

NAME | SYNOPSIS | DESCRIPTION | AVAILABLE FUNCTIONS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=cdk_histogram&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help