summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-widgets.c
Commit message (Collapse)AuthorAgeFilesLines
* ui/ncurses/nc-widgets: Add initial textbox validation functionsJeremy Kerr2013-12-181-0/+63
| | | | | | | | | We'd like to do some validation of the system configuration parameters, so add a few validation types to the widget code. We currently need integer, ipv4 address and multiple ipv4 address types. These are implemented as small wrappers around the ncurses form validator code. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* configure: Use AC_GNU_SOURCEJeremy Kerr2013-12-181-3/+2
| | | | | | | Rather than #defining _GNU_SOURCE in our .c files, we can define this from config.h instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/nc-widgets: Unify select keyJeremy Kerr2013-11-221-15/+11
| | | | | | | | We have a few instances where we check for a 'select' action (enter or space key event), and some are inconsistent. Unify these with a key_is_select() function. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add widgetset_set_windowJeremy Kerr2013-11-221-0/+7
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add widget_select_drop_optionsJeremy Kerr2013-11-221-0/+39
| | | | | | We want to be able to re-set the options in a select widget. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/widgets: Add widget focus offset queryJeremy Kerr2013-11-221-0/+23
| | | | | | | | | | When we have widgets that are larger than the screen, we'd like to scroll to the currently-focussed component of that widget. This change introduces a widget_focus_y function, which returns the y offset of the field's focus. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/widgets: Add n_options check to widget_select_get_valueJeremy Kerr2013-11-221-0/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Make boot editor API consistent with config & sysinfo screensJeremy Kerr2013-11-221-0/+27
| | | | | | | | | | | | The boot-editor API is a little more exposed than it needs to be: the boot_editor struct does not need to be available to other files, and the init function and on_exit functions differ from those provided for the config and sysinfo screens. This change unifies the boot_editor API with those for the other screens. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add simple ncurses form widget setJeremy Kerr2013-11-131-0/+728
We're doing a lot of the same stuff with forms, and we'll to implement a lot of fields with the upcoming configuration interface. This change introduces a simple ncurses widget set. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud