1Cdk(3)                     Library Functions Manual                     Cdk(3)
2
3
4

NAME

6       cdk - Curses Development Kit
7

SYNOPSIS

9       cc [ flag ... ] file ...  -lcdk [ library ... ]
10
11       #include <cdk.h>
12
13       Cdk  provides functions to use a large number of predefined curses wid‐
14       gets.  To use the Cdk widgets the header file cdk.h must be included in
15       the source.
16
17       The widgets available from Cdk are listed below.
18
19                    Widget Type                 Manual Page Name
20                    ──────────────────────────────────────────────
21                    Alphalist                   cdk_alphalist (3)
22                    Button                      cdk_button (3)
23                    Buttonbox                   cdk_buttonbox (3)
24                    Calendar                    cdk_calendar (3)
25                    Dialog                      cdk_dialog (3)
26                    DoubleFloat Scale           cdk_dscale (3)
27                    Entry Field                 cdk_entry (3)
28                    File Selector               cdk_fselect (3)
29                    File Viewer                 cdk_viewer (3)
30                    Floating Scale              cdk_fscale (3)
31                    Floating Slider             cdk_fslider (3)
32                    Graph                       cdk_graph (3)
33                    Histogram                   cdk_histogram (3)
34                    Integer Scale               cdk_scale (3)
35                    Integer Slider              cdk_slider (3)
36                    Item List                   cdk_itemlist (3)
37                    Label                       cdk_label (3)
38                    Marquee                     cdk_marquee (3)
39                    Matrix                      cdk_matrix (3)
40                    Multiple Line Entry Field   cdk_mentry (3)
41                    Pulldown Menu               cdk_menu (3)
42                    Radio List                  cdk_radio (3)
43                    Scrolling List              cdk_scroll (3)
44                    Scrolling Selection List    cdk_selection (3)
45                    Scrolling Window            cdk_swindow (3)
46                    Template                    cdk_template (3)
47                    Unsigned Scale              cdk_uscale (3)
48                    Unsigned Slider             cdk_uslider (3)
49
50       The rest of the manual pages describe supporting functions:
51
52              Manual Page Name     Description
53              ─────────────────────────────────────────────────────────
54              cdk_binding (3)      Outlines  how to create user defin‐
55                                   able key bindings.
56              cdk_display (3)      Shows how to  add  special  display
57                                   attributes,  colors, and justifica‐
58                                   tion into a widget.
59              cdk_draw (3)         Outlines functions used for drawing
60                                   text and lines.
61              cdk_screen (3)       Demonstrates  the  use  of  screens
62                                   within Cdk.
63              cdk_misc (3)         Outlines  miscellaneous   functions
64                                   provided with the Cdk library.
65
66
67              cdk_process (3)      Demonstrates  the  use  of the pre-
68                                   and post-process function class.
69

DESCRIPTION

71       Cdk is a library of functions which allow a programmer to quickly  cre‐
72       ate  a full screen interactive program with ease.  The Cdk widgets sup‐
73       port the following features:
74
75       · Ncurses library.
76            Instead of using the standard curses library, Cdk can take  advan‐
77            tage  of  the  colors that Ncurses provides.  To learn how to take
78            advantage of Cdk's color capabilities, see cdk_display (3).
79
80       · Key Bindings.
81            Individual keys can be overridden with a callback.   The  callback
82            is  set  up using the bindCDKObject function.  To learn more about
83            this see cdk_binding (3).
84
85       · Pre and Post Processing.
86            Certain widgets allow the user to  trap  a  character  before  and
87            after  the  character has been applied to the widget.  This allows
88            programmers to `filter' character input.  To learn more about this
89            see cdk_process (3).
90
91       · Self Test Widgets.
92            With  the  use of the inject function class and the activate func‐
93            tion, programmers can have  the  widgets  test  themselves.   This
94            allows  the  programmer to perform automated tests on a final pro‐
95            gram.
96
97       · Special Display Formats
98            There are special character format commands that can  be  inserted
99            into  any  string  in  Cdk  and  the contents will get mapped to a
100            chtype (see the curses manual  page)  with  character  attributes.
101            This  allows the programmer to insert format types on each charac‐
102            ter if they wish.
103
104       · The Ability To Build Predefined Screens
105            Widgets can be associated to any given screen.  If there  is  more
106            than  one  screen defined, then Cdk has the ability to "flip" from
107            one screen to another with ease.  See the cdk_screen  manual  page
108            for more details.
109

STANDARD WIDGET BEHAVIOR

111       All  of  the  widgets  have  a member of the structure called exitType.
112       This member states how the widget exited.  There are  three  values  in
113       which to check for, they are as follows:
114
115              ┌─────────────────┬─────────────────────────────────────┐
116Value            Meaning                             
117              ├─────────────────┼─────────────────────────────────────┤
118              ├─────────────────┼─────────────────────────────────────┤
119              │vNORMAL          │ This  means  the widget exited nor‐ │
120              │                 │ mally.  This value is set when  the │
121              │                 │ widget  is given the characters TAB │
122              │                 │ or RETURN.                          │
123              ├─────────────────┼─────────────────────────────────────┤
124              │vEARLY_EXIT      │ This means the widget exited early. │
125              │                 │ This  value  is set when characters │
126              │                 │ such as TAB or RETURN are  injected │
127              │                 │ into  the  widget via the injectCD‐ │
128              │                 │ KXXX  function  and  the  character │
129              │                 │ injected does not exit the widget.  │
130              ├─────────────────┼─────────────────────────────────────┤
131              │vESCAPE_HIT      │ This  value  states  the  user  hit │
132              │                 │ ESCAPE to leave the widget.         │
133              ├─────────────────┼─────────────────────────────────────┤
134              │vNEVER_ACTIVATED │ This is the initial  state  of  the │
135              │                 │ value.   This means that the widget │
136              │                 │ has not been activated.             │
137              └─────────────────┴─────────────────────────────────────┘

SEE ALSO

139       cdk(3),  cdk_binding(3),  cdk_display(3),   cdk_draw(3),   cdk_misc(3),
140       cdk_process(3), cdk_screen(3)
141

NOTES

143       The  header  file  <cdk.h>  automatically  includes  the  header  files
144       <curses.h>, <stdlib.h>, <string.h>, <ctype.h>, <unistd.h>,  <dirent.h>,
145       <time.h>, <errno.h>, <pwd.h>, <grp.h>, <sys/stat.h>, and <sys/types.h>.
146       The <curses.h> header file includes <stdio.h> and <unctrl.h>.
147
148
149
150                                                                        Cdk(3)
Impressum