summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-widgets.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-04-15 11:08:39 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-04-16 09:08:45 +0800
commit5171b1c54fc57b6f1963e2482cfc07587296100d (patch)
treeb118f2fdec869cd3b035e35a3c9b0fbc608753cc /ui/ncurses/nc-widgets.h
parentcf651e02fb7a34545211708c2a285cd228645531 (diff)
downloadtalos-petitboot-5171b1c54fc57b6f1963e2482cfc07587296100d.tar.gz
talos-petitboot-5171b1c54fc57b6f1963e2482cfc07587296100d.zip
ui/ncurses: Use a fixed-sized for small, known-length fields
Fields without O_STATIC can "scroll" horizontally, and we may miss a left-hand section of text from the current display. This can mean that the user can't leave a validated field with no indication why, if the off-to-the-left data is not a valid entry. This change adds a widgetset function to mark a field as fixed-size, so we don't have this scrolling behaviour. This means that the entire field contents will always be visible, and any validation errors can be seen. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui/ncurses/nc-widgets.h')
-rw-r--r--ui/ncurses/nc-widgets.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/ncurses/nc-widgets.h b/ui/ncurses/nc-widgets.h
index 32b6bae..09c3b1f 100644
--- a/ui/ncurses/nc-widgets.h
+++ b/ui/ncurses/nc-widgets.h
@@ -35,6 +35,7 @@ struct nc_widget_button *widget_new_button(struct nc_widgetset *set,
int y, int x, int size, const char *str,
void (*click)(void *), void *arg);
+void widget_textbox_set_fixed_size(struct nc_widget_textbox *textbox);
void widget_textbox_set_validator_integer(struct nc_widget_textbox *textbox,
long min, long max);
void widget_textbox_set_validator_ipv4(struct nc_widget_textbox *textbox);
OpenPOWER on IntegriCloud