Static Public Member Functions | |
| static void JUCE_CALLTYPE | showMessageBoxAsync (AlertWindow::AlertIconType iconType, const String &title, const String &message, Component *associatedComponent=nullptr) |
| Shows a dialog box that just has a message and a single 'ok' button to close it. | |
| static bool JUCE_CALLTYPE | showOkCancelBox (AlertWindow::AlertIconType iconType, const String &title, const String &message, Component *associatedComponent, ModalComponentManager::Callback *callback) |
| Shows a dialog box with two buttons. | |
| static int JUCE_CALLTYPE | showYesNoCancelBox (AlertWindow::AlertIconType iconType, const String &title, const String &message, Component *associatedComponent, ModalComponentManager::Callback *callback) |
| Shows a dialog box with three buttons. | |
| static void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync | ( | AlertWindow::AlertIconType | iconType, |
| const String & | title, | ||
| const String & | message, | ||
| Component * | associatedComponent = nullptr |
||
| ) | [static] |
Shows a dialog box that just has a message and a single 'ok' button to close it.
If the callback parameter is null, the box is shown modally, and the method will block until the user has clicked the button (or pressed the escape or return keys). If the callback parameter is non-null, the box will be displayed and placed into a modal state, but this method will return immediately, and the callback will be invoked later when the user dismisses the box.
| iconType | the type of icon to show |
| title | the headline to show at the top of the box |
| message | a longer, more descriptive message to show underneath the title |
| associatedComponent | if this is non-null, it specifies the component that the alert window should be associated with. Depending on the look and feel, this might be used for positioning of the alert window. Shows a dialog box that just has a message and a single 'ok' button to close it. |
If the callback parameter is null, the box is shown modally, and the method will block until the user has clicked the button (or pressed the escape or return keys). If the callback parameter is non-null, the box will be displayed and placed into a modal state, but this method will return immediately, and the callback will be invoked later when the user dismisses the box.
| iconType | the type of icon to show |
| title | the headline to show at the top of the box |
| message | a longer, more descriptive message to show underneath the title |
| associatedComponent | if this is non-null, it specifies the component that the alert window should be associated with. Depending on the look and feel, this might be used for positioning of the alert window. |
| static bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox | ( | AlertWindow::AlertIconType | iconType, |
| const String & | title, | ||
| const String & | message, | ||
| Component * | associatedComponent, | ||
| ModalComponentManager::Callback * | callback | ||
| ) | [static] |
Shows a dialog box with two buttons.
Ideal for ok/cancel or yes/no choices. The return key can also be used to trigger the first button, and the escape key for the second button.
If the callback parameter is null, the box is shown modally, and the method will block until the user has clicked the button (or pressed the escape or return keys). If the callback parameter is non-null, the box will be displayed and placed into a modal state, but this method will return immediately, and the callback will be invoked later when the user dismisses the box.
| iconType | the type of icon to show |
| title | the headline to show at the top of the box |
| message | a longer, more descriptive message to show underneath the title |
| associatedComponent | if this is non-null, it specifies the component that the alert window should be associated with. Depending on the look and feel, this might be used for positioning of the alert window. |
| callback | if this is non-null, the menu will be launched asynchronously, returning immediately, and the callback will receive a call to its modalStateFinished() when the box is dismissed, with its parameter being 1 if the ok button was pressed, or 0 for cancel, The callback object will be owned and deleted by the system, so make sure that it works safely and doesn't keep any references to objects that might be deleted before it gets called. |
| static int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox | ( | AlertWindow::AlertIconType | iconType, |
| const String & | title, | ||
| const String & | message, | ||
| Component * | associatedComponent, | ||
| ModalComponentManager::Callback * | callback | ||
| ) | [static] |
Shows a dialog box with three buttons.
Ideal for yes/no/cancel boxes.
The escape key can be used to trigger the third button.
If the callback parameter is null, the box is shown modally, and the method will block until the user has clicked the button (or pressed the escape or return keys). If the callback parameter is non-null, the box will be displayed and placed into a modal state, but this method will return immediately, and the callback will be invoked later when the user dismisses the box.
| iconType | the type of icon to show |
| title | the headline to show at the top of the box |
| message | a longer, more descriptive message to show underneath the title |
| associatedComponent | if this is non-null, it specifies the component that the alert window should be associated with. Depending on the look and feel, this might be used for positioning of the alert window. |
| callback | if this is non-null, the menu will be launched asynchronously, returning immediately, and the callback will receive a call to its modalStateFinished() when the box is dismissed, with its parameter being 1 if the "yes" button was pressed, 2 for the "no" button, or 0 if it was cancelled, The callback object will be owned and deleted by the system, so make sure that it works safely and doesn't keep any references to objects that might be deleted before it gets called. |