1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Add MessageBoxOptions class for specifying a set of AlertWindow and NativeMessageBox options

- Add AlertWindow::show() and showAsync() methods that take a MessageBoxOptions argument
  - Add NativeMessageBox::show() and showAsync() methods that take a MessageBoxOptions argument
  - Update the DialogsDemo to demonstrate the new methods
  - Deprecate AlertWindow::showNativeDialogBox() in favour of the NativeMessageBox methods
  - Pass button strings specified in MesssageBoxOptions to native dialog boxes correctly
  - Use modern TaskDialog on Windows for the native dialog box where available
This commit is contained in:
ed 2021-07-21 16:34:12 +01:00
parent 89ca17cf34
commit 551d7b9c5b
54 changed files with 1357 additions and 595 deletions

View file

@ -222,7 +222,7 @@ private:
//==============================================================================
void showConnectionErrorMessage (const String& messageText)
{
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
"Connection error",
messageText,
"OK");
@ -273,7 +273,7 @@ private:
void showConnectionErrorMessage (const String& messageText)
{
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
"Connection error",
messageText,
"OK");
@ -403,7 +403,7 @@ private:
//==============================================================================
void handleConnectError (int failedPort)
{
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
"OSC Connection error",
"Error: could not connect to port " + String (failedPort),
"OK");
@ -412,7 +412,7 @@ private:
//==============================================================================
void handleDisconnectError()
{
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
"Unknown error",
"An unknown error occurred while trying to disconnect from UDP port.",
"OK");
@ -421,7 +421,7 @@ private:
//==============================================================================
void handleInvalidPortNumberEntered()
{
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
"Invalid port number",
"Error: you have entered an invalid UDP port number.",
"OK");