diff options
author | Benji Dial <benji6283@gmail.com> | 2021-03-11 22:00:22 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-03-11 22:00:22 -0500 |
commit | 5fcf57739e68a8b5053e03778aaee0eed445babd (patch) | |
tree | e7a8bab18668d112e58b1b48190195035c71fa8a /src/user/include/cxx/raleigh/d/dialog.h | |
parent | 0f2398d1f622cce37925f52d978d92e6cce1c7a9 (diff) | |
download | portland-os-5fcf57739e68a8b5053e03778aaee0eed445babd.tar.gz |
settings editor, and lots of changes in service of that
Diffstat (limited to 'src/user/include/cxx/raleigh/d/dialog.h')
-rw-r--r-- | src/user/include/cxx/raleigh/d/dialog.h | 37 |
1 files changed, 37 insertions, 0 deletions
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 <raleigh/w/vbox.h> +#include <raleigh/window.h> +#include <structs/alist.h> +#include <structs/duple.h> +#include <stdint.h> + +namespace raleigh { + typedef uint32_t diag_result_t; + enum : diag_result_t { + NONE = 0, + YES, + NO, + CANCEL, + RETRY + }; + extern alist<duple<const char *, diag_result_t>> &yes_no_cancel; + extern alist<duple<const char *, diag_result_t>> &yes_no_retry; + class dialog : public window { + public: + //button names are copied + //alist isn't needed past constructor + dialog(widget &top_part, alist<duple<const char *, diag_result_t>> buttons); + + //zero means not set yet + diag_result_t result; + + void show_modal(); + + private: + vbox *main_box; + }; +} + +#endif
\ No newline at end of file |