42 if (
auto* comp = setUpAlert())
43 comp->enterModalState (
true, ModalCallbackFunction::create (std::move (recipient)),
true);
45 NullCheckedInvocation::invoke (recipient, 0);
48 int runSync()
override
50 #if JUCE_MODAL_LOOPS_PERMITTED
52 return comp->runModalLoop();
62 if (alert->isCurrentlyModal())
63 alert->exitModalState();
71 auto* component = options.getAssociatedComponent();
74 : LookAndFeel::getDefaultLookAndFeel();
76 alert = lf.createAlertWindow (options.getTitle(),
78 options.getButtonText (0),
79 options.getButtonText (1),
80 options.getButtonText (2),
81 options.getIconType(),
82 options.getNumButtons(),
92 if (
auto* parent = options.getParentComponent())
94 parent->addAndMakeVisible (alert);
96 if (options.getAssociatedComponent() ==
nullptr)
97 alert->setCentrePosition (parent->getLocalBounds().getCentre());
100 alert->setAlwaysOnTop (WindowUtils::areThereAnyAlwaysOnTopWindows());
111 return std::make_unique<AlertWindowImpl> (
opts);