HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
dialog_macos_impl.hpp
1
2#pragma once
3
4#include "dialog_intf.hpp"
5
6hi_export_module(hikogui.utility.dialog : impl);
7
8hi_export inline void dialog_output(char const *title, char const *message)
9{
10 @autoreleasepool {
11 NSString *title_s = [NSString stringWithCString:title encoding:NSUTF8StringEncoding];
12 NSString *message_s = [NSString stringWithCString:message encoding:NSUTF8StringEncoding];
13
14 auto *alert = [[NSAlert alloc] init];
15 [alert setMessageText:title_s];
16 [alert setInformativeText:message_s];
17 [alert addButtonWithTitle:@"OK"];
18 [alert setAlertStyle:NSAlertStyleCritical];
19 [alert runModal];
20 }
21}
@ title
Format a heading Often in bold, larger font and on a line by itself.