|
C-Menu 0.2.9
A User Interface Toolkit
|
Field Edit and Entry for C-Menu Form. More...
#include "common.h"#include <monetary.h>#include <stdbool.h>#include <stddef.h>#include <stdio.h>#include <string.h>#include <termios.h>#include <unistd.h>Go to the source code of this file.
Functions | |
| void | display_field (UiCell *cmplx_buf, uint y, uint x) |
| int | field_editor (Form *form) |
| Accept input for a field. | |
| int | form_display_accept_field (Form *) |
| int | form_display_field (Form *form) |
| Display current field. | |
| int | form_display_field_n (Form *form, uint n) |
| Display field n. | |
| int | form_fmt_field (Form *form, char *s) |
| Format field according to its format type. | |
| int | form_validate_field (Form *form) |
| Validate current field based on flags. | |
| bool | is_valid_date (uint yyyy, uint mm, uint dd) |
| Check if a given date is valid, including leap years. | |
| bool | is_valid_time (uint hh, uint mm, uint ss) |
| Check if a given time is valid. | |
| void | left_justify (char *s) |
| Left justify string by removing leading spaces. | |
| void | numeric (char *d, char *s) |
| Extract numeric characters from source string to destination string. | |
| void | right_justify (char *, uint) |
| Right justify string by removing trailing spaces and adding leadingspaces. | |
Variables | |
| char | ff_tbl [][26] = {_("string"), _("decimal_int"), _("hex_int"), _("float"), _("double"), _("currency"), _("yyyymmdd"), _("hhmmss"), _("apr"), ""} |
| void display_field | ( | UiCell * | cmplx_buf, |
| uint | y, | ||
| uint | x ) |
Definition at line 355 of file fields.c.
References sfc_ptr, ui_mvwadd_wchstr(), and ui_surface.
| int form_display_accept_field | ( | Form * | form | ) |
Definition at line 388 of file fields.c.
References Field::accept_cc, Field::accept_s, cell_nt, Field::col, Form::fidx, Form::field, Field::filler_cc, Field::filler_s, Field::len, Field::line, sfc_ptr, ui_mvwadd_wchnstr(), ui_render(), and ui_surface.
Referenced by field_editor().
| char ff_tbl = {_("string"), _("decimal_int"), _("hex_int"), _("float"), _("double"), _("currency"), _("yyyymmdd"), _("hhmmss"), _("apr"), ""} |
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 25 of file fields.c.
Referenced by form_parse_desc().