Deleted Added
full compact
form_driver.3x (174994) form_driver.3x (184989)
1.\"***************************************************************************
1.\"***************************************************************************
2.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
2.\" Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
3.\" *
4.\" Permission is hereby granted, free of charge, to any person obtaining a *
5.\" copy of this software and associated documentation files (the *
6.\" "Software"), to deal in the Software without restriction, including *
7.\" without limitation the rights to use, copy, modify, merge, publish, *
8.\" distribute, distribute with modifications, sublicense, and/or sell *
9.\" copies of the Software, and to permit persons to whom the Software is *
10.\" furnished to do so, subject to the following conditions: *

--- 10 unchanged lines hidden (view full) ---

21.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
22.\" *
23.\" Except as contained in this notice, the name(s) of the above copyright *
24.\" holders shall not be used in advertising or otherwise to promote the *
25.\" sale, use or other dealings in this Software without prior written *
26.\" authorization. *
27.\"***************************************************************************
28.\"
3.\" *
4.\" Permission is hereby granted, free of charge, to any person obtaining a *
5.\" copy of this software and associated documentation files (the *
6.\" "Software"), to deal in the Software without restriction, including *
7.\" without limitation the rights to use, copy, modify, merge, publish, *
8.\" distribute, distribute with modifications, sublicense, and/or sell *
9.\" copies of the Software, and to permit persons to whom the Software is *
10.\" furnished to do so, subject to the following conditions: *

--- 10 unchanged lines hidden (view full) ---

21.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
22.\" *
23.\" Except as contained in this notice, the name(s) of the above copyright *
24.\" holders shall not be used in advertising or otherwise to promote the *
25.\" sale, use or other dealings in this Software without prior written *
26.\" authorization. *
27.\"***************************************************************************
28.\"
29.\" $Id: form_driver.3x,v 1.15 2007/06/02 22:56:49 tom Exp $
29.\" $Id: form_driver.3x,v 1.16 2008/06/21 21:55:39 tom Exp $
30.TH form_driver 3X ""
31.SH NAME
32\fBform_driver\fR - command-processing loop of the form system
33.SH SYNOPSIS
34\fB#include <form.h>\fR
35.br
36int form_driver(FORM *form, int c);
37.br
38.SH DESCRIPTION
39Once a form has been posted (displayed), you should funnel input events to it
30.TH form_driver 3X ""
31.SH NAME
32\fBform_driver\fR - command-processing loop of the form system
33.SH SYNOPSIS
34\fB#include <form.h>\fR
35.br
36int form_driver(FORM *form, int c);
37.br
38.SH DESCRIPTION
39Once a form has been posted (displayed), you should funnel input events to it
40through \fBform_driver\fR. This routine has two major input cases; either
41the input is a form navigation request or it is a printable ASCII character.
40through \fBform_driver\fR. This routine has three major input cases:
41.TP 3
42-
43The input is a form navigation request.
44Navigation request codes are constants defined in \fB<form.h>\fP,
45which are distinct from the key- and character codes returned by \fBwgetch\fP.
46.TP 3
47-
48The input is a printable character.
49Printable characters (which must be positive, less than 256) are
50checked according to the program's locale settings.
51.TP 3
52-
53The input is the KEY_MOUSE special key associated with an mouse event.
54.PP
42The form driver requests are as follows:
43.TP 5
44REQ_NEXT_PAGE
45Move to the next page.
46.TP 5
47REQ_PREV_PAGE
48Move to the previous page.
49.TP 5

--- 163 unchanged lines hidden (view full) ---

213Validate field.
214.TP
215REQ_NEXT_CHOICE
216Display next field choice.
217.TP
218REQ_PREV_CHOICE
219Display previous field choice.
220.PP
55The form driver requests are as follows:
56.TP 5
57REQ_NEXT_PAGE
58Move to the next page.
59.TP 5
60REQ_PREV_PAGE
61Move to the previous page.
62.TP 5

--- 163 unchanged lines hidden (view full) ---

226Validate field.
227.TP
228REQ_NEXT_CHOICE
229Display next field choice.
230.TP
231REQ_PREV_CHOICE
232Display previous field choice.
233.PP
221If the second argument is a printable ASCII character, the driver places it
234If the second argument is a printable character, the driver places it
222in the current position in the current field. If it is one of the forms
223requests listed above, that request is executed.
224.SS MOUSE HANDLING
225.PP
226If the second argument is the KEY_MOUSE special key, the associated
227mouse event is translated into one of the above pre-defined requests.
228Currently only clicks in the user window (e.g. inside the form display
229area or the decoration window) are handled.

--- 34 unchanged lines hidden (view full) ---

264It is exactly the purpose of this return value to signal that an
265application specific command should be executed.
266.TP 3
267-
268If a translation
269into a request was done, \fBform_driver\fR returns the result of this request.
270.RE
271.PP
235in the current position in the current field. If it is one of the forms
236requests listed above, that request is executed.
237.SS MOUSE HANDLING
238.PP
239If the second argument is the KEY_MOUSE special key, the associated
240mouse event is translated into one of the above pre-defined requests.
241Currently only clicks in the user window (e.g. inside the form display
242area or the decoration window) are handled.

--- 34 unchanged lines hidden (view full) ---

277It is exactly the purpose of this return value to signal that an
278application specific command should be executed.
279.TP 3
280-
281If a translation
282into a request was done, \fBform_driver\fR returns the result of this request.
283.RE
284.PP
272If you clicked outside the user window or the mouse event couldn't be translated
285If you clicked outside the user window or the mouse event could not be translated
273into a form request an \fBE_REQUEST_DENIED\fR is returned.
274.SS APPLICATION-DEFINED COMMANDS
275.PP
286into a form request an \fBE_REQUEST_DENIED\fR is returned.
287.SS APPLICATION-DEFINED COMMANDS
288.PP
276If the second argument is neither printable ASCII nor one of the above
289If the second argument is neither printable nor one of the above
277pre-defined form requests, the driver assumes it is an application-specific
278command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands
279should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these
280pre-defined requests.
281.SH RETURN VALUE
282\fBform_driver\fR returns one of the following error codes:
283.TP 5
284.B E_OK

--- 16 unchanged lines hidden (view full) ---

301.TP 5
302.B E_SYSTEM_ERROR
303System error occurred (see \fBerrno\fR).
304.TP 5
305.B E_UNKNOWN_COMMAND
306The form driver code saw an unknown request code.
307.
308.SH SEE ALSO
290pre-defined form requests, the driver assumes it is an application-specific
291command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands
292should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these
293pre-defined requests.
294.SH RETURN VALUE
295\fBform_driver\fR returns one of the following error codes:
296.TP 5
297.B E_OK

--- 16 unchanged lines hidden (view full) ---

314.TP 5
315.B E_SYSTEM_ERROR
316System error occurred (see \fBerrno\fR).
317.TP 5
318.B E_UNKNOWN_COMMAND
319The form driver code saw an unknown request code.
320.
321.SH SEE ALSO
309\fBcurses\fR(3X), \fBform\fR(3X).
322\fBcurses\fR(3X),
323\fBform\fR(3X),
324\fBwgetch\fR(3X).
310.SH NOTES
311The header file \fB<form.h>\fR automatically includes the header files
312\fB<curses.h>\fR.
313.SH PORTABILITY
314These routines emulate the System V forms library. They were not supported on
315Version 7 or BSD versions.
316.SH AUTHORS
317Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
318S. Raymond.
319.\"#
320.\"# The following sets edit modes for GNU EMACS
321.\"# Local Variables:
322.\"# mode:nroff
323.\"# fill-column:79
324.\"# End:
325.SH NOTES
326The header file \fB<form.h>\fR automatically includes the header files
327\fB<curses.h>\fR.
328.SH PORTABILITY
329These routines emulate the System V forms library. They were not supported on
330Version 7 or BSD versions.
331.SH AUTHORS
332Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
333S. Raymond.
334.\"#
335.\"# The following sets edit modes for GNU EMACS
336.\"# Local Variables:
337.\"# mode:nroff
338.\"# fill-column:79
339.\"# End: