JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_Application.cpp
Go to the documentation of this file.
1 /*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
31
32//==============================================================================
37
40
43
45
50
51//==============================================================================
56
61
63{
65 {
66 result.setInfo (TRANS ("Quit"),
67 TRANS ("Quits the application"),
68 "Application", 0);
69
71 }
72}
73
75{
77 {
79 return true;
80 }
81
82 return false;
83}
84
85//==============================================================================
86bool JUCEApplication::initialiseApp()
87{
88 if (JUCEApplicationBase::initialiseApp())
89 {
90 #if JUCE_MAC
91 initialiseMacMainMenu(); // (needs to get the app's name)
92 #endif
93
94 return true;
95 }
96
97 return false;
98}
99
100} // namespace juce
A command target publishes a list of command IDs that it can perform.
Holds a resizable array of primitive or copy-by-value objects.
Definition juce_Array.h:56
void add(const ElementType &newElement)
Appends a new element at the end of the array.
Definition juce_Array.h:418
static void quit()
Signals that the main message loop should stop and the application should terminate.
static JUCEApplicationBase * getInstance() noexcept
Returns the global instance of the application object that's running.
An instance of this class is used to specify initialisation and shutdown code for the application.
void anotherInstanceStarted(const String &commandLine) override
Indicates that the user has tried to start up another instance of the app.
static JUCEApplication *JUCE_CALLTYPE getInstance() noexcept
Returns the global instance of the application object being run.
ApplicationCommandTarget * getNextCommandTarget() override
This must return the next target to try after this one.
void suspended() override
This method is called when the application is being put into background mode by the operating system.
void getAllCommands(Array< CommandID > &) override
This must return a complete list of commands that this target can handle.
void getCommandInfo(CommandID, ApplicationCommandInfo &) override
This must provide details about one of the commands that this target can perform.
void systemRequestedQuit() override
Called when the operating system is trying to close the application.
bool moreThanOneInstanceAllowed() override
Checks whether multiple instances of the app are allowed.
void unhandledException(const std::exception *e, const String &sourceFilename, int lineNumber) override
If any unhandled exceptions make it through to the message dispatch loop, this callback will be trigg...
~JUCEApplication() override
Destructor.
bool perform(const InvocationInfo &) override
This must actually perform the specified command.
JUCEApplication()
Constructs a JUCE app object.
void resumed() override
This method is called when the application is being woken from background mode by the operating syste...
Represents a key press, including any modifier keys that are needed.
@ commandModifier
Command key flag - on windows this is the same as the CTRL key flag.
The JUCE String class!
Definition juce_String.h:53
#define TRANS(stringLiteral)
Uses the LocalisedStrings class to translate the given string literal.
#define jassertfalse
This will always cause an assertion failure.
#define JUCE_CALLTYPE
This macro defines the C calling convention used as the standard for JUCE calls.
@ quit
This command ID should be used to send a "Quit the App" command.
JUCE Namespace.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
Definition juce_Memory.h:88
int CommandID
A type used to hold the unique ID for an application command.
Holds information describing an application command.
Array< KeyPress > defaultKeypresses
A list of zero or more keypresses that should be used as the default keys for this command.
void setInfo(const String &shortName, const String &description, const String &categoryName, int flags) noexcept
Sets a number of the structures values at once.
Contains contextual details about the invocation of a command.
CommandID commandID
The UID of the command that should be performed.