From 5fcf57739e68a8b5053e03778aaee0eed445babd Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Thu, 11 Mar 2021 22:00:22 -0500 Subject: settings editor, and lots of changes in service of that --- src/user/include/cxx/raleigh/d/dialog.h | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/user/include/cxx/raleigh/d/dialog.h (limited to 'src/user/include/cxx/raleigh/d/dialog.h') diff --git a/src/user/include/cxx/raleigh/d/dialog.h b/src/user/include/cxx/raleigh/d/dialog.h new file mode 100644 index 0000000..f207033 --- /dev/null +++ b/src/user/include/cxx/raleigh/d/dialog.h @@ -0,0 +1,37 @@ +#ifndef RALEIGH_D_DIALOG_H +#define RALEIGH_D_DIALOG_H + +#include +#include +#include +#include +#include + +namespace raleigh { + typedef uint32_t diag_result_t; + enum : diag_result_t { + NONE = 0, + YES, + NO, + CANCEL, + RETRY + }; + extern alist> &yes_no_cancel; + extern alist> &yes_no_retry; + class dialog : public window { + public: + //button names are copied + //alist isn't needed past constructor + dialog(widget &top_part, alist> buttons); + + //zero means not set yet + diag_result_t result; + + void show_modal(); + + private: + vbox *main_box; + }; +} + +#endif \ No newline at end of file -- cgit v1.2.3