MinWin API Reference

minwin

app
button
canvas
combo
component
dialog
event
font
geometry
group
icon
image
label
layout
listbox
menu
multidg
paint
peer
peerimpl
scroll
text
window

minwin.dialog

A general dialog class and utility helper dialogs.

class Dialog: minwin.window.AbstractWindow;
A dialog box for modal interactions.

this(AbstractWindow owner, char[] title, bool modal = true, char[] name = "");
Construct a dialog owned by the given window and having the specified modality. If the dialog is modal setting the visibility to true will block execution until the dialog is closed.

this(WindowPeer_ peer);
Wrap a preconstucted peer as a MinWin Dialog.

bool visible;
Override read/write property to implement modal dialogs. A modal dialog will block execution and events to the other windows in the application until the dialog is closed by setting visible off or destroying the dialog.

struct FileFilter;
Structure for specifying a filter in a file dialog.

char[] description;
Textual description of the filter to show to user.

char[][] extensions;
Array of extensions to filter (eg, txt).

struct FileDialogData;
Structure for communicating with open/save file dialogs.

char[] title;
Read/write property for the title of the dialog.

FileFilter [] filter;
Writable property for the array of filters to display.

char[] initialDir;
Writable property for the initial directory to start in.

char[] initialFile;
Writable property for the initial file name.

char[] result;
Readable property for the output file name.

int filterIndex;
Readable property for the output filter selected.

bool openFileDialog(AbstractWindow owner, inout FileDialogData data);
Display a dialog to choose a file. Returns true if the user closed the dialog with OK or Open.

bool saveFileDialog(AbstractWindow owner, inout FileDialogData data);
Display a dialog to save a file. Returns true if the user closed the dialog with OK or Save.

void informationDialog(AbstractWindow owner, char[] text, char[] title);
Show a modal information dialog with given text, title and owner.

void warningDialog(AbstractWindow owner, char[] text, char[] title);
Show a modal warning dialog with given text, title and owner.

void errorDialog(AbstractWindow owner, char[] text, char[] title);
Show a modal error dialog with given text, title and owner.

void messageDialog(AbstractWindow owner, char[] text, char[] title);
Show a modal message dialog with given text, title and owner.