mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17:57 +03:00
Editable text box widget based on mucurses and edit_string.
This commit is contained in:
35
src/include/gpxe/editbox.h
Normal file
35
src/include/gpxe/editbox.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef _GPXE_EDITBOX_H
|
||||
#define _GPXE_EDITBOX_H
|
||||
|
||||
/** @file
|
||||
*
|
||||
* Editable text box widget
|
||||
*
|
||||
*/
|
||||
|
||||
#include <curses.h>
|
||||
#include <gpxe/editstring.h>
|
||||
|
||||
/** An editable text box widget */
|
||||
struct edit_box {
|
||||
/** Editable string */
|
||||
struct edit_string string;
|
||||
/** Containing window */
|
||||
WINDOW *win;
|
||||
/** Row */
|
||||
unsigned int row;
|
||||
/** Starting column */
|
||||
unsigned int col;
|
||||
/** Width */
|
||||
unsigned int width;
|
||||
/** First displayed character */
|
||||
unsigned int first;
|
||||
};
|
||||
|
||||
extern void init_editbox ( struct edit_box *box, char *buf, size_t len,
|
||||
WINDOW *win, unsigned int row, unsigned int col,
|
||||
unsigned int width );
|
||||
extern void draw_editbox ( struct edit_box *box );
|
||||
extern int edit_editbox ( struct edit_box *box, int key );
|
||||
|
||||
#endif /* _GPXE_EDITBOX_H */
|
||||
Reference in New Issue
Block a user