7#include "../macros.hpp"
13#include <system_error>
15hi_export_module(hikogui.utility.dialog : intf);
17hi_export
namespace hi {
20enum class dialog_button {no, yes, cancel, ok, retry, _continue};
22template<std::
integral T>
23[[nodiscard]]
constexpr unsigned long long operator<<(T
const &lhs, dialog_button
const &rhs)
noexcept
25 return 1ULL << std::to_underlying(rhs);
29 no = 1 << dialog_button::no,
30 yes = 1 << dialog_button::yes,
32 cancel = 1 << dialog_button::cancel,
41 ok = 1 << dialog_button::ok,
42 retry = 1 << dialog_button::retry,
43 _continue = 1 << dialog_button::_continue,
100 return std::to_underlying(rhs) != 0;
105 return static_cast<dialog_button_mask>(std::to_underlying(lhs) & std::to_underlying(rhs));
110 return static_cast<dialog_button_mask>(std::to_underlying(lhs) | std::to_underlying(rhs));
115 return lhs = lhs & rhs;
120 return lhs = lhs | rhs;
135 return lhs = lhs & rhs;
140 return lhs = lhs | rhs;
The HikoGUI namespace.
Definition array_generic.hpp:20
std::expected< dialog_button, std::error_code > dialog(std::string_view title, std::string_view text, dialog_button_mask button_mask=dialog_button_mask::ok) noexcept
Display a modal dialog.
Definition dialog_win32_impl.hpp:20
dialog_button_mask
Definition dialog_intf.hpp:28
@ yes_no
A dialog box with "yes" and "no" buttons.
@ ok
A dialog box with just a "ok" button.
@ yes_no_cancel
A dialog box with "yes", "no" and "cancel" buttons.
@ retry_cancel
A dialog box with "retry" and "cancel" buttons.
@ ok_cancel
A dialog box with "ok" and "cancel" buttons.
@ cancel_retry_continue
A dialog box with "cancel", "retry" and "continue" buttons.
DOXYGEN BUG.
Definition algorithm_misc.hpp:20