cc [ flag ... ] file ... -lcdk [ library ... ]
#include <cdk.h>
Cdk provides functions to use a large number of predefined curses widgets. To use the Cdk widgets the header file cdk.h must be included in the source.
The widgets available from Cdk are listed below.
| Widget Type | Manual Page Name |
| Alphalist | cdk_alphalist (3) |
| Button | cdk_button (3) |
| Buttonbox | cdk_buttonbox (3) |
| Calendar | cdk_calendar (3) |
| Dialog | cdk_dialog (3) |
| DoubleFloat Scale | cdk_dscale (3) |
| Entry Field | cdk_entry (3) |
| File Selector | cdk_fselect (3) |
| File Viewer | cdk_viewer (3) |
| Floating Scale | cdk_fscale (3) |
| Floating Slider | cdk_fslider (3) |
| Graph | cdk_graph (3) |
| Histogram | cdk_histogram (3) |
| Integer Scale | cdk_scale (3) |
| Integer Slider | cdk_slider (3) |
| Item List | cdk_itemlist (3) |
| Label | cdk_label (3) |
| Marquee | cdk_marquee (3) |
| Matrix | cdk_matrix (3) |
| Multiple Line Entry Field | cdk_mentry (3) |
| Pulldown Menu | cdk_menu (3) |
| Radio List | cdk_radio (3) |
| Scrolling List | cdk_scroll (3) |
| Scrolling Selection List | cdk_selection (3) |
| Scrolling Window | cdk_swindow (3) |
| Template | cdk_template (3) |
| Unsigned Scale | cdk_uscale (3) |
| Unsigned Slider | cdk_uslider (3) |
The rest of the manual pages describe supporting functions:
| Manual Page Name | Description |
| cdk_binding (3) |
Outlines how to create user definable key bindings.
|
| cdk_display (3) |
Shows how to add special display attributes,
colors, and justification into a widget.
|
| cdk_draw (3) |
Outlines functions used for drawing text and lines.
|
| cdk_screen (3) |
Demonstrates the use of screens within Cdk.
|
| cdk_misc (3) |
Outlines miscellaneous functions provided with the Cdk library.
|
| cdk_process (3) |
Demonstrates the use of the pre- and post-process function class.
|
| Value | Meaning |
| vNORMAL |
This means the widget exited normally.
This value is set when the widget is given the characters TAB or RETURN.
|
| vEARLY_EXIT |
This means the widget exited early.
This value is set when characters such as
TAB or RETURN are injected into the
widget via the injectCDKXXX function and the
character injected does not exit the widget.
|
| vESCAPE_HIT |
This value states the user hit ESCAPE to leave the widget.
|
| vNEVER_ACTIVATED |
This is the initial state of the value.
This means that the widget has not been activated.
|
The header file <cdk.h> automatically includes the header files <curses.h>, <stdlib.h>, <string.h>, <ctype.h>, <unistd.h>, <dirent.h>, <time.h>, <errno.h>, <pwd.h>, <grp.h>, <sys/stat.h>, and <sys/types.h>. The <curses.h> header file includes <stdio.h> and <unctrl.h>.