summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/editbox.h
diff options
context:
space:
mode:
authorMichael Brown2006-12-20 02:40:57 +0100
committerMichael Brown2006-12-20 02:40:57 +0100
commit35dcbfe7717b4c99fd5c5ff3cedd2a074722303e (patch)
treea585070050668a179967eec8d277d72a5b5330ff /src/include/gpxe/editbox.h
parentReset screen on exit as well as entry (diff)
downloadipxe-35dcbfe7717b4c99fd5c5ff3cedd2a074722303e.tar.gz
ipxe-35dcbfe7717b4c99fd5c5ff3cedd2a074722303e.tar.xz
ipxe-35dcbfe7717b4c99fd5c5ff3cedd2a074722303e.zip
Editable text box widget based on mucurses and edit_string.
Diffstat (limited to 'src/include/gpxe/editbox.h')
-rw-r--r--src/include/gpxe/editbox.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/include/gpxe/editbox.h b/src/include/gpxe/editbox.h
new file mode 100644
index 00000000..2c5e0969
--- /dev/null
+++ b/src/include/gpxe/editbox.h
@@ -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 */