diff options
Diffstat (limited to 'src/user/raleigh/d/dialog.cpp')
-rw-r--r-- | src/user/raleigh/d/dialog.cpp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/user/raleigh/d/dialog.cpp b/src/user/raleigh/d/dialog.cpp index 38ca310..33f137e 100644 --- a/src/user/raleigh/d/dialog.cpp +++ b/src/user/raleigh/d/dialog.cpp @@ -54,21 +54,36 @@ dialog::dialog(widget &top_part, alist<duple<const char *, diag_result_t>> butto main_box->add_end(*pbot); } -alist<duple<const char *, diag_result_t>> &mk_yes_no_cancel() { - alist<duple<const char *, diag_result_t>> *list = new alist<duple<const char *, diag_result_t>>(3, 1); +button_list &mk_yes_no_cancel() { + button_list *list = new button_list(3, 1); list->add_back(duple<const char *, diag_result_t>("Yes", YES)); list->add_back(duple<const char *, diag_result_t>("No", NO)); list->add_back(duple<const char *, diag_result_t>("Cancel", CANCEL)); return *list; } -alist<duple<const char *, diag_result_t>> &mk_yes_no_retry() { - alist<duple<const char *, diag_result_t>> *list = new alist<duple<const char *, diag_result_t>>(3, 1); +button_list &mk_yes_no_retry() { + button_list *list = new button_list(3, 1); list->add_back(duple<const char *, diag_result_t>("Yes", YES)); list->add_back(duple<const char *, diag_result_t>("No", NO)); list->add_back(duple<const char *, diag_result_t>("Retry", RETRY)); return *list; } -alist<duple<const char *, diag_result_t>> &raleigh::yes_no_cancel(mk_yes_no_cancel()); -alist<duple<const char *, diag_result_t>> &raleigh::yes_no_retry(mk_yes_no_retry());
\ No newline at end of file +button_list &mk_okay_cancel() { + button_list *list = new button_list(2, 1); + list->add_back(duple<const char *, diag_result_t>("Okay", OKAY)); + list->add_back(duple<const char *, diag_result_t>("Cancel", CANCEL)); + return *list; +} + +button_list &mk_okay() { + button_list *list = new button_list(1, 1); + list->add_back(duple<const char *, diag_result_t>("Okay", OKAY)); + return *list; +} + +button_list &raleigh::yes_no_cancel(mk_yes_no_cancel()); +button_list &raleigh::yes_no_retry(mk_yes_no_retry()); +button_list &raleigh::okay_cancel(mk_okay_cancel()); +button_list &raleigh::okay(mk_okay());
\ No newline at end of file |