38#define EDITBOX_MIN_CHARS 3
47 const char *content = *(
box->string.buf);
49 char buf[ width + 1 ];
50 signed int cursor_offset, underflow, overflow,
first;
54 cursor_offset = (
box->string.cursor -
box->first );
56 overflow = ( cursor_offset - ( width - 1 ) );
58 if ( underflow > 0 ) {
62 }
else if ( overflow > 0 ) {
66 cursor_offset = (
box->string.cursor -
first );
69 memset ( buf,
'_', width );
#define NULL
NULL pointer (VOID *)
union @162305117151260234136356364136041353210355154177 key
Sense key.
#define mvprintw(y, x, fmt,...)
static int move(int y, int x)
#define color_set(cpno, opts)
int box(WINDOW *win, chtype verch, chtype horch)
Draw borders from single-byte characters and renditions around a window.
#define EDITBOX_MIN_CHARS
static void draw_editbox(struct widget *widget)
Draw text box widget.
static int edit_editbox(struct widget *widget, int key)
Edit text box widget.
struct widget_operations editbox_operations
Text box widget operations.
Editable text box widget.
int edit_string(struct edit_string *string, int key)
Edit editable string.
#define CPAIR_EDIT
Editable text.
#define CPAIR_NORMAL
Normal text.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void * memset(void *dest, int character, size_t len) __nonnull
uint32_t first
First block in range.
#define container_of(ptr, type, field)
Get containing structure.
size_t strlen(const char *src)
Get length of string.
An editable text box widget.