61 Component* associatedComponent =
nullptr);
76 void setMessage (
const String& message);
87 void addButton (
const String& name,
93 int getNumButtons()
const;
102 Button* getButton (
int index)
const;
112 void triggerButtonClick (
const String& buttonName);
120 void setEscapeKeyCancels (
bool shouldEscapeKeyCancel);
135 void addTextEditor (
const String& name,
136 const String& initialContents,
138 bool isPasswordBox =
false);
148 String getTextEditorContents (
const String& nameOfTextEditor)
const;
165 void addComboBox (
const String& name,
183 void addTextBlock (
const String& text);
206 void addCustomComponent (
Component* component);
211 int getNumCustomComponents()
const;
219 Component* getCustomComponent (
int index)
const;
229 Component* removeCustomComponent (
int index);
233 bool containsAnyExtraComponents()
const;
236 #if JUCE_MODAL_LOOPS_PERMITTED
256 Component* associatedComponent =
nullptr);
328 Component* associatedComponent =
nullptr,
374 Component* associatedComponent =
nullptr,
377 const String& button1Text,
378 const String& button2Text,
431 Component* associatedComponent =
nullptr,
434 const String& button1Text,
435 const String& button2Text,
436 const String& button3Text,
475 #if JUCE_MODAL_LOOPS_PERMITTED && ! defined (DOXYGEN)
484 [[deprecated (
"Use the NativeMessageBox methods instead for more options")]]
501 backgroundColourId = 0x1001800,
502 textColourId = 0x1001810,
503 outlineColourId = 0x1001820
524 virtual int getAlertBoxWindowFlags() = 0;
527 virtual int getAlertWindowButtonHeight() = 0;
529 virtual Font getAlertWindowTitleFont() = 0;
530 virtual Font getAlertWindowMessageFont() = 0;
531 virtual Font getAlertWindowFont() = 0;
537 static constexpr auto NoIcon = MessageBoxIconType::NoIcon;
538 static constexpr auto QuestionIcon = MessageBoxIconType::QuestionIcon;
539 static constexpr auto WarningIcon = MessageBoxIconType::WarningIcon;
540 static constexpr auto InfoIcon = MessageBoxIconType::InfoIcon;
554 bool keyPressed (
const KeyPress&)
override;
556 void lookAndFeelChanged()
override;
558 void userTriedToCloseWindow()
override;
560 int getDesktopWindowStyleFlags()
const override;
562 float getDesktopScaleFactor()
const override {
return desktopScale * Desktop::getInstance().getGlobalScaleFactor(); }
568 Label accessibleMessageLabel;
582 bool escapeKeyCancels =
true;
583 float desktopScale = 1.0f;
585 void exitAlert (
Button* button);
586 void updateLayout (
bool onlyIncreaseSize);
A window that displays a message and has buttons for the user to react to it.
ColourIds
A set of colour IDs to use to change the colour of various aspects of the alert box.
MessageBoxIconType getAlertType() const noexcept
Returns the type of alert icon that was specified when the window was created.
float getDesktopScaleFactor() const override
Returns the default scale factor to use for this component when it is placed on the desktop.
Holds a resizable array of primitive or copy-by-value objects.
A component that lets the user choose from a drop-down list of choices.
A class that imposes restrictions on a Component's size or position.
An object to take care of the logic for dragging components around with the mouse.
The base class for all JUCE user-interface objects.
Represents a particular font, including its size, style, etc.
A graphics context, used for drawing a component or image.
Represents a key press, including any modifier keys that are needed.
A component that displays a text string, and can optionally become a text editor when clicked.
Class used to create a set of options to pass to the AlertWindow and NativeMessageBox methods for sho...
Receives callbacks when a modal component is dismissed.
Contains position and status information about a mouse event.
An array designed for holding objects.
Manages a rectangle and allows geometric operations to be performed on it.
Objects of this type can be used to programmatically close message boxes.
A special array for holding a list of strings.
A Pre-formatted piece of text, which may contain multiple fonts and colours.
A base class for top-level windows.
MessageBoxIconType
The type of icon to show in the dialog box.
@ WarningIcon
An exclamation mark to indicate that the dialog is a warning about something and shouldn't be ignored...
@ QuestionIcon
A question-mark icon, for dialog boxes that need the user to answer a question.
@ NoIcon
No icon will be shown on the dialog box.
@ InfoIcon
An icon that indicates that the dialog box is just giving the user some information,...
This abstract base class is implemented by LookAndFeel classes to provide alert-window drawing functi...