X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fform_driver.3x.html;h=6fb31c705ae0c0d73221b9262092ffb5c08bf148;hp=72b2d9428bacda983c477d14fc1e016675b19da3;hb=dcfe712cb3492636e8d50c9867cf05aec089a576;hpb=02f02dcd4464143580e783ae32c822d8eb8cdcbf diff --git a/doc/html/man/form_driver.3x.html b/doc/html/man/form_driver.3x.html index 72b2d942..6fb31c70 100644 --- a/doc/html/man/form_driver.3x.html +++ b/doc/html/man/form_driver.3x.html @@ -1,6 +1,6 @@ @@ -45,52 +45,47 @@ - -
- form_driver - command-processing loop of the form system +
+ form_driver, form_driver_w - command-processing loop of + the form system --
+
#include <form.h> int form_driver(FORM *form, int c); int form_driver_w(FORM *form, int c, wchar_t wch); --
+
--
+
Once a form has been posted (displayed), you should funnel - input events to it through form_driver. This routine has + input events to it through form_driver. This routine has three major input cases: - o The input is a form navigation request. Navigation + o The input is a form navigation request. Navigation request codes are constants defined in <form.h>, which - are distinct from the key- and character codes - returned by wgetch(3x). + are distinct from the key- and character codes + returned by wgetch(3x). o The input is a printable character. Printable charac- - ters (which must be positive, less than 256) are + ters (which must be positive, less than 256) are checked according to the program's locale settings. o The input is the KEY_MOUSE special key associated with an mouse event. --
- This extension simplifies the use of the forms library - using wide characters. The input is either a key code (a - request) or a wide character returned by get_wch(3x). The - type must be passed as well, to enable the library to - determine whether the parameter is a wide character or a +
+ This extension simplifies the use of the forms library + using wide characters. The input is either a key code (a + request) or a wide character returned by get_wch(3x). The + type must be passed as well, to enable the library to + determine whether the parameter is a wide character or a request. --
+
The form driver requests are as follows: Name Description @@ -116,8 +111,8 @@ REQ_LAST_FIELD Move to the last field. REQ_LAST_PAGE Move to the last field. REQ_LEFT_CHAR Move left in the field. - REQ_LEFT_FIELD Move left to a field. + REQ_LEFT_FIELD Move left to a field. REQ_NEW_LINE Insert or overlay a new line. REQ_NEXT_CHAR Move to the next char. REQ_NEXT_CHOICE Display next field choice. @@ -155,14 +150,46 @@ REQ_UP_FIELD Move up to a field. REQ_VALIDATION Validate field. - If the second argument is a printable character, the - driver places it in the current position in the current - field. If it is one of the forms requests listed above, + If the second argument is a printable character, the + driver places it in the current position in the current + field. If it is one of the forms requests listed above, that request is executed. --
+
+ The form library makes updates to the window associated + with form fields rather than directly to the field buf- + fers. + + The form driver provides low-level control over updates to + the form fields. The form driver also provides for vali- + dating modified fields to ensure that the contents meet + whatever constraints an application may attach using + set_field_type. + + You can validate a field without making any changes to it + using REQ_VALIDATION. The form driver also validates a + field in these cases: + + o a call to set_current_field attempts to move to a dif- + ferent field. + + o a call to set_current_page attempts to move to a dif- + ferent page of the form. + + o a request attempts to move to a different field. + + o a request attempts to move to a different page of the + form. + + In each case, the move fails if the field is invalid. + + If the modified field is valid, the form driver copies the + modified data from the window associated with the field to + the field buffer. + + +
If the second argument is the KEY_MOUSE special key, the associated mouse event is translated into one of the above pre-defined requests. Currently only clicks in the user @@ -206,8 +233,7 @@ E_REQUEST_DENIED is returned. --
+
If the second argument is neither printable nor one of the above pre-defined form requests, the driver assumes it is an application-specific command and returns E_UNKNOWN_COM- @@ -216,8 +242,7 @@ defined requests. --
+
form_driver returns one of the following error codes: E_OK The routine succeeded. @@ -246,25 +271,23 @@ The form driver code saw an unknown request code. --
- curses(3x), form(3x), form_variables(3x), curs_getch(3x). +
+ curses(3x), form(3x), form_field_buffer(3x), + form_field_validation(3x), form_fieldtype(3x), form_vari- + ables(3x), getch(3x). --
+
The header file <form.h> automatically includes the header files <curses.h>. --
+
These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. --
+
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. @@ -281,6 +304,7 @@