The MessageBox class
The type of icon to show in the message box. Some message boxes will not show the icon.
Returns if external program logging is on or off.
If true will print output of external program to console.
This should be called once at the start of a program. It generates the proper main function for your environment (win32/posix/dmain) and boot straps the main loop for the GUI. This will call your UIAppMain function when ready.
1 import std.stdio : stdout, stderr; 2 import message_box : MessageBox, IconType, RUN_MAIN; 3 4 mixin RUN_MAIN; 5 6 extern (C) int UIAppMain(string[] args) { 7 // Create the message box 8 auto dialog = new MessageBox("Party Time", "The roof is on fire!", IconType.Warning); 9 10 // Set the error handler 11 dialog.onError((Throwable err) { 12 stderr.writefln("Failed to show message box: %s", err); 13 }); 14 15 // Show the message box 16 dialog.show(); 17 18 return 0; 19 }
0.3.0
Boost Software License - Version 1.0
A simple message box for the D programming language
It should work without requiring any 3rd party GUI toolkits. But will work with what it can find on your OS at runtime.
It tries to use the following:
* DlangUI (win32 on Windows or SDL2 on Linux)
* SDL_ShowSimpleMessageBox (Derelict SDL2)
* MessageBoxW (Windows)
* Zenity (Gtk/Gnome)
* Kdialog (KDE)
* gxmessage (X11)
Home page: https://github.com/workhorsy/d-message-box