37 explicit MessageBox (
const MessageBoxOptions& options)
38 : inner (detail::AlertWindowHelpers::create (options)),
39 numButtons (options.getNumButtons()) {}
43 inner->runAsync ([fn, n = numButtons] (
int result)
49 int runSync()
override
51 return map (inner->runSync(), numButtons);
60 static int map (
int button,
int numButtons) {
return (button + numButtons - 1) % numButtons; }
66 return std::make_unique<MessageBox> (options);
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...