ReXGlue SDK
Loading...
Searching...
No Matches
dialog.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <filesystem>
14#include <string>
15#include <vector>
16
18#include <rex/types.h>
19
20namespace rex::ui {
21
23 MessageType type = MessageType::kError;
24 std::string title;
25 std::string body;
27 std::vector<std::string> buttons;
28};
29
32 std::string title;
33 // NOLINTNEXTLINE(readability-redundant-member-init): designated initializers omit this field
34 std::string body = {};
36 // NOLINTNEXTLINE(readability-redundant-member-init): designated initializers omit this field
37 std::vector<std::string> buttons = {};
38 bool text_input = false;
39 // NOLINTNEXTLINE(readability-redundant-member-init): designated initializers omit this field
40 std::string default_text = {};
42 u32 max_length = 0;
43};
44
47 bool canceled = true;
49 u32 button = 0;
51 // NOLINTNEXTLINE(readability-redundant-member-init): designated initializers omit this field
52 std::string text = {};
53};
54
55struct FileFilter {
56 std::string name;
58 std::string pattern;
59};
60
62 enum class Mode : u8 {
63 kOpenFile,
64 kOpenFiles,
65 kOpenFolder,
66 kSaveFile,
67 };
68 Mode mode = Mode::kOpenFile;
69 std::string title;
71 std::vector<FileFilter> filters;
72 std::filesystem::path default_location;
73};
74
75} // namespace rex::ui
MessageType
Definition process.h:182
Process control, console, environment and crash reports.
Definition dialog.h:22
std::vector< std::string > buttons
Definition dialog.h:27
Definition dialog.h:61
Mode
Definition dialog.h:62
std::vector< FileFilter > filters
Definition dialog.h:71
Definition dialog.h:55
std::string pattern
Definition dialog.h:58
Definition dialog.h:31
u32 max_length
Definition dialog.h:42
std::vector< std::string > buttons
Definition dialog.h:37
Definition dialog.h:45
u32 button
Definition dialog.h:49
bool canceled
Definition dialog.h:47
std::string text
Definition dialog.h:52
Integer types, byte order wrappers and size literals.