|
C-Menu 0.2.9
A User Interface Toolkit
|
Stand-alone Field Edit and Entry for C-Menu. More...
#include <common.h>#include <monetary.h>#include <stdbool.h>#include <stddef.h>#include <string.h>#include <termios.h>#include <unistd.h>Go to the source code of this file.
Functions | |
| int | cf_accept (UiSurface *sfc, uint w, char *accept_s, uint flin, uint fcol, uint flen) |
| Accepts input for a field in a C-Menu window. | |
Variables | |
| bool | f_erase_remainder = true |
| Structure to hold field information for C-Menu. | |
Stand-alone Field Edit and Entry for C-Menu.
Currently, this modules contains a single function, cf_accept(), a lightweight yet fully functional field editor. For text fields, it is equivalent to the field editor in fields.c. Instead of the built-in formatting and validation in fields.c, this module provides a clean slate for a modular plug-in architecture to accomodate formatting, validation, and high-precision numeric data. It will eventually replace the field editor in fields.c. It is a work in progress.
Definition in file cm_fields.c.
| int cf_accept | ( | UiSurface * | sfc, |
| uint | w, | ||
| char * | accept_s, | ||
| uint | flin, | ||
| uint | fcol, | ||
| uint | flen ) |
Accepts input for a field in a C-Menu window.
| UiSurface | *sfc The surface to accept input from |
| win | The window to accept input from |
| accept_s | The string to accept input into |
| flin | The line number of the field |
| fcol | The column number of the field |
| flen | The length of the field |
< Enter accepts the field and moves to the next field if f_erase_remainder is set, it will clear the remaining characters above and after the current cursor location
KEY_IC toggles insert mode
KEY_DC deletes character at cursor
KEY_HOME moves cursor to start of field
KEY_BACKSPACE deletes character before cursor
KEY_LEFT moves cursor left one character
KEY_RIGHT moves cursor right one character
Handles mouse events for field editing
Definition at line 41 of file cm_fields.c.
References click_x, click_y, f_erase_remainder, ui_curs_set(), ui_cursor_move(), ui_get_event(), ui_mvwaddstr(), ui_render(), ui_wclrtoeol(), and WIN.
Referenced by get_cmd_arg().
| bool f_erase_remainder = true |
Structure to hold field information for C-Menu.
Definition at line 30 of file cm_fields.c.
Referenced by cf_accept().