195 const String& sourceFilename,
257 void setApplicationReturnValue (
int newReturnValue)
noexcept;
282 static int main (
int argc,
const char* argv[]);
284 static void appWillTerminateByForce();
286 static CreateInstanceFunction createInstance;
289 static void* iOSCustomDelegate;
292 virtual bool initialiseApp();
295 bool sendCommandLineToPreexistingInstance();
301 int appReturnValue = 0;
302 bool stillInitialising =
true;
304 struct MultipleInstanceHandler;
312#if JUCE_CATCH_UNHANDLED_EXCEPTIONS || DOXYGEN
324 #define JUCE_CATCH_EXCEPTION \
325 catch (const std::exception& e) { juce::JUCEApplicationBase::sendUnhandledException (&e, __FILE__, __LINE__); } \
326 catch (...) { juce::JUCEApplicationBase::sendUnhandledException (nullptr, __FILE__, __LINE__); }
330 #define JUCE_CATCH_EXCEPTION
Abstract base class for application classes.
bool isInitialising() const noexcept
Returns true if the application hasn't yet completed its initialise() method and entered the main eve...
virtual void systemRequestedQuit()=0
Called when the operating system is trying to close the application.
virtual void initialise(const String &commandLineParameters)=0
Called when the application starts.
virtual const String getApplicationName()=0
Returns the application's name.
virtual void memoryWarningReceived()
Called by the operating system to indicate that you should reduce your memory footprint.
virtual void suspended()=0
This method is called when the application is being put into background mode by the operating system.
virtual void resumed()=0
This method is called when the application is being woken from background mode by the operating syste...
virtual void anotherInstanceStarted(const String &commandLine)=0
Indicates that the user has tried to start up another instance of the app.
virtual bool backButtonPressed()
This will be called when the back button on a device is pressed.
static JUCEApplicationBase * getInstance() noexcept
Returns the global instance of the application object that's running.
virtual const String getApplicationVersion()=0
Returns the application's version number.
static bool isStandaloneApp() noexcept
Returns true if this executable is running as an app (as opposed to being a plugin or other kind of s...
virtual void unhandledException(const std::exception *, const String &sourceFilename, int lineNumber)=0
If any unhandled exceptions make it through to the message dispatch loop, this callback will be trigg...
virtual bool moreThanOneInstanceAllowed()=0
Checks whether multiple instances of the app are allowed.
int getApplicationReturnValue() const noexcept
Returns the value that has been set as the application's exit code.
A special array for holding a list of strings.