OOUI/Windows/Message Dialogs

Unlike the other types of dialogs, message dialogs, which generally contain either a confirmation or alert notification, behave in such a generic way that they can be instantiated directly. By default, the rendered dialog box consists of In the case of a confirmation message, the title describes what the selected action will do. In the case of an alert, the title describes what event occurred. A confirmation message provides more details about the consequences of the selected action; an alert message, more information about why the event occurred.
 * a header with the dialog title,
 * a message,
 * a footer that contains any action widgets.

The basic MessageDialog class specifies two actions: ‘accept’, the primary action (e.g., ‘ok’) and ‘reject,’ the safe action (e.g., ‘cancel’). Both will close the window, passing along the selected action.

When the window is opened with the window manager’s openWindow, a new action set can also be passed to the window. The following example illustrates a message dialog with a single action labeled ‘Dismiss.’ The action itself is ‘accept’, defined by the class.

The message dialog will automatically display all actions in a single row at the bottom of the dialog box, unless the labels are too long to fit without overflow, in which case the actions will be displayed on separate rows:

For long messages, use the verbose option to left-align and adjust the message styling:

For a full list of supported methods and configuration options, please see the code-level documentation.