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

New class NativeMessageBox, with static methods for showing several types of native alert boxes.

This commit is contained in:
Julian Storer 2011-03-30 12:20:58 +01:00
parent fb80724977
commit 927cebcdbb
31 changed files with 4618 additions and 3402 deletions

View file

@ -3342,19 +3342,40 @@ void PlatformUtilities::beep()
//==============================================================================
bool AlertWindow::showNativeDialogBox (const String& title,
const String& bodyText,
bool isOkCancel)
void JUCE_CALLTYPE NativeMessageBox::showMessageBox (AlertWindow::AlertIconType iconType,
const String& title, const String& message,
Component* associatedComponent)
{
// use a non-native one for the time being..
if (isOkCancel)
return AlertWindow::showOkCancelBox (AlertWindow::NoIcon, title, bodyText);
else
AlertWindow::showMessageBox (AlertWindow::NoIcon, title, bodyText);
return true;
AlertWindow::showMessageBox (AlertWindow::NoIcon, title, message);
}
void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIconType iconType,
const String& title, const String& message,
Component* associatedComponent)
{
AlertWindow::showMessageBoxAsync (AlertWindow::NoIcon, title, message);
}
bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType iconType,
const String& title, const String& message,
Component* associatedComponent,
ModalComponentManager::Callback* callback)
{
return AlertWindow::showOkCancelBox (iconType, title, message, String::empty, String::empty,
associatedComponent, callback);
}
int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconType iconType,
const String& title, const String& message,
Component* associatedComponent,
ModalComponentManager::Callback* callback)
{
return AlertWindow::showYesNoCancelBox (iconType, title, message,
String::empty, String::empty, String::empty,
associatedComponent, callback);
}
//==============================================================================
const int KeyPress::spaceKey = XK_space & 0xff;
const int KeyPress::returnKey = XK_Return & 0xff;