blob: 1712b03e03a6a9dd94caac1969f13a9171207b32 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#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,
OKAY
};
typedef alist<duple<const char *, diag_result_t>> button_list;
extern button_list &yes_no_cancel;
extern button_list &yes_no_retry;
extern button_list &okay_cancel;
extern button_list &okay;
class dialog : public window {
public:
//button names are copied
//alist isn't needed past constructor
dialog(widget &top_part, button_list buttons);
//zero means not set yet
diag_result_t result;
void show_modal();
private:
vbox *main_box;
};
}
#endif
|