30 const bool hasProgressBar,
31 const bool hasCancelButton,
32 const int cancellingTimeOutMs,
33 const String& cancelButtonText,
35 :
Thread (
"ThreadWithProgressWindow"),
41 .createAlertWindow (
title, {},
45 componentToCentreAround));
89 if (! (threadStillRunning &&
alertWindow->isCurrentlyModal (
false)))
107#if JUCE_MODAL_LOOPS_PERMITTED
108bool ThreadWithProgressWindow::runThread (
const int priority)
110 launchThread (priority);
112 while (isTimerRunning())
115 return ! wasCancelledByUser;
Definition juce_Component.h:36
static LookAndFeel & getDefaultLookAndFeel() noexcept
Definition juce_LookAndFeel.cpp:107
static MessageManager * getInstance()
Definition juce_MessageManager.cpp:47
Definition juce_String.h:53
bool isEmpty() const noexcept
Definition juce_String.h:310
void startThread()
Definition juce_Thread.cpp:122
Thread(const String &threadName, size_t threadStackSize=0)
Definition juce_Thread.cpp:26
bool stopThread(int timeOutMilliseconds)
Definition juce_Thread.cpp:208
bool isThreadRunning() const
Definition juce_Thread.cpp:155
~ThreadWithProgressWindow() override
Definition juce_ThreadWithProgressWindow.cpp:54
void setStatusMessage(const String &newStatusMessage)
Definition juce_ThreadWithProgressWindow.cpp:79
void timerCallback() override
Definition juce_ThreadWithProgressWindow.cpp:85
bool wasCancelledByUser
Definition juce_ThreadWithProgressWindow.h:170
CriticalSection messageLock
Definition juce_ThreadWithProgressWindow.h:168
ThreadWithProgressWindow(const String &windowTitle, bool hasProgressBar, bool hasCancelButton, int timeOutMsWhenCancelling=10000, const String &cancelButtonText=String(), Component *componentToCentreAround=nullptr)
Definition juce_ThreadWithProgressWindow.cpp:29
void launchThread(int priority=5)
Definition juce_ThreadWithProgressWindow.cpp:59
double progress
Definition juce_ThreadWithProgressWindow.h:165
void setProgress(double newProgress)
Definition juce_ThreadWithProgressWindow.cpp:74
const int timeOutMsWhenCancelling
Definition juce_ThreadWithProgressWindow.h:169
std::unique_ptr< AlertWindow > alertWindow
Definition juce_ThreadWithProgressWindow.h:166
virtual void threadComplete(bool userPressedCancel)
Definition juce_ThreadWithProgressWindow.cpp:105
String message
Definition juce_ThreadWithProgressWindow.h:167
void stopTimer() noexcept
Definition juce_Timer.cpp:357
void startTimer(int intervalInMilliseconds) noexcept
Definition juce_Timer.cpp:332
static const char * title
Definition pugl.h:1747
#define TRANS(stringLiteral)
Definition juce_LocalisedStrings.h:208
#define JUCE_ASSERT_MESSAGE_THREAD
Definition juce_MessageManager.h:473
Definition carla_juce.cpp:31
CriticalSection::ScopedLockType ScopedLock
Definition juce_CriticalSection.h:186
@ NoIcon
Definition juce_MessageBoxOptions.h:32
#define false
Definition ordinals.h:83