Browse Source

Removed some old VC6 workarounds, and removed the VC6 exporter from the introjucer.

tags/2021-05-28
jules 13 years ago
parent
commit
5308aef329
22 changed files with 57 additions and 364 deletions
  1. +0
    -248
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h
  2. +2
    -3
      extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp
  3. +17
    -0
      extras/Introjucer/Source/Project/jucer_Project.cpp
  4. +1
    -0
      extras/Introjucer/Source/Project/jucer_Project.h
  5. +9
    -13
      modules/juce_audio_basics/buffers/juce_AudioDataConverters.h
  6. +1
    -4
      modules/juce_audio_formats/format/juce_AudioFormatWriter.h
  7. +1
    -4
      modules/juce_audio_utils/gui/juce_AudioThumbnail.h
  8. +1
    -1
      modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp
  9. +0
    -4
      modules/juce_core/juce_core.cpp
  10. +1
    -1
      modules/juce_core/juce_core.h
  11. +6
    -9
      modules/juce_core/maths/juce_Expression.cpp
  12. +15
    -23
      modules/juce_core/maths/juce_MathsFunctions.h
  13. +0
    -17
      modules/juce_core/system/juce_StandardHeader.h
  14. +1
    -1
      modules/juce_core/system/juce_TargetPlatform.h
  15. +0
    -3
      modules/juce_data_structures/values/juce_ValueTree.h
  16. +1
    -1
      modules/juce_events/broadcasters/juce_ListenerList.h
  17. +1
    -1
      modules/juce_graphics/fonts/juce_Font.cpp
  18. +0
    -7
      modules/juce_gui_basics/buttons/juce_Button.h
  19. +0
    -2
      modules/juce_gui_basics/components/juce_Component.cpp
  20. +0
    -7
      modules/juce_gui_basics/widgets/juce_ComboBox.h
  21. +0
    -7
      modules/juce_gui_basics/widgets/juce_Label.h
  22. +0
    -8
      modules/juce_gui_basics/widgets/juce_Slider.h

+ 0
- 248
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h View File

@@ -794,254 +794,6 @@ protected:
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2005); JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2005);
}; };
//==============================================================================
class MSVCProjectExporterVC6 : public MSVCProjectExporterBase
{
public:
//==============================================================================
MSVCProjectExporterVC6 (Project& project_, const ValueTree& settings_)
: MSVCProjectExporterBase (project_, settings_, "MSVC6")
{
name = getName();
}
static const char* getName() { return "Visual C++ 6.0"; }
static const char* getValueTreeTypeName() { return "MSVC6"; }
int getLaunchPreferenceOrderForCurrentOS()
{
#if JUCE_WINDOWS
return 1;
#else
return 0;
#endif
}
void launchProject() { getDSWFile().startAsProcess(); }
static MSVCProjectExporterVC6* createForSettings (Project& project, const ValueTree& settings)
{
if (settings.hasType (getValueTreeTypeName()))
return new MSVCProjectExporterVC6 (project, settings);
return nullptr;
}
//==============================================================================
void create()
{
{
MemoryOutputStream mo;
writeProject (mo);
overwriteFileIfDifferentOrThrow (getDSPFile(), mo);
}
{
MemoryOutputStream mo;
writeDSWFile (mo);
overwriteFileIfDifferentOrThrow (getDSWFile(), mo);
}
}
private:
File getDSPFile() const { return getProjectFile (".dsp"); }
File getDSWFile() const { return getProjectFile (".dsw"); }
//==============================================================================
String createConfigName (const BuildConfiguration& config) const
{
return projectName + " - Win32 " + config.getName().toString();
}
void writeProject (OutputStream& out)
{
const String defaultConfigName (createConfigName (*getConfiguration(0)));
String targetType, targetCode;
if (isLibraryDLL()) { targetType = "\"Win32 (x86) Dynamic-Link Library\""; targetCode = "0x0102"; }
else if (projectType.isLibrary()) { targetType = "\"Win32 (x86) Static Library\""; targetCode = "0x0104"; }
else if (projectType.isCommandLineApp()) { targetType = "\"Win32 (x86) Console Application\""; targetCode = "0x0103"; }
else { targetType = "\"Win32 (x86) Application\""; targetCode = "0x0101"; }
out << "# Microsoft Developer Studio Project File - Name=\"" << projectName
<< "\" - Package Owner=<4>" << newLine
<< "# Microsoft Developer Studio Generated Build File, Format Version 6.00" << newLine
<< "# ** DO NOT EDIT **" << newLine
<< "# TARGTYPE " << targetType << " " << targetCode << newLine
<< "CFG=" << defaultConfigName << newLine
<< "!MESSAGE This is not a valid makefile. To build this project using NMAKE," << newLine
<< "!MESSAGE use the Export Makefile command and run" << newLine
<< "!MESSAGE " << newLine
<< "!MESSAGE NMAKE /f \"" << projectName << ".mak.\"" << newLine
<< "!MESSAGE " << newLine
<< "!MESSAGE You can specify a configuration when running NMAKE" << newLine
<< "!MESSAGE by defining the macro CFG on the command line. For example:" << newLine
<< "!MESSAGE " << newLine
<< "!MESSAGE NMAKE /f \"" << projectName << ".mak\" CFG=\"" << defaultConfigName << '"' << newLine
<< "!MESSAGE " << newLine
<< "!MESSAGE Possible choices for configuration are:" << newLine
<< "!MESSAGE " << newLine;
for (ConfigIterator i (*this); i.next();)
out << "!MESSAGE \"" << createConfigName (*i) << "\" (based on " << targetType << ")" << newLine;
out << "!MESSAGE " << newLine
<< "# Begin Project" << newLine
<< "# PROP AllowPerConfigDependencies 0" << newLine
<< "# PROP Scc_ProjName \"\"" << newLine
<< "# PROP Scc_LocalPath \"\"" << newLine
<< "CPP=cl.exe" << newLine
<< "MTL=midl.exe" << newLine
<< "RSC=rc.exe" << newLine;
String targetList;
for (ConfigIterator config (*this); config.next();)
{
const String configName (createConfigName (*config));
targetList << "# Name \"" << configName << '"' << newLine;
const String binariesPath (getConfigTargetPath (*config));
const String targetBinary (FileHelpers::windowsStylePath (binariesPath + "/" + getBinaryFileForConfig (*config)));
const String optimisationFlag (((int) config->getOptimisationLevel().getValue() <= 1) ? "Od" : (config->getOptimisationLevel() == 2 ? "O2" : "O3"));
const String defines (getPreprocessorDefs (*config, " /D "));
const bool isDebug = (bool) config->isDebug().getValue();
const String extraDebugFlags (isDebug ? "/Gm /ZI /GZ" : "");
out << (config.index == 0 ? "!IF" : "!ELSEIF") << " \"$(CFG)\" == \"" << configName << '"' << newLine
<< "# PROP BASE Use_MFC 0" << newLine
<< "# PROP BASE Use_Debug_Libraries " << (isDebug ? "1" : "0") << newLine
<< "# PROP BASE Output_Dir \"" << binariesPath << '"' << newLine
<< "# PROP BASE Intermediate_Dir \"" << getIntermediatesPath (*config) << '"' << newLine
<< "# PROP BASE Target_Dir \"\"" << newLine
<< "# PROP Use_MFC 0" << newLine
<< "# PROP Use_Debug_Libraries " << (isDebug ? "1" : "0") << newLine
<< "# PROP Output_Dir \"" << binariesPath << '"' << newLine
<< "# PROP Intermediate_Dir \"" << getIntermediatesPath (*config) << '"' << newLine
<< "# PROP Ignore_Export_Lib 0" << newLine
<< "# PROP Target_Dir \"\"" << newLine
<< "# ADD BASE CPP /nologo /W3 /GX /" << optimisationFlag << " /D " << defines
<< " /YX /FD /c " << extraDebugFlags << " /Zm1024" << newLine
<< "# ADD CPP /nologo " << (isDebug ? "/MTd" : "/MT") << " /W3 /GR /GX /" << optimisationFlag
<< " /I " << replacePreprocessorTokens (*config, getHeaderSearchPaths (*config).joinIntoString (" /I "))
<< " /D " << defines << " /D \"_UNICODE\" /D \"UNICODE\" /FD /c /Zm1024 " << extraDebugFlags
<< " " << replacePreprocessorTokens (*config, getExtraCompilerFlags().toString()).trim() << newLine;
if (! isDebug)
out << "# SUBTRACT CPP /YX" << newLine;
if (! projectType.isLibrary())
out << "# ADD BASE MTL /nologo /D " << defines << " /mktyplib203 /win32" << newLine
<< "# ADD MTL /nologo /D " << defines << " /mktyplib203 /win32" << newLine;
out << "# ADD BASE RSC /l 0x40c /d " << defines << newLine
<< "# ADD RSC /l 0x40c /d " << defines << newLine
<< "BSC32=bscmake.exe" << newLine
<< "# ADD BASE BSC32 /nologo" << newLine
<< "# ADD BSC32 /nologo" << newLine;
if (projectType.isLibrary())
{
out << "LIB32=link.exe -lib" << newLine
<< "# ADD BASE LIB32 /nologo" << newLine
<< "# ADD LIB32 /nologo /out:\"" << targetBinary << '"' << newLine;
}
else
{
out << "LINK32=link.exe" << newLine
<< "# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386" << newLine
<< "# ADD LINK32 \"C:\\Program Files\\Microsoft Visual Studio\\VC98\\LIB\\shell32.lib\" " // This is avoid debug information corruption when mixing Platform SDK
<< "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "
<< (isDebug ? " /debug" : "")
<< " /nologo /machine:I386 /out:\"" << targetBinary << "\" "
<< (isLibraryDLL() ? "/dll" : (msvcIsWindowsSubsystem ? "/subsystem:windows "
: "/subsystem:console "))
<< replacePreprocessorTokens (*config, getExtraLinkerFlags().toString()).trim() << newLine;
}
}
out << "!ENDIF" << newLine
<< "# Begin Target" << newLine
<< targetList;
for (int i = 0; i < groups.size(); ++i)
if (groups.getReference(i).getNumChildren() > 0)
writeFiles (out, groups.getReference(i));
out << "# End Target" << newLine
<< "# End Project" << newLine;
}
void writeFile (OutputStream& out, const RelativePath& file, const bool excludeFromBuild)
{
jassert (file.getRoot() == RelativePath::buildTargetFolder);
out << "# Begin Source File" << newLine
<< "SOURCE=" << file.toWindowsStyle().quoted() << newLine;
if (excludeFromBuild)
out << "# PROP Exclude_From_Build 1" << newLine;
out << "# End Source File" << newLine;
}
void writeFiles (OutputStream& out, const Project::Item& projectItem)
{
if (projectItem.isGroup())
{
out << "# Begin Group \"" << projectItem.getName() << '"' << newLine
<< "# PROP Default_Filter \"cpp;c;cc;cxx;rc;def;r;odl;idl;hpj;bat\"" << newLine;
for (int i = 0; i < projectItem.getNumChildren(); ++i)
writeFiles (out, projectItem.getChild (i));
out << "# End Group" << newLine;
}
else if (projectItem.shouldBeAddedToTargetProject())
{
const RelativePath path (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder);
writeFile (out, path, projectItem.shouldBeAddedToBinaryResources() || (shouldFileBeCompiledByDefault (path) && ! projectItem.shouldBeCompiled()));
}
}
void writeGroup (OutputStream& out, const String& groupName, const Array<RelativePath>& files)
{
if (files.size() > 0)
{
out << "# Begin Group \"" << groupName << '"' << newLine;
for (int i = 0; i < files.size(); ++i)
if (files.getReference(i).hasFileExtension ("cpp;cc;c;cxx;h;hpp;hxx"))
writeFile (out, files.getReference(i), false);
out << "# End Group" << newLine;
}
}
void writeDSWFile (OutputStream& out)
{
out << "Microsoft Developer Studio Workspace File, Format Version 6.00 " << newLine
<< "Project: \"" << projectName << "\" = .\\" << getDSPFile().getFileName() << " - Package Owner=<4>" << newLine
<< "Package=<5>" << newLine
<< "{{{" << newLine
<< "}}}" << newLine
<< "Package=<4>" << newLine
<< "{{{" << newLine
<< "}}}" << newLine
<< "Global:" << newLine
<< "Package=<5>" << newLine
<< "{{{" << newLine
<< "}}}" << newLine
<< "Package=<3>" << newLine
<< "{{{" << newLine
<< "}}}" << newLine;
}
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC6);
};
//============================================================================== //==============================================================================
class MSVCProjectExporterVC2010 : public MSVCProjectExporterBase class MSVCProjectExporterVC2010 : public MSVCProjectExporterBase
{ {


+ 2
- 3
extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp View File

@@ -41,7 +41,6 @@ StringArray ProjectExporter::getExporterNames()
StringArray s; StringArray s;
s.add (XCodeProjectExporter::getNameMac()); s.add (XCodeProjectExporter::getNameMac());
s.add (XCodeProjectExporter::getNameiOS()); s.add (XCodeProjectExporter::getNameiOS());
s.add (MSVCProjectExporterVC6::getName());
s.add (MSVCProjectExporterVC2005::getName()); s.add (MSVCProjectExporterVC2005::getName());
s.add (MSVCProjectExporterVC2008::getName()); s.add (MSVCProjectExporterVC2008::getName());
s.add (MSVCProjectExporterVC2010::getName()); s.add (MSVCProjectExporterVC2010::getName());
@@ -68,7 +67,6 @@ ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int
{ {
case 0: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter ::getValueTreeTypeName (false)), false); break; case 0: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter ::getValueTreeTypeName (false)), false); break;
case 1: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter ::getValueTreeTypeName (true)), true); break; case 1: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter ::getValueTreeTypeName (true)), true); break;
case 2: exp = new MSVCProjectExporterVC6 (project, ValueTree (MSVCProjectExporterVC6 ::getValueTreeTypeName())); break;
case 3: exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break; case 3: exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break;
case 4: exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break; case 4: exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break;
case 5: exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break; case 5: exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break;
@@ -97,7 +95,8 @@ ProjectExporter* ProjectExporter::createNewExporter (Project& project, const Str
ProjectExporter* ProjectExporter::createExporter (Project& project, const ValueTree& settings) ProjectExporter* ProjectExporter::createExporter (Project& project, const ValueTree& settings)
{ {
ProjectExporter* exp = MSVCProjectExporterVC6 ::createForSettings (project, settings);
ProjectExporter* exp = nullptr;
if (exp == nullptr) exp = MSVCProjectExporterVC2005::createForSettings (project, settings); if (exp == nullptr) exp = MSVCProjectExporterVC2005::createForSettings (project, settings);
if (exp == nullptr) exp = MSVCProjectExporterVC2008::createForSettings (project, settings); if (exp == nullptr) exp = MSVCProjectExporterVC2008::createForSettings (project, settings);
if (exp == nullptr) exp = MSVCProjectExporterVC2010::createForSettings (project, settings); if (exp == nullptr) exp = MSVCProjectExporterVC2010::createForSettings (project, settings);


+ 17
- 0
extras/Introjucer/Source/Project/jucer_Project.cpp View File

@@ -120,6 +120,8 @@ void Project::setMissingDefaultValues()
if (! projectRoot.getChildWithName (Tags::exporters).isValid()) if (! projectRoot.getChildWithName (Tags::exporters).isValid())
createDefaultExporters(); createDefaultExporters();
else
removeDefunctExporters();
getProjectType().setMissingProjectProperties (*this); getProjectType().setMissingProjectProperties (*this);
@@ -173,6 +175,21 @@ void Project::moveOldPropertyFromProjectToAllExporters (Identifier name)
} }
} }
void Project::removeDefunctExporters()
{
ValueTree exporters (projectRoot.getChildWithName (Tags::exporters));
for (;;)
{
ValueTree oldVC6Exporter (exporters.getChildWithName ("MSVC6"));
if (oldVC6Exporter.isValid())
exporters.removeChild (oldVC6Exporter, nullptr);
else
break;
}
}
void Project::addDefaultModules (bool shouldCopyFilesLocally) void Project::addDefaultModules (bool shouldCopyFilesLocally)
{ {
addModule ("juce_core", shouldCopyFilesLocally); addModule ("juce_core", shouldCopyFilesLocally);


+ 1
- 0
extras/Introjucer/Source/Project/jucer_Project.h View File

@@ -264,6 +264,7 @@ private:
void updateOldStyleConfigList(); void updateOldStyleConfigList();
void moveOldPropertyFromProjectToAllExporters (Identifier name); void moveOldPropertyFromProjectToAllExporters (Identifier name);
void removeDefunctExporters();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Project); JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Project);
}; };


+ 9
- 13
modules/juce_audio_basics/buffers/juce_AudioDataConverters.h View File

@@ -332,7 +332,7 @@ public:
typename Endianness, typename Endianness,
typename InterleavingType, typename InterleavingType,
typename Constness> typename Constness>
class Pointer
class Pointer : private InterleavingType // (inherited for EBCO)
{ {
public: public:
//============================================================================== //==============================================================================
@@ -352,22 +352,20 @@ public:
For non-interleaved data, use the other constructor. For non-interleaved data, use the other constructor.
*/ */
Pointer (typename Constness::VoidType* sourceData, int numInterleavedChannels) noexcept Pointer (typename Constness::VoidType* sourceData, int numInterleavedChannels) noexcept
: data (Constness::toVoidPtr (sourceData)),
interleaving (numInterleavedChannels)
: InterleavingType (numInterleavedChannels), data (Constness::toVoidPtr (sourceData))
{ {
} }
/** Creates a copy of another pointer. */ /** Creates a copy of another pointer. */
Pointer (const Pointer& other) noexcept Pointer (const Pointer& other) noexcept
: data (other.data),
interleaving (other.interleaving)
: InterleavingType (other), data (other.data)
{ {
} }
Pointer& operator= (const Pointer& other) noexcept Pointer& operator= (const Pointer& other) noexcept
{ {
InterleavingType::operator= (other);
data = other.data; data = other.data;
interleaving.copyFrom (other.interleaving);
return *this; return *this;
} }
@@ -412,10 +410,10 @@ public:
inline Pointer& operator++() noexcept { advance(); return *this; } inline Pointer& operator++() noexcept { advance(); return *this; }
/** Moves the pointer back to the previous sample. */ /** Moves the pointer back to the previous sample. */
inline Pointer& operator--() noexcept { interleaving.advanceDataBy (data, -1); return *this; }
inline Pointer& operator--() noexcept { this->advanceDataBy (data, -1); return *this; }
/** Adds a number of samples to the pointer's position. */ /** Adds a number of samples to the pointer's position. */
Pointer& operator+= (int samplesToJump) noexcept { interleaving.advanceDataBy (data, samplesToJump); return *this; }
Pointer& operator+= (int samplesToJump) noexcept { this->advanceDataBy (data, samplesToJump); return *this; }
/** Writes a stream of samples into this pointer from another pointer. /** Writes a stream of samples into this pointer from another pointer.
This will copy the specified number of samples, converting between formats appropriately. This will copy the specified number of samples, converting between formats appropriately.
@@ -466,7 +464,7 @@ public:
void clearSamples (int numSamples) const noexcept void clearSamples (int numSamples) const noexcept
{ {
Pointer dest (*this); Pointer dest (*this);
dest.interleaving.clear (dest.data, numSamples);
dest.clear (dest.data, numSamples);
} }
/** Returns true if the pointer is using a floating-point format. */ /** Returns true if the pointer is using a floating-point format. */
@@ -482,7 +480,7 @@ public:
int getNumInterleavedChannels() const noexcept { return (int) this->numInterleavedChannels; } int getNumInterleavedChannels() const noexcept { return (int) this->numInterleavedChannels; }
/** Returns the number of bytes between the start address of each sample. */ /** Returns the number of bytes between the start address of each sample. */
int getNumBytesBetweenSamples() const noexcept { return interleaving.getNumBytesBetweenSamples (data); }
int getNumBytesBetweenSamples() const noexcept { return InterleavingType::getNumBytesBetweenSamples (data); }
/** Returns the accuracy of this format when represented as a 32-bit integer. /** Returns the accuracy of this format when represented as a 32-bit integer.
This is the smallest number above 0 that can be represented in the sample format, converted to This is the smallest number above 0 that can be represented in the sample format, converted to
@@ -497,10 +495,8 @@ public:
private: private:
//============================================================================== //==============================================================================
SampleFormat data; SampleFormat data;
InterleavingType interleaving; // annoyingly, making the interleaving type a superclass to take
// advantage of EBCO causes an internal compiler error in VC6..
inline void advance() noexcept { interleaving.advanceData (data); }
inline void advance() noexcept { this->advanceData (data); }
Pointer operator++ (int); // private to force you to use the more efficient pre-increment! Pointer operator++ (int); // private to force you to use the more efficient pre-increment!
Pointer operator-- (int); Pointer operator-- (int);


+ 1
- 4
modules/juce_audio_formats/format/juce_AudioFormatWriter.h View File

@@ -199,11 +199,8 @@ public:
*/ */
void setDataReceiver (IncomingDataReceiver* receiver); void setDataReceiver (IncomingDataReceiver* receiver);
#ifndef DOXYGEN
class Buffer; // (only public for VC6 compatibility)
#endif
private: private:
class Buffer;
friend class ScopedPointer<Buffer>; friend class ScopedPointer<Buffer>;
ScopedPointer<Buffer> buffer; ScopedPointer<Buffer> buffer;
}; };


+ 1
- 4
modules/juce_audio_utils/gui/juce_AudioThumbnail.h View File

@@ -189,15 +189,12 @@ public:
/** Returns the hash code that was set by setSource() or setReader(). */ /** Returns the hash code that was set by setSource() or setReader(). */
int64 getHashCode() const; int64 getHashCode() const;
#ifndef DOXYGEN
class LevelDataSource; // (this is only public to avoid a VC6 bug)
#endif
private: private:
//============================================================================== //==============================================================================
AudioFormatManager& formatManagerToUse; AudioFormatManager& formatManagerToUse;
AudioThumbnailCache& cache; AudioThumbnailCache& cache;
class LevelDataSource;
struct MinMaxValue; struct MinMaxValue;
class ThumbData; class ThumbData;
class CachedWindow; class CachedWindow;


+ 1
- 1
modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp View File

@@ -459,7 +459,7 @@ void MidiKeyboardComponent::drawWhiteNote (int midiNoteNumber,
if (! text.isEmpty()) if (! text.isEmpty())
{ {
g.setColour (textColour); g.setColour (textColour);
g.setFont (Font (12.0f, keyWidth * 0.9f).withHorizontalScale (0.8f));
g.setFont (Font (jmin (12.0f, keyWidth * 0.9f)).withHorizontalScale (0.8f));
Justification justification (Justification::centredBottom); Justification justification (Justification::centredBottom);


+ 0
- 4
modules/juce_core/juce_core.cpp View File

@@ -150,10 +150,6 @@ namespace juce
//============================================================================== //==============================================================================
#elif JUCE_WINDOWS #elif JUCE_WINDOWS
#if JUCE_VC6
#pragma warning (disable: 4309 4305)
#endif
#include "native/juce_win32_ComSmartPtr.h" #include "native/juce_win32_ComSmartPtr.h"
#include "native/juce_win32_Files.cpp" #include "native/juce_win32_Files.cpp"
#include "native/juce_win32_Network.cpp" #include "native/juce_win32_Network.cpp"


+ 1
- 1
modules/juce_core/juce_core.h View File

@@ -105,7 +105,7 @@
#pragma pack (push, 8) // this is set explicitly in case the app is using a different packing size. #pragma pack (push, 8) // this is set explicitly in case the app is using a different packing size.
#pragma warning (push) #pragma warning (push)
#pragma warning (disable: 4786) // (old vc6 warning about long class names)
#pragma warning (disable: 4786) // (long class name warning)
#ifdef __INTEL_COMPILER #ifdef __INTEL_COMPILER
#pragma warning (disable: 1125) #pragma warning (disable: 1125)
#endif #endif


+ 6
- 9
modules/juce_core/maths/juce_Expression.cpp View File

@@ -83,9 +83,6 @@ struct Expression::Helpers
{ {
typedef ReferenceCountedObjectPtr<Term> TermPtr; typedef ReferenceCountedObjectPtr<Term> TermPtr;
// This helper function is needed to work around VC6 scoping bugs
static inline const TermPtr& getTermFor (const Expression& exp) noexcept { return exp.term; }
static void checkRecursionDepth (const int depth) static void checkRecursionDepth (const int depth)
{ {
if (depth > 256) if (depth > 256)
@@ -208,7 +205,7 @@ struct Expression::Helpers
TermPtr resolve (const Scope& scope, int recursionDepth) TermPtr resolve (const Scope& scope, int recursionDepth)
{ {
checkRecursionDepth (recursionDepth); checkRecursionDepth (recursionDepth);
return getTermFor (scope.getSymbolValue (symbol))->resolve (scope, recursionDepth + 1);
return scope.getSymbolValue (symbol).term->resolve (scope, recursionDepth + 1);
} }
Type getType() const noexcept { return symbolType; } Type getType() const noexcept { return symbolType; }
@@ -220,7 +217,7 @@ struct Expression::Helpers
{ {
checkRecursionDepth (recursionDepth); checkRecursionDepth (recursionDepth);
visitor.useSymbol (Symbol (scope.getScopeUID(), symbol)); visitor.useSymbol (Symbol (scope.getScopeUID(), symbol));
getTermFor (scope.getSymbolValue (symbol))->visitAllSymbols (visitor, scope, recursionDepth + 1);
scope.getSymbolValue (symbol).term->visitAllSymbols (visitor, scope, recursionDepth + 1);
} }
void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int /*recursionDepth*/) void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int /*recursionDepth*/)
@@ -245,7 +242,7 @@ struct Expression::Helpers
Type getType() const noexcept { return functionType; } Type getType() const noexcept { return functionType; }
Term* clone() const { return new Function (functionName, parameters); } Term* clone() const { return new Function (functionName, parameters); }
int getNumInputs() const { return parameters.size(); } int getNumInputs() const { return parameters.size(); }
Term* getInput (int i) const { return getTermFor (parameters [i]); }
Term* getInput (int i) const { return parameters.getReference(i).term; }
String getName() const { return functionName; } String getName() const { return functionName; }
TermPtr resolve (const Scope& scope, int recursionDepth) TermPtr resolve (const Scope& scope, int recursionDepth)
@@ -257,7 +254,7 @@ struct Expression::Helpers
{ {
HeapBlock<double> params ((size_t) numParams); HeapBlock<double> params ((size_t) numParams);
for (int i = 0; i < numParams; ++i) for (int i = 0; i < numParams; ++i)
params[i] = getTermFor (parameters.getReference(i))->resolve (scope, recursionDepth + 1)->toDouble();
params[i] = parameters.getReference(i).term->resolve (scope, recursionDepth + 1)->toDouble();
result = scope.evaluateFunction (functionName, params, numParams); result = scope.evaluateFunction (functionName, params, numParams);
} }
@@ -272,7 +269,7 @@ struct Expression::Helpers
int getInputIndexFor (const Term* possibleInput) const int getInputIndexFor (const Term* possibleInput) const
{ {
for (int i = 0; i < parameters.size(); ++i) for (int i = 0; i < parameters.size(); ++i)
if (getTermFor (parameters.getReference(i)) == possibleInput)
if (parameters.getReference(i).term == possibleInput)
return i; return i;
return -1; return -1;
@@ -287,7 +284,7 @@ struct Expression::Helpers
for (int i = 0; i < parameters.size(); ++i) for (int i = 0; i < parameters.size(); ++i)
{ {
s << getTermFor (parameters.getReference(i))->toString();
s << parameters.getReference(i).term->toString();
if (i < parameters.size() - 1) if (i < parameters.size() - 1)
s << ", "; s << ", ";


+ 15
- 23
modules/juce_core/maths/juce_MathsFunctions.h View File

@@ -79,7 +79,7 @@ typedef unsigned int uint32;
typedef int64 pointer_sized_int; typedef int64 pointer_sized_int;
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */ /** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
typedef uint64 pointer_sized_uint; typedef uint64 pointer_sized_uint;
#elif JUCE_MSVC && ! JUCE_VC6
#elif JUCE_MSVC
/** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */ /** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
typedef _W64 int pointer_sized_int; typedef _W64 int pointer_sized_int;
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */ /** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
@@ -227,14 +227,12 @@ inline bool isPositiveAndBelow (Type valueToTest, Type upperLimit) noexcept
return Type() <= valueToTest && valueToTest < upperLimit; return Type() <= valueToTest && valueToTest < upperLimit;
} }
#if ! JUCE_VC6
template <> template <>
inline bool isPositiveAndBelow (const int valueToTest, const int upperLimit) noexcept inline bool isPositiveAndBelow (const int valueToTest, const int upperLimit) noexcept
{ {
jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero.. jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero..
return static_cast <unsigned int> (valueToTest) < static_cast <unsigned int> (upperLimit); return static_cast <unsigned int> (valueToTest) < static_cast <unsigned int> (upperLimit);
} }
#endif
/** Returns true if a value is at least zero, and also less than or equal to a specified upper limit. /** Returns true if a value is at least zero, and also less than or equal to a specified upper limit.
This is basically a quicker way to write: This is basically a quicker way to write:
@@ -248,14 +246,12 @@ inline bool isPositiveAndNotGreaterThan (Type valueToTest, Type upperLimit) noex
return Type() <= valueToTest && valueToTest <= upperLimit; return Type() <= valueToTest && valueToTest <= upperLimit;
} }
#if ! JUCE_VC6
template <> template <>
inline bool isPositiveAndNotGreaterThan (const int valueToTest, const int upperLimit) noexcept inline bool isPositiveAndNotGreaterThan (const int valueToTest, const int upperLimit) noexcept
{ {
jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero.. jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero..
return static_cast <unsigned int> (valueToTest) <= static_cast <unsigned int> (upperLimit); return static_cast <unsigned int> (valueToTest) <= static_cast <unsigned int> (upperLimit);
} }
#endif
//============================================================================== //==============================================================================
/** Handy function to swap two values. */ /** Handy function to swap two values. */
@@ -265,25 +261,21 @@ inline void swapVariables (Type& variable1, Type& variable2)
std::swap (variable1, variable2); std::swap (variable1, variable2);
} }
#if JUCE_VC6
#define numElementsInArray(X) (sizeof((X)) / sizeof(0[X]))
#else
/** Handy function for getting the number of elements in a simple const C array.
E.g.
@code
static int myArray[] = { 1, 2, 3 };
/** Handy function for getting the number of elements in a simple const C array.
E.g.
@code
static int myArray[] = { 1, 2, 3 };
int numElements = numElementsInArray (myArray) // returns 3
@endcode
*/
template <typename Type, int N>
inline int numElementsInArray (Type (&array)[N])
{
(void) array; // (required to avoid a spurious warning in MS compilers)
(void) sizeof (0[array]); // This line should cause an error if you pass an object with a user-defined subscript operator
return N;
}
#endif
int numElements = numElementsInArray (myArray) // returns 3
@endcode
*/
template <typename Type, int N>
inline int numElementsInArray (Type (&array)[N])
{
(void) array; // (required to avoid a spurious warning in MS compilers)
(void) sizeof (0[array]); // This line should cause an error if you pass an object with a user-defined subscript operator
return N;
}
//============================================================================== //==============================================================================
// Some useful maths functions that aren't always present with all compilers and build settings. // Some useful maths functions that aren't always present with all compilers and build settings.


+ 0
- 17
modules/juce_core/system/juce_StandardHeader.h View File

@@ -62,23 +62,6 @@
// Now we'll include any OS headers we need.. (at this point we are outside the Juce namespace). // Now we'll include any OS headers we need.. (at this point we are outside the Juce namespace).
#if JUCE_MSVC #if JUCE_MSVC
#if JUCE_VC6
#pragma warning (disable: 4284 4786) // (spurious VC6 warnings)
namespace std // VC6 doesn't have sqrt/sin/cos/tan/abs in std, so declare them here:
{
template <typename Type> Type abs (Type a) { if (a < 0) return -a; return a; }
template <typename Type> Type tan (Type a) { return static_cast<Type> (::tan (static_cast<double> (a))); }
template <typename Type> Type sin (Type a) { return static_cast<Type> (::sin (static_cast<double> (a))); }
template <typename Type> Type asin (Type a) { return static_cast<Type> (::asin (static_cast<double> (a))); }
template <typename Type> Type cos (Type a) { return static_cast<Type> (::cos (static_cast<double> (a))); }
template <typename Type> Type sqrt (Type a) { return static_cast<Type> (::sqrt (static_cast<double> (a))); }
template <typename Type> Type floor (Type a) { return static_cast<Type> (::floor (static_cast<double> (a))); }
template <typename Type> Type ceil (Type a) { return static_cast<Type> (::ceil (static_cast<double> (a))); }
template <typename Type> Type atan2 (Type a, Type b) { return static_cast<Type> (::atan2 (static_cast<double> (a), static_cast<double> (b))); }
}
#endif
#pragma warning (push) #pragma warning (push)
#pragma warning (disable: 4514 4245 4100) #pragma warning (disable: 4514 4245 4100)
#endif #endif


+ 1
- 1
modules/juce_core/system/juce_TargetPlatform.h View File

@@ -182,7 +182,7 @@ namespace JuceDummyNamespace {}
#define JUCE_VC7_OR_EARLIER 1 #define JUCE_VC7_OR_EARLIER 1
#if _MSC_VER < 1300 #if _MSC_VER < 1300
#define JUCE_VC6 1
#warning "MSVC 6.0 is no longer supported!"
#endif #endif
#endif #endif
#endif #endif


+ 0
- 3
modules/juce_data_structures/values/juce_ValueTree.h View File

@@ -504,9 +504,6 @@ private:
void createListOfChildren (OwnedArray<ValueTree>&) const; void createListOfChildren (OwnedArray<ValueTree>&) const;
void reorderChildren (const OwnedArray<ValueTree>&, UndoManager*); void reorderChildren (const OwnedArray<ValueTree>&, UndoManager*);
#if JUCE_MSVC && ! DOXYGEN
public: // (workaround for VC6)
#endif
explicit ValueTree (SharedObject*); explicit ValueTree (SharedObject*);
}; };


+ 1
- 1
modules/juce_events/broadcasters/juce_ListenerList.h View File

@@ -69,7 +69,7 @@ template <class ListenerClass,
class ArrayType = Array <ListenerClass*> > class ArrayType = Array <ListenerClass*> >
class ListenerList class ListenerList
{ {
// Horrible macros required to support VC6/7..
// Horrible macros required to support VC7..
#ifndef DOXYGEN #ifndef DOXYGEN
#if JUCE_VC8_OR_EARLIER #if JUCE_VC8_OR_EARLIER
#define LL_TEMPLATE(a) typename P##a, typename Q##a #define LL_TEMPLATE(a) typename P##a, typename Q##a


+ 1
- 1
modules/juce_graphics/fonts/juce_Font.cpp View File

@@ -81,7 +81,7 @@ public:
} }
int replaceIndex = 0; int replaceIndex = 0;
int bestLastUsageCount = std::numeric_limits<int>::max();
size_t bestLastUsageCount = std::numeric_limits<int>::max();
for (i = faces.size(); --i >= 0;) for (i = faces.size(); --i >= 0;)
{ {


+ 0
- 7
modules/juce_gui_basics/buttons/juce_Button.h View File

@@ -32,9 +32,6 @@
#include "../windows/juce_TooltipWindow.h" #include "../windows/juce_TooltipWindow.h"
#include "../layout/juce_ComponentBuilder.h" #include "../layout/juce_ComponentBuilder.h"
#if JUCE_VC6
#define Listener ButtonListener
#endif
//============================================================================== //==============================================================================
/** /**
@@ -518,8 +515,4 @@ private:
typedef Button::Listener ButtonListener; typedef Button::Listener ButtonListener;
#endif #endif
#if JUCE_VC6
#undef Listener
#endif
#endif // __JUCE_BUTTON_JUCEHEADER__ #endif // __JUCE_BUTTON_JUCEHEADER__

+ 0
- 2
modules/juce_gui_basics/components/juce_Component.cpp View File

@@ -462,9 +462,7 @@ Component::Component (const String& name)
Component::~Component() Component::~Component()
{ {
#if ! JUCE_VC6 // (access to private union not allowed in VC6)
static_jassert (sizeof (flags) <= sizeof (componentFlags)); static_jassert (sizeof (flags) <= sizeof (componentFlags));
#endif
componentListeners.call (&ComponentListener::componentBeingDeleted, *this); componentListeners.call (&ComponentListener::componentBeingDeleted, *this);


+ 0
- 7
modules/juce_gui_basics/widgets/juce_ComboBox.h View File

@@ -28,9 +28,6 @@
#include "juce_Label.h" #include "juce_Label.h"
#if JUCE_VC6
#define Listener SliderListener
#endif
//============================================================================== //==============================================================================
/** /**
@@ -415,8 +412,4 @@ private:
/** This typedef is just for compatibility with old code - newer code should use the ComboBox::Listener class directly. */ /** This typedef is just for compatibility with old code - newer code should use the ComboBox::Listener class directly. */
typedef ComboBox::Listener ComboBoxListener; typedef ComboBox::Listener ComboBoxListener;
#if JUCE_VC6
#undef Listener
#endif
#endif // __JUCE_COMBOBOX_JUCEHEADER__ #endif // __JUCE_COMBOBOX_JUCEHEADER__

+ 0
- 7
modules/juce_gui_basics/widgets/juce_Label.h View File

@@ -28,9 +28,6 @@
#include "juce_TextEditor.h" #include "juce_TextEditor.h"
#if JUCE_VC6
#define Listener ButtonListener
#endif
//============================================================================== //==============================================================================
/** /**
@@ -344,8 +341,4 @@ private:
/** This typedef is just for compatibility with old code - newer code should use the Label::Listener class directly. */ /** This typedef is just for compatibility with old code - newer code should use the Label::Listener class directly. */
typedef Label::Listener LabelListener; typedef Label::Listener LabelListener;
#if JUCE_VC6
#undef Listener
#endif
#endif // __JUCE_LABEL_JUCEHEADER__ #endif // __JUCE_LABEL_JUCEHEADER__

+ 0
- 8
modules/juce_gui_basics/widgets/juce_Slider.h View File

@@ -29,10 +29,6 @@
#include "juce_Label.h" #include "juce_Label.h"
#include "../buttons/juce_Button.h" #include "../buttons/juce_Button.h"
#if JUCE_VC6
#define Listener LabelListener
#endif
//============================================================================== //==============================================================================
/** /**
A slider control for changing a value. A slider control for changing a value.
@@ -887,8 +883,4 @@ private:
/** This typedef is just for compatibility with old code - newer code should use the Slider::Listener class directly. */ /** This typedef is just for compatibility with old code - newer code should use the Slider::Listener class directly. */
typedef Slider::Listener SliderListener; typedef Slider::Listener SliderListener;
#if JUCE_VC6
#undef Listener
#endif
#endif // __JUCE_SLIDER_JUCEHEADER__ #endif // __JUCE_SLIDER_JUCEHEADER__

Loading…
Cancel
Save