mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
31a29aed76
commit
3780f988f8
2 changed files with 130 additions and 139 deletions
|
|
@ -181,7 +181,7 @@
|
||||||
84F5592C0A223B0E00A8311C /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
|
84F5592C0A223B0E00A8311C /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
|
||||||
84F559480A223B8400A8311C /* Juce.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Juce.xcodeproj; path = ../../../../build/macosx/Juce.xcodeproj; sourceTree = SOURCE_ROOT; };
|
84F559480A223B8400A8311C /* Juce.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Juce.xcodeproj; path = ../../../../build/macosx/Juce.xcodeproj; sourceTree = SOURCE_ROOT; };
|
||||||
8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||||
8D0C4E970486CD37000505A6 /* Jucer.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Jucer.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
8D0C4E970486CD37000505A6 /* Jucer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Jucer.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
|
@ -228,7 +228,15 @@
|
||||||
20286C2AFDCF999611CA2CEA /* Sources */ = {
|
20286C2AFDCF999611CA2CEA /* Sources */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
84F5556B0A22381000A8311C /* src */,
|
84F555740A22381000A8311C /* model */,
|
||||||
|
84F5559F0A22381000A8311C /* properties */,
|
||||||
|
84F555AE0A22381000A8311C /* templates */,
|
||||||
|
84F555B10A22381000A8311C /* ui */,
|
||||||
|
84F555C90A22381000A8311C /* utility */,
|
||||||
|
84F555700A22381000A8311C /* BinaryData.cpp */,
|
||||||
|
84F555710A22381000A8311C /* BinaryData.h */,
|
||||||
|
84F555720A22381000A8311C /* jucer_Headers.h */,
|
||||||
|
84F555730A22381000A8311C /* jucer_Main.cpp */,
|
||||||
);
|
);
|
||||||
name = Sources;
|
name = Sources;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
@ -323,23 +331,6 @@
|
||||||
path = paintelements;
|
path = paintelements;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
84F5556B0A22381000A8311C /* src */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
84F555740A22381000A8311C /* model */,
|
|
||||||
84F5559F0A22381000A8311C /* properties */,
|
|
||||||
84F555AE0A22381000A8311C /* templates */,
|
|
||||||
84F555B10A22381000A8311C /* ui */,
|
|
||||||
84F555C90A22381000A8311C /* utility */,
|
|
||||||
84F555700A22381000A8311C /* BinaryData.cpp */,
|
|
||||||
84F555710A22381000A8311C /* BinaryData.h */,
|
|
||||||
84F555720A22381000A8311C /* jucer_Headers.h */,
|
|
||||||
84F555730A22381000A8311C /* jucer_Main.cpp */,
|
|
||||||
);
|
|
||||||
name = src;
|
|
||||||
path = ../../src;
|
|
||||||
sourceTree = SOURCE_ROOT;
|
|
||||||
};
|
|
||||||
84F555740A22381000A8311C /* model */ = {
|
84F555740A22381000A8311C /* model */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
|
@ -599,7 +590,7 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
LIBRARY_SEARCH_PATHS = ../../../bin;
|
LIBRARY_SEARCH_PATHS = ../../../../bin;
|
||||||
PREBINDING = NO;
|
PREBINDING = NO;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
|
|
@ -610,7 +601,7 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
LIBRARY_SEARCH_PATHS = ../../../bin;
|
LIBRARY_SEARCH_PATHS = ../../../../bin;
|
||||||
PREBINDING = NO;
|
PREBINDING = NO;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|
|
||||||
|
|
@ -1,118 +1,118 @@
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||||
Copyright 2004-7 by Raw Material Software ltd.
|
Copyright 2004-7 by Raw Material Software ltd.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
JUCE can be redistributed and/or modified under the terms of the
|
JUCE can be redistributed and/or modified under the terms of the
|
||||||
GNU General Public License, as published by the Free Software Foundation;
|
GNU General Public License, as published by the Free Software Foundation;
|
||||||
either version 2 of the License, or (at your option) any later version.
|
either version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
JUCE is distributed in the hope that it will be useful,
|
JUCE is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with JUCE; if not, visit www.gnu.org/licenses or write to the
|
along with JUCE; if not, visit www.gnu.org/licenses or write to the
|
||||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
Boston, MA 02111-1307 USA
|
Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
If you'd like to release a closed-source product which uses JUCE, commercial
|
If you'd like to release a closed-source product which uses JUCE, commercial
|
||||||
licenses are also available: visit www.rawmaterialsoftware.com/juce for
|
licenses are also available: visit www.rawmaterialsoftware.com/juce for
|
||||||
more information.
|
more information.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "jucer_Headers.h"
|
#include "jucer_Headers.h"
|
||||||
#include "ui/jucer_MainWindow.h"
|
#include "ui/jucer_MainWindow.h"
|
||||||
|
|
||||||
ApplicationCommandManager* commandManager = 0;
|
ApplicationCommandManager* commandManager = 0;
|
||||||
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
class JucerApplication : public JUCEApplication
|
class JucerApplication : public JUCEApplication
|
||||||
{
|
{
|
||||||
MainWindow* theMainWindow;
|
MainWindow* theMainWindow;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
JucerApplication()
|
JucerApplication()
|
||||||
: theMainWindow (0)
|
: theMainWindow (0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
~JucerApplication()
|
~JucerApplication()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
void initialise (const String& commandLine)
|
void initialise (const String& commandLine)
|
||||||
{
|
{
|
||||||
commandManager = new ApplicationCommandManager();
|
commandManager = new ApplicationCommandManager();
|
||||||
|
|
||||||
theMainWindow = new MainWindow();
|
theMainWindow = new MainWindow();
|
||||||
theMainWindow->setVisible (true);
|
theMainWindow->setVisible (true);
|
||||||
|
|
||||||
ImageCache::setCacheTimeout (30 * 1000);
|
ImageCache::setCacheTimeout (30 * 1000);
|
||||||
|
|
||||||
if (commandLine.trim().isNotEmpty()
|
if (commandLine.trim().isNotEmpty()
|
||||||
&& ! commandLine.trim().startsWithChar (T('-')))
|
&& ! commandLine.trim().startsWithChar (T('-')))
|
||||||
anotherInstanceStarted (commandLine);
|
anotherInstanceStarted (commandLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void shutdown()
|
void shutdown()
|
||||||
{
|
{
|
||||||
delete theMainWindow;
|
delete theMainWindow;
|
||||||
theMainWindow = 0;
|
theMainWindow = 0;
|
||||||
|
|
||||||
deleteAndZero (commandManager);
|
deleteAndZero (commandManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
void systemRequestedQuit()
|
void systemRequestedQuit()
|
||||||
{
|
{
|
||||||
if (theMainWindow == 0 || theMainWindow->closeAllDocuments())
|
if (theMainWindow == 0 || theMainWindow->closeAllDocuments())
|
||||||
{
|
{
|
||||||
deleteAndZero (theMainWindow);
|
deleteAndZero (theMainWindow);
|
||||||
|
|
||||||
StoredSettings::deleteInstance();
|
StoredSettings::deleteInstance();
|
||||||
|
|
||||||
quit (false);
|
quit (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
const String getApplicationName()
|
const String getApplicationName()
|
||||||
{
|
{
|
||||||
return T("The Jucer");
|
return T("The Jucer");
|
||||||
}
|
}
|
||||||
|
|
||||||
const String getApplicationVersion()
|
const String getApplicationVersion()
|
||||||
{
|
{
|
||||||
return String (JUCER_MAJOR_VERSION) + T(".") + String (JUCER_MINOR_VERSION);
|
return String (JUCER_MAJOR_VERSION) + T(".") + String (JUCER_MINOR_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool moreThanOneInstanceAllowed()
|
bool moreThanOneInstanceAllowed()
|
||||||
{
|
{
|
||||||
#ifndef JUCE_LINUX
|
#ifndef JUCE_LINUX
|
||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
return true; //xxx should be false but doesn't work on linux..
|
return true; //xxx should be false but doesn't work on linux..
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void anotherInstanceStarted (const String& commandLine)
|
void anotherInstanceStarted (const String& commandLine)
|
||||||
{
|
{
|
||||||
if (theMainWindow != 0)
|
if (theMainWindow != 0)
|
||||||
theMainWindow->openFile (commandLine.unquoted());
|
theMainWindow->openFile (commandLine.unquoted());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
START_JUCE_APPLICATION(JucerApplication)
|
START_JUCE_APPLICATION(JucerApplication)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue