|
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 | Field |
| structure for form fields More... | |
| struct | Form |
| struct | Text |
| structure for form fields More... | |
Macros | |
| #define | F_NOECHO 4 |
| #define | F_NOMETAS 1 |
| #define | F_NOTBLANK 2 |
| #define | FIELD_MAXCNT 100 |
| #define | FIELD_MAXLEN 1024 |
Typedefs | |
| typedef struct Init | Init |
Enumerations | |
| enum | FieldFormat { FF_STRING , FF_DECIMAL_INT , FF_HEX_INT , FF_FLOAT , FF_DOUBLE , FF_CURRENCY , FF_YYYYMMDD , FF_HHMMSS , FF_APR , FF_INVALID } |
| enum | FormAction { FA_CONTINUE , FA_ACCEPT , FA_HELP , FA_CANCEL , FA_REFUSE , FA_CALC , FA_EDIT , FA_END } |
Functions | |
| void | display_field (Form *, cchar_t *, int, int) |
| int | field_editor (Form *) |
| Accept input for a field. | |
| int | field_navigator (Form *) |
| Handle user input for field entry, allowing navigation between fields and looping until an exit action is selected. | |
| int | form_desc_error (Form *, 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_display_chyron (Form *) |
| int | form_display_field (Form *) |
| Display current field. | |
| int | form_display_field_n (Form *, int) |
| Display field n. | |
| int | form_fmt_field (Form *, char *s) |
| Format field according to its format type. | |
| void | form_help (char *) |
| int | form_read_description (Form *) |
| int | form_yx_to_fidx (Form *, int, int) |
Variables | |
| char | ff_tbl [][26] |
Form data structures, enums, types, end process declarations.
Definition in file form.h.
| #define F_NOECHO 4 |
| #define F_NOMETAS 1 |
| 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 47 of file form.h.
| enum FormAction |
FormAction Directives
Definition at line 26 of file form.h.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Definition at line 509 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 26 of file fields.c.
Referenced by form_parse_desc().