~cfuhrman/+junk/netbsd-othersrc-trunk

« back to all changes in this revision

Viewing changes to dist/cdk/man/cdk_entry.3

  • Committer: garbled
  • Date: 2001-01-04 19:59:48 UTC
  • Revision ID: svn-v4:288d5a72-fed7-e111-8680-000c29dcf8fe:trunk:174
Initial import of CDK 4.9.9.  The work to port this was performed by
Charles Hannum, and that is the version being imported:
cdk-4.9.9-20000407-myc3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.de It
 
2
.br
 
3
.ie \\n(.$>=3 .ne \\$3
 
4
.el .ne 3
 
5
.IP "\\$1" \\$2
 
6
..
 
7
.TH cdk_entry 3X "24 April 1997"
 
8
.SH NAME
 
9
newCDKEntry, activateCDKEntry, injectCDKEntry, setCDKEntry, 
 
10
setCDKEntryValue, getCDKEntryValue,
 
11
setCDKEntryMax, getCDKEntryMax,
 
12
setCDKEntryMin, getCDKEntryMin,
 
13
setCDKEntryFillerChar, getCDKEntryFillerChar,
 
14
setCDKEntryHiddenChar, getCDKEntryHiddenChar,
 
15
setCDKEntryBox, getCDKEntryBox,
 
16
setCDKEntryULChar, setCDKEntryURChar,
 
17
setCDKEntryLLChar, setCDKEntryLRChar,
 
18
setCDKEntryVerticalChar, setCDKEntryHorizontalChar,
 
19
setCDKEntryBoxAttribute,
 
20
setCDKEntryBackgroundColor,
 
21
setCDKEntryCB, drawCDKEntry, eraseCDKEntry, cleanCDKEntry, destroyCDKEntry, 
 
22
setCDKEntryPreProcess, setCDKEntryPostProcess \- Creates a managed curses 
 
23
entry widget.
 
24
.SH SYNOPSIS
 
25
.LP
 
26
.B cc
 
27
.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
 
28
.B \-lcdk
 
29
.RI "[ " "library" " \|.\|.\|. ]"
 
30
.LP
 
31
#include <cdk.h>
 
32
.LP
 
33
.BI "CDKENTRY *newCDKEntry (CDKSCREEN *" "cdkscreen",
 
34
.BI "int " "xpos",
 
35
.BI "int " "ypos",
 
36
.BI "char *" "title",
 
37
.BI "char *" "label",
 
38
.BI "chtype " "fieldAttribute",
 
39
.BI "chtype " "fillerCharacter",
 
40
.BI "EDisplayType " "displayType",
 
41
.BI "int " "fieldWidth",
 
42
.BI "int " "minimumLength",
 
43
.BI "int " "maximumLength",
 
44
.BI "boolean " "box",
 
45
.BI "boolean " "shadow");
 
46
.LP
 
47
.BI "char *activateCDKEntry (CDKENTRY *" "entry",
 
48
.BI "chtype *" "actions");
 
49
.LP
 
50
.BI "int injectCDKEntry (CDKENTRY *" "entry",
 
51
.BI "chtype " "input");
 
52
.LP
 
53
.BI "void setCDKEntry (CDKENTRY *" "entry",
 
54
.BI "char *" "value",
 
55
.BI "int " "minimumLength",
 
56
.BI "int " "maximumLength",
 
57
.BI "boolean " "box");
 
58
.LP
 
59
.BI "void setCDKEntryValue (CDKENTRY *" "entry",
 
60
.BI "char *" "value");
 
61
.LP
 
62
.BI "char *getCDKEntryValue (CDKENTRY *" "entry");
 
63
.LP
 
64
.BI "void setCDKEntryMax (CDKENTRY *" "entry",
 
65
.BI "int " "maximum");
 
66
.LP
 
67
.BI "int getCDKEntryMax (CDKENTRY *" "entry");
 
68
.LP
 
69
.BI "void setCDKEntryMin (CDKENTRY *" "entry",
 
70
.BI "int " "minimum");
 
71
.LP
 
72
.BI "int getCDKEntryMin (CDKENTRY *" "entry");
 
73
.LP
 
74
.BI "void setCDKEntryBox (CDKENTRY *" "entry",
 
75
.BI "boolean " "box");
 
76
.LP
 
77
.BI "void setCDKEntryFillerChar (CDKENTRY *" "entry",
 
78
.BI "chtype " "character");
 
79
.LP
 
80
.BI "chtype getCDKEntryFillerChar *CDKENTRY *" "entry");
 
81
.LP
 
82
.BI "void setCDKEntryHiddenChar (CDKENTRY *" "entry",
 
83
.BI "chtype " "character");
 
84
.LP
 
85
.BI "chtype getCDKEntryHiddenChar *CDKENTRY *" "entry");
 
86
.LP
 
87
.BI "boolean getCDKEntryBox (CDKENTRY *" "entry");
 
88
.LP
 
89
.BI "void setCDKEntryBox (CDKENTRY *" "entry",
 
90
.BI "boolean " "box");
 
91
.LP
 
92
.BI "boolean getCDKEntryBox (CDKENTRY *" "entry");
 
93
.LP
 
94
.BI "void setCDKEntryULChar (CDKENTRY *", "entry",
 
95
.BI "chtype " "character");
 
96
.LP
 
97
.BI "void setCDKEntryURChar (CDKENTRY *", "entry",
 
98
.BI "chtype " "character");
 
99
.LP
 
100
.BI "void setCDKEntryLLChar (CDKENTRY *", "entry",
 
101
.BI "chtype " "character");
 
102
.LP
 
103
.BI "void setCDKEntryLRChar (CDKENTRY *", "entry",
 
104
.BI "chtype " "character");
 
105
.LP
 
106
.BI "void setCDKEntryVerticalChar (CDKENTRY *", "entry",
 
107
.BI "chtype " "character");
 
108
.LP
 
109
.BI "void setCDKEntryHorizontalChar (CDKENTRY *", "entry",
 
110
.BI "chtype " "character");
 
111
.LP
 
112
.BI "void setCDKEntryBoxAttribute (CDKENTRY *", "entry",
 
113
.BI "chtype " "character");
 
114
.LP
 
115
.BI "void setCDKEntryBackgroundColor (CDKENTRY *", "entry",
 
116
.BI "char * " "color");
 
117
.LP
 
118
.BI "void setCDKEntryCB (CDKENTRY *" "entry",
 
119
.BI "ENTRYCB " "callBackFunction");
 
120
.LP
 
121
.BI "void moveCDKEntry (CDKENTRY *" "entry",
 
122
.BI "int " "box",
 
123
.BI "int " "box",
 
124
.BI "boolean " "relative",
 
125
.BI "boolean " "refresh");
 
126
.LP
 
127
.BI "void positionCDKEntry (CDKENTRY *" "entry");
 
128
.LP
 
129
.BI "void drawCDKEntry (CDKENTRY *" "entry",
 
130
.BI "boolean " "box");
 
131
.LP
 
132
.BI "void eraseCDKEntry (CDKENTRY *" "entry");
 
133
.LP
 
134
.BI "void cleanCDKEntry (CDKENTRY *" "entry");
 
135
.LP
 
136
.BI "void destroyCDKEntry (CDKENTRY *" "entry");
 
137
.LP
 
138
.BI "void setCDKEntryPreProcess (CDKENTRY *" "entry",
 
139
.BI "PROCESSFN " "callback",
 
140
.BI "void * " "data");
 
141
.LP
 
142
.BI "void setCDKEntryPostProcess (CDKENTRY *" "entry",
 
143
.BI "PROCESSFN " "callback",
 
144
.BI "void * " "data");
 
145
.LP
 
146
.BI "void bindCDKObject (EObjectType " "widgetType",
 
147
.BI "void *" "object",
 
148
.BI "chtype" "key",
 
149
.BI "BINDFN" "function",
 
150
.BI "void *" "data");
 
151
.SH DESCRIPTION
 
152
The Cdk entry widget creates an entry box with a label and an entry field. The 
 
153
following are functions which create or manipulate the Cdk entry box widget.
 
154
 
 
155
.SH AVAILABLE FUNCTIONS
 
156
CDKENTRY *newCDKEntry (CDKSCREEN *\f2screen\f1, int \f2xpos\f1, int \f2ypos\f1, char *\f2title\f1, char *\f2label\f1, chtype \f2fieldAttribute\f1, chtype \f2fillerCharacter\f1, EDisplayType \f2displayType\f1, int \f2fieldWidth\f1, int \f2minimumLength\f1, int \f2maximumLength\f1, boolean \f2box\f1, boolean \f2shadow\f1);
 
157
.RS 3
 
158
This function creates a pointer to an entry widget. The \f2screen\f1 parameter
 
159
is the screen you wish this widget to be placed in. The parameter \f2xpos\f1
 
160
controls the placement of the object along the horizontal axis. This parameter
 
161
can accept an integer value or one of the pre-defined values of \f4LEFT\f1,
 
162
\f4RIGHT\f1, and \f4CENTER\f1. The parameter \f2ypos\f1 controls the placement
 
163
of the object along the vertical axis. This parameter can accept an integer 
 
164
value or one of the pre-defined values of \f4TOP\f1, \f4BOTTOM\f1, and \f4CENTER\f1.
 
165
The \f2title\f1 parameter is the string which will be displayed at the top of 
 
166
the widget. The title can be more than one line; just provide a carriage 
 
167
return character at the line break. The \f2label\f1 parameter is the string which 
 
168
will be displayed in the label of the entry field. The \f2fieldAttribute\f1 is 
 
169
the attribute of the characters to be displayed when they are typed in. 
 
170
\f2filler\f1 is the character which is to be displayed in an empty space in 
 
171
the entry field. The parameter \f2displayType\f1 tells how the entry field 
 
172
will behave when a character is entered into the field. The following table 
 
173
outlines valid values for this field and what they mean:
 
174
.LP
 
175
.RS 6
 
176
.nf 
 
177
\f2Display_Type      Meaning\f1
 
178
vCHAR             Only accepts alphabetic characters.
 
179
vLCHAR            Only accepts alphabetic characters.
 
180
                  Maps the character to lower case
 
181
                  when a character has been accepted.
 
182
vUCHAR            Only accepts alphabetic characters.
 
183
                  Maps the character to upper case
 
184
                  when a character has been accepted.
 
185
vHCHAR            Only accepts alphabetic characters.
 
186
                  Displays a \f4.\f1 when a character
 
187
                  has been accepted.
 
188
vUHCHAR           Only accepts alphabetic characters.
 
189
                  Displays a \f4.\f1 and maps the
 
190
                  character to upper case when a
 
191
                  character has been accepted.
 
192
vLHCHAR           Only accepts alphabetic characters.
 
193
                  Displays a \f4.\f1 and maps the
 
194
                  character to lower case when a
 
195
                  character has been accepted.
 
196
vINT              Only accepts numeric characters.
 
197
vHINT             Only accepts numeric characters.
 
198
                  Displays a \f4.\f1 when a character
 
199
                  has been accepted.
 
200
vMIXED            Accepts any character types.
 
201
vLMIXED           Accepts any character types.
 
202
                  Maps the character to lower case
 
203
                  when an alphabetic character has
 
204
                  been accepted.
 
205
vUMIXED           Accepts any character types.
 
206
                  Maps the character to upper case
 
207
                  when an alphabetic character has
 
208
                  been accepted.
 
209
vHMIXED           Accepts any character types.
 
210
                  Displays a \f4.\f1 when a character
 
211
                  has been accepted.
 
212
vLHMIXED          Accepts any character types.
 
213
                  Displays a \f4.\f1 and maps the
 
214
                  character to lower case when a
 
215
                  character has been accepted.
 
216
vUHMIXED          Accepts any character types.
 
217
                  Displays a \f4.\f1 and maps the
 
218
                  character to upper case when a
 
219
                  character has been accepted.
 
220
vVIEWONLY         Uneditable field.
 
221
.fi
 
222
.RE
 
223
.RS 3
 
224
.LP
 
225
The \f2fieldWidth\f1 parameter states how wide the field will be. If a value
 
226
of zero is provided, the field will be made as wide as possible on the 
 
227
screen. If a negative value is given, then the field width will be the
 
228
maximum width minus the value provided. The parameter \f2minimumLength\f1 
 
229
states how many characters have to be entered before the user can exit the 
 
230
entry field. The \f2maximumLength\f1 parameter sets the maximum number of 
 
231
characters that can be entered. The \f2box\f1 parameter states whether the 
 
232
widget will be drawn with a box around it or not. The \f2shadow\f1 parameter 
 
233
accepts a boolean value to turn the shadow on or off around this widget. If 
 
234
the widget could not be created then a \f4NULL\f1 pointer is returned.
 
235
.RE
 
236
 
 
237
char *activateCDKEntry (CDKENTRY *\f2entry\f1, chtype *\f2actions\f1);
 
238
.RS 3
 
239
This function activates the entry widget and lets the user interact with the
 
240
widget. The parameter \f2entry\f1 is a pointer to a non-NULL entry widget.
 
241
If the \f2actions\f1 parameter is passed with a non-NULL value, the characters
 
242
in the array will be injected into the widget. To activate the widget
 
243
interactively pass in a \f4NULL\f1 pointer for \f2actions\f1. If the character entered
 
244
into this widget is \f4RETURN\f1 or \f4TAB\f1 then this function will return 
 
245
a \f4char *\f1 representing the information typed into the widget and the 
 
246
structure member \f4exitType\f1 will be set to \f4vNORMAL\f1. If the character
 
247
entered was \f4ESCAPE\f1 then the function will returns \f4NULL\f1 pointer and 
 
248
the structure member \f4exitType\f1 is set to \f4vESCAPE_HIT\f1.
 
249
.RE
 
250
 
 
251
char *injectCDKEntry (CDKENTRY *\f2entry\f1, chtype \f2character\f1);
 
252
.RS 3
 
253
This function injects a single character into the widget. The parameter 
 
254
\f2entry\f1 is a pointer to a non-NULL entry. The parameter 
 
255
\f2character\f1 is the character to inject into the widget. If the character 
 
256
injected into this widget was \f4RETURN\f1 or \f4TAB\f1 then this function will
 
257
return a \f4char *\f1 representing the information typed into the widget and the 
 
258
structure member \f4exitType\f1 will be set to \f4vNORMAL\f1. If the character
 
259
entered was \f4ESCAPE\f1 then the function will returns \f4NULL\f1 pointer and 
 
260
the structure member \f4exitType\f1 is set to \f4vESCAPE_HIT\f1. Any other 
 
261
character injected into the widget will set the structure member \f4exitType\f1 
 
262
to \f4vEARLY_EXIT\f1 and the function will return a \f4NULL\f1 pointer.
 
263
.RE
 
264
 
 
265
void setCDKEntry (CDKENTRY *\f2entry\f1, char *\f2value\f1, int \f2minimumLength\f1, int \f2maximumLength\f1, boolean \f2box\f1);
 
266
.RS 3
 
267
This function lets the programmer modify certain elements of an already defined
 
268
entry widget. The \f2value\f1 parameter sets the value of the contents of the
 
269
entry field. The other parameter names correspond to the same parameter names
 
270
listed in the \f4newCDKEntry\f1 function.
 
271
.RE 
 
272
 
 
273
void setCDKEntryValue (CDKENTRY *\f2entry\f1, char *\f2value\f1);
 
274
.RS 3
 
275
This sets the current value of the widget.
 
276
.RE
 
277
 
 
278
char *getCDKEntryValue (CDKENTRY *\f2entry\f1);
 
279
.RS 3
 
280
This returns the current value of the widget.
 
281
.RE
 
282
 
 
283
void setCDKEntryMax (CDKENTRY *\f2entry\f1, int \f2maximum\f1);
 
284
.RS 3
 
285
This sets the maximum length of the string that the widget will allow.
 
286
.RE
 
287
 
 
288
int getCDKEntryMax (CDKENTRY *\f2entry\f1);
 
289
.RS 3
 
290
This returns the maximum length of a string the widget will allow.
 
291
.RE
 
292
 
 
293
void setCDKEntryMin (CDKENTRY *\f2entry\f1, int \f2maximum\f1);
 
294
.RS 3
 
295
This sets the minimum length of the string that the widget will allow.
 
296
.RE
 
297
 
 
298
int getCDKEntryMin (CDKENTRY *\f2entry\f1);
 
299
.RS 3
 
300
This returns the minimum length of a string the widget will allow.
 
301
.RE
 
302
 
 
303
void setCDKEntryFillerChar (CDKENTRY *\f2entry\f1, chtype \f2filler\f1);
 
304
.RS 3
 
305
This sets the character to use when drawing unused space in the field.
 
306
.RE
 
307
 
 
308
chtype getCDKEntryFillerChar (CDKENTRY *\f2entry\f1);
 
309
.RS 3
 
310
This returns the character being used to draw unused space in the widget.
 
311
.RE
 
312
 
 
313
void setCDKEntryHiddenChar (CDKENTRY *\f2entry\f1, chtype \f2character\f1);
 
314
.RS 3
 
315
This sets the character to use when using a hidden character type.
 
316
.RE
 
317
 
 
318
chtype getCDKEntryHiddenChar (CDKENTRY *\f2entry\f1);
 
319
.RS 3
 
320
This returns the character being used to draw the hidden character type.
 
321
.RE
 
322
 
 
323
void setCDKEntryBox (CDKENTRY *\f2entry\f1, boolean \f2boxWidget\f1);
 
324
.RS 3
 
325
This sets whether or not the widget will be draw with a box around it.
 
326
.RE
 
327
 
 
328
boolean getCDKEntryBox (CDKENTRY *\f2entry\f1);
 
329
.RS 3
 
330
This returns whether or not the widget will be drawn with a box around it.
 
331
.RE
 
332
 
 
333
void setCDKEntryULChar (CDKENTRY *\f2entry\f1, chtype \f2character\f1);
 
334
.RS 3
 
335
This function sets the upper left hand corner of the widgets box to
 
336
the given character.
 
337
.RE
 
338
 
 
339
void setCDKEntryURChar (CDKENTRY *\f2entry\f1, chtype \f2character\f1);
 
340
.RS 3
 
341
This function sets the upper right hand corner of the widgets box to
 
342
the given character.
 
343
.RE
 
344
 
 
345
void setCDKEntryLLChar (CDKENTRY *\f2entry\f1, chtype \f2character\f1);
 
346
.RS 3
 
347
This function sets the lower left hand corner of the widgets box to
 
348
the given character.
 
349
.RE
 
350
 
 
351
void setCDKEntryLRChar (CDKENTRY *\f2entry\f1, chtype \f2character\f1);
 
352
.RS 3
 
353
This function sets the lower right hand corner of the widgets box to
 
354
the given character.
 
355
.RE
 
356
 
 
357
void setCDKEntryVerticalChar (CDKENTRY *\f2entry\f1, chtype \f2character\f1);
 
358
.RS 3
 
359
This function sets the vertical drawing character for the box to
 
360
the given character.
 
361
.RE
 
362
 
 
363
void setCDKEntryHorizontalChar (CDKENTRY *\f2entry\f1, chtype \f2character\f1);
 
364
.RS 3
 
365
This function sets the horizontal drawing character for the box to
 
366
the given character.
 
367
.RE
 
368
 
 
369
void setCDKEntryBoxAttribute (CDKENTRY *\f2entry\f1, chtype \f2attribute\f1);
 
370
.RS 3
 
371
This function sets the attribute of the box.
 
372
.RE
 
373
 
 
374
void setCDKEntryBackgroundColor (CDKENTRY *\f2entry\f1, char *\f2color\f1);
 
375
.RS 3
 
376
This sets the background color of the widget. The parameter \f2color\f1
 
377
is in the format of the Cdk format strings. To get more information look
 
378
at the \f4cdk_display\f1 manual page.
 
379
.RE
 
380
 
 
381
void setCDKEntryCB (CDKENTRY *\f2entry\f1, ENTRYCB \f2callbackFunction\f1);
 
382
.RS 3
 
383
This function allows the programmer to set a different widget input handler.
 
384
The parameter \f2callbackFunction\f1 is of type \f4ENTRYCB\f1. The current 
 
385
default function is \f4CDKEntryCallBack\f1.
 
386
.RE
 
387
 
 
388
void moveCDKEntry (CDKENTRY *\f2entry\f1, int \f2xpos\f1, int \f2ypos\f1, boolean \f2relative\f1, boolean \f2refresh\f1);
 
389
.RS 3
 
390
This function moves the given widget to the given position. The parameters
 
391
\f2xpos\f1 and \f2ypos\f1 is the new position of the widget. The parameter
 
392
\f2xpos\f1 can accept an integer value or one of the pre-defined values of
 
393
\f4TOP\f1, \f4BOTTOM\f1, and \f4CENTER\f1. The parameter \f2ypos\f1 can 
 
394
accept an integer value or one of the pre-defined values of \f4LEFT\f1,
 
395
\f4RIGHT\f1, and \f4CENTER\f1. The parameter \f2relative\f1 states whether
 
396
the \f2xpos\f1/\f2ypos\f1 pair is a relative move or an absolute move. For
 
397
example if \f2xpos\f1 = 1 and \f2ypos\f1 = 2 and \f2relative\f1 = \f2TRUE\f1,
 
398
then the widget would move one row down and two columns right. If the value
 
399
of \f2relative\f1 was \f2FALSE\f1 then the widget would move to the position
 
400
(1,2). Do not use the values of \f4TOP\f1, \f4BOTTOM\f1, \f4LEFT\f1, 
 
401
\f4RIGHT\f1, or \f4CENTER\f1 when \f2relative\f1 = \f4TRUE\f1. (wierd things 
 
402
may happen). The final parameter \f2refresh\f1 is a boolean value which states
 
403
whether the widget will get refreshed after the move or not.
 
404
.RE
 
405
 
 
406
void positionCDKEntry (CDKENTRY *\f2entry\f1);
 
407
.RS 3
 
408
This function allows the user to move the widget around the screen via the
 
409
cursor/keypad keys. The following key bindings can be used to move the
 
410
widget around the screen.
 
411
.LP
 
412
.nf
 
413
\f4Key Bindings\f1
 
414
.RS 3
 
415
\f2Key          Action\f1
 
416
Up Arrow     Moves the widget up one line.
 
417
Down Arrow   Moves the widget down one line.
 
418
Left Arrow   Moves the widget left one column
 
419
Right Arrow  Moves the widget right one column
 
420
Keypad-1     Moves the widget down one line
 
421
             and left one column.
 
422
Keypad-2     Moves the widget down one line.
 
423
Keypad-3     Moves the widget down one line
 
424
             and right one column.
 
425
Keypad-4     Moves the widget left one column
 
426
Keypad-5     Centers the widget both vertically
 
427
             and horizontally.
 
428
Keypad-6     Moves the widget right one column
 
429
Keypad-7     Moves the widget up one line
 
430
             and left one column.
 
431
Keypad-8     Moves the widget up one line.
 
432
Keypad-9     Moves the widget up one line
 
433
             and right one column.
 
434
t            Moves the widget to the top of the screen.
 
435
b            Moves the widget to the bottom of the screen.
 
436
l            Moves the widget to the left of the screen.
 
437
r            Moves the widget to the right of the screen.
 
438
c            Centers the widget between the left and 
 
439
             right of the window.
 
440
C            Centers the widget between the top and 
 
441
             bottom of the window.
 
442
Escape       Returns the widget to it's original position.
 
443
Return       Exits the function and leaves the widget
 
444
             where it was.
 
445
.fi
 
446
.RE
 
447
.RS 3
 
448
.LP
 
449
Keypad means that if the keyboard you are using has a keypad, then the
 
450
Num-Lock light has to be on in order to use the keys as listed. (The
 
451
numeric keys at the top of the keyboard will work as well.)
 
452
.LP
 
453
void drawCDKEntry (CDKENTRY *\f2entry\f1, boolean \f2box\f1);
 
454
.RS 3
 
455
This function draws the entry widget on the screen. The \f2box\f1 option 
 
456
draws the widget with or without a box.
 
457
.RE
 
458
 
 
459
void eraseCDKEntry (CDKENTRY *\f2entry\f1);
 
460
.RS 3
 
461
This function removes the widget from the screen. This does \f4NOT\f1 destroy
 
462
the widget.
 
463
.RE
 
464
 
 
465
void cleanCDKEntry (CDKENTRY *\f2entry\f1);
 
466
.RS 3
 
467
This function clears the information from the field.
 
468
.RE
 
469
 
 
470
void destroyCDKEntry (CDKENTRY *\f2entry\f1);
 
471
.RS 3
 
472
This function removes the widget from the screen and frees up any memory the
 
473
object may be using.
 
474
.RE
 
475
 
 
476
void setCDKEntryPreProcess (CDKENTRY *\f2entry\f1, PROCESSFN \f2function\f1, void *\f2data\f1);
 
477
.RS 3
 
478
This function allows the user to have the widget call a function after a key
 
479
is hit and before the key is applied to the widget. The parameter \f2function\f1
 
480
if of type \f4PROCESSFN\f1. The parameter \f2data\f1 is a pointer to 
 
481
\f4void\f1. To learn more about pre-processing read the \f4cdk_process\f1
 
482
manual page.
 
483
.RE
 
484
 
 
485
void setCDKEntryPostProcess (CDKENTRY *\f2entry\f1, PROCESSFN \f2function\f1, void *\f2data\f1);
 
486
.RS 3
 
487
This function allows the user to have the widget call a function after the
 
488
key has been applied to the widget.  The parameter \f2function\f1 if of type
 
489
\f4PROCESSFN\f1. The parameter \f2data\f1 is a pointer to \f4void\f1. To
 
490
learn more about post-processing read the \f4cdk_process\f1 manual page.
 
491
.RE
 
492
 
 
493
void bindCDKObject (EObjectType \f2widgetType\f1, void *\f2object\f1, chtype \f2key\f1, BINDFN \f2function\f1, void *\f2data\f1);
 
494
.RS 3
 
495
This function allows the user to create special key bindings. The 
 
496
\f2widgetType\f1 parameter is a defined type which states what Cdk object type
 
497
is being used. To learn more about the type \f4EObjectType\f1 read the 
 
498
\f4cdk_binding\f1 manual page. The \f2object\f1 parameter is the pointer to the
 
499
widget object. The \f2key\f1 is the character to bind. The \f2function\f1 is 
 
500
the function type. To learn more about the key binding callback function types
 
501
read the \f4cdk_binding\f1 manual page. The last parameter \f2data\f1 is a 
 
502
pointer to any data that needs to get passed to the callback function.
 
503
.RE
 
504
 
 
505
.SH KEY BINDINGS
 
506
When the widget is activated there are several default key bindings which will
 
507
help the user enter or manipulate the information quickly. The following table
 
508
outlines the keys and their actions for this widget.
 
509
.LP
 
510
.RS 3
 
511
.nf
 
512
\f2Key          Action\f1
 
513
Left Arrow  Moves the cursor the the left.
 
514
CTRL-B      Moves the cursor the the left.
 
515
Right Arrow Moves the cursor the the right.
 
516
CTRL-F      Moves the cursor the the right.
 
517
Delete      Deletes the character to the left of the cursor.
 
518
Backspace   Deletes the character to the left of the cursor.
 
519
CTRL-H      Deletes the character to the left of the cursor.
 
520
CTRL-V      Pastes whatever is in the paste buffer, into the widget.
 
521
CTRL-X      Cuts the contents from the widget and saves a copy in 
 
522
            the paste buffer.
 
523
CTRL-Y      Copies the contents of the widget into the paste buffer.
 
524
CTRL-U      Erases the contents of the widget.
 
525
CTRL-A      Moves the cursor to the begining of the entry field.
 
526
CTRL-E      Moves the cursor to the end of the entry field.
 
527
CTRL-T      Transposes the characer under the cursor with the
 
528
            character to the right.
 
529
Return      Exits the widget and returns a \f4char *\f1 representing
 
530
            the information which was typed into the field. It also
 
531
            sets the structure member \f4exitType\f1 in the widget
 
532
            pointer to \f4vNORMAL\f1.
 
533
Tab         Exits the widget and returns a \f4char *\f1 representing
 
534
            the information which was typed into the field. It also
 
535
            sets the structure member \f4exitType\f1 in the widget
 
536
            pointer to \f4vNORMAL\f1.
 
537
Escape      Exits the widget and returns a \f4NULL\f1 pointer. It also
 
538
            sets the structure member \f4exitType\f1 in the widget pointer
 
539
            to the value of \f4vESCAPE_HIT\f1.
 
540
Ctrl-L      Refreshes the screen.
 
541
.fi
 
542
.RE
 
543
.SH SEE ALSO
 
544
.BR cdk (3X),
 
545
.BR cdk_binding (3X),
 
546
.BR cdk_display (3X),
 
547
.BR cdk_process (3X),
 
548
.BR cdk_screen (3X)
 
549
.SH NOTES
 
550
.PP
 
551
The header file \f4<cdk.h>\f1 automatically includes the header files
 
552
\f4<curses.h>\f1, \f4<stdlib.h>\f1, \f4<string.h>\f1, \f4<ctype.h>\f1,
 
553
\f4<unistd.h>\f1, \f4<dirent.h>\f1, \f4<time.h>\f1, \f4<errno.h>\f1,
 
554
\f4<pwd.h>\f1, \f4<grp.h>\f1, \f4<sys/stat.h>\f1, and \f4<sys/types.h>\f1.
 
555
The \f4<curses.h>\f1 header file includes \f4<stdio.h>\f1 and \f4<unctrl.h>\f1.
 
556
.PP
 
557
If you have \f4Ncurses\f1 installed on your machine add -DNCURSES to the 
 
558
compile line to include the Ncurses header files instead.