|
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 (WINDOW *win, char *accept_s, int flin, int fcol, int flen) |
| Accepts input for a field in a C-Menu window. | |
Variables | |
| bool | f_erase_remainder = true |
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 | ( | WINDOW * | win, |
| char * | accept_s, | ||
| int | flin, | ||
| int | fcol, | ||
| int | flen ) |
Accepts input for a field in a C-Menu window.
| 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 51 of file cm_fields.c.
References click_x, click_y, f_erase_remainder, and vgetch().
Referenced by get_cmd_arg().
| bool f_erase_remainder = true |
Definition at line 39 of file cm_fields.c.
Referenced by cf_accept().