|
C-Menu 0.2.9
A User Interface Toolkit
|
Form data structures, enums, types, end process declarations. More...
#include <cm.h>Go to the source code of this file.
Data Structures | |
| struct | Text |
| structure for form fields More... | |
| struct | Field |
| structure for form fields More... | |
| struct | Form |
Macros | |
| #define | FIELD_MAXLEN 1024 |
| #define | FIELD_MAXCNT 100 |
| #define | F_NOMETAS 1 |
| #define | F_NOTBLANK 2 |
| #define | F_NOECHO 4 |
Typedefs | |
| typedef struct Init | Init |
Enumerations | |
| enum | { P_CONTINUE , P_ACCEPT , P_HELP , P_CANCEL , P_REFUSE , P_CALC , P_EDIT , P_END } |
| enum | FieldFormat { FF_STRING , FF_DECIMAL_INT , FF_HEX_INT , FF_FLOAT , FF_DOUBLE , FF_CURRENCY , FF_YYYYMMDD , FF_HHMMSS , FF_APR , FF_INVALID } |
Functions | |
| int | field_editor (Form *) |
| Accept input for a field. | |
| int | form_display_field (Form *) |
| Display current field. | |
| int | form_display_field_n (Form *, int) |
| Display field n. | |
| int | field_navigator (Form *) |
| Handle user input for field entry, allowing navigation between fields and looping until an exit action is selected. | |
| int | form_read_description (Form *) |
| int | form_fmt_field (Form *, char *s) |
| Format field according to its format type. | |
| int | form_desc_error (int, char *, char *) |
| Handle errors encountered while parsing the form description file, providing detailed error messages that include the file name, line number, and the specific error encountered. | |
| void | form_help (char *) |
| int | form_yx_to_fidx (Form *, int, int) |
| void | form_display_chyron (Form *) |
Variables | |
| char | ff_tbl [][26] |
| Form * | form |
Form data structures, enums, types, end process declarations.
Definition in file form.h.
| #define F_NOECHO 4 |
| #define F_NOMETAS 1 |
| anonymous enum |
Form process types
| enum FieldFormat |
Form field formats
| Enumerator | |
|---|---|
| FF_STRING | a string field format, e.g. for accepting a name or other text input |
| FF_DECIMAL_INT | a decimal integer field format, e.g. for accepting an age or other numeric input |
| FF_HEX_INT | a hexadecimal integer field format, e.g. for accepting a color code or other hexadecimal input |
| FF_FLOAT | a floating point field format, e.g. for accepting a price or other decimal input |
| FF_DOUBLE | a double precision floating point field format, e.g. for accepting a more precise decimal input |
| FF_CURRENCY | a currency field format, e.g. for accepting a price or other monetary input, formatted as a decimal number with two decimal places and a currency symbol |
| FF_YYYYMMDD | a date field format, e.g. for accepting a date input, formatted as a string in the format "YYYY-MM-DD" |
| FF_HHMMSS | a time field format, e.g. for accepting a time input, formatted as a string in the format "HH:MM:SS" |
| FF_APR | an APR field format, e.g. for accepting an annual percentage rate input, formatted as a decimal number with two decimal places and a percent symbol |
| FF_INVALID | an invalid field format, used for error handling and validation purposes Future Implementation of Additional Field Formats FF_EMAIL - an email field format, e.g. for accepting an email address input, formatted as a string that matches a regular expression for valid email addresses FF_PHONE - a phone number field format, e.g. for accepting a phone number input, formatted as a string that matches a regular expression for valid phone numbers FF_URL - a URL field format, e.g. for accepting a URL input, formatted as a string that matches a regular expression for valid |
Definition at line 48 of file form.h.
|
extern |
|
extern |
|
extern |
|
extern |
Definition at line 444 of file form_engine.c.
References Field::col, Form::fcnt, Form::field, Field::len, and Field::line.
Referenced by field_editor().
|
extern |
ff_tbl - a table of field format strings used in the Form description file to identify field data types the index of the field format in this table corresponds to the FieldFormat enum values, e.g. ff_tbl[FF_STRING] = "string", ff_tbl[F_DECIMAL_INT] = "decimal_int", etc. a table of field format strings used in the Form description file to identify field data types, e.g. "string", "decimal_int", "hex_int", etc. The index of the field format in this table corresponds to the FieldFormat enum values, e.g. ff_tbl[FF_STRING] = "string", ff_tbl[FF_DECIMAL_INT] = "decimal_int", etc. This table is used for parsing the form description file and determining the field formats for each field in the form.
Definition at line 40 of file fields.c.
Referenced by form_parse_desc().
|
extern |
a pointer to the current form structure, used for managing and processing the form during form processing. This pointer can be updated to point to different form structures as needed, allowing for dynamic handling of multiple forms within the same application or session. The form pointer provides access to all the properties and data of the current form, enabling efficient management and processing of the form fields and text during user interactions and other events during form processing.
Definition at line 47 of file mem.c.
Referenced by form_desc_error(), form_display_screen(), form_engine(), form_post(), form_process(), init_form(), init_form_files(), mk_filler(), and new_form().