diff --git a/extras/Introjucer/Source/Project/jucer_Project.cpp b/extras/Introjucer/Source/Project/jucer_Project.cpp index 06378eaa9d..574a36f844 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.cpp +++ b/extras/Introjucer/Source/Project/jucer_Project.cpp @@ -242,7 +242,8 @@ const File Project::resolveFilename (String filename) const if (filename.isEmpty()) return File::nonexistent; - filename = replacePreprocessorDefs (getPreprocessorDefs(), filename); + filename = replacePreprocessorDefs (getPreprocessorDefs(), filename) + .replaceCharacter ('\\', '/'); if (File::isAbsolutePath (filename)) return File (filename); diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 76042f1ec7..8d04f230ad 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -17324,13 +17324,9 @@ void ValueTree::SharedObject::sendPropertyChangeMessage (ValueTree& tree, const void ValueTree::SharedObject::sendPropertyChangeMessage (const Identifier& property) { ValueTree tree (this); - ValueTree::SharedObject* t = this; - while (t != 0) - { + for (ValueTree::SharedObject* t = this; t != 0; t = t->parent) t->sendPropertyChangeMessage (tree, property); - t = t->parent; - } } void ValueTree::SharedObject::sendChildAddedMessage (ValueTree& tree, ValueTree& child) @@ -17346,13 +17342,9 @@ void ValueTree::SharedObject::sendChildAddedMessage (ValueTree& tree, ValueTree& void ValueTree::SharedObject::sendChildAddedMessage (ValueTree child) { ValueTree tree (this); - ValueTree::SharedObject* t = this; - while (t != 0) - { + for (ValueTree::SharedObject* t = this; t != 0; t = t->parent) t->sendChildAddedMessage (tree, child); - t = t->parent; - } } void ValueTree::SharedObject::sendChildRemovedMessage (ValueTree& tree, ValueTree& child) @@ -17368,13 +17360,9 @@ void ValueTree::SharedObject::sendChildRemovedMessage (ValueTree& tree, ValueTre void ValueTree::SharedObject::sendChildRemovedMessage (ValueTree child) { ValueTree tree (this); - ValueTree::SharedObject* t = this; - while (t != 0) - { + for (ValueTree::SharedObject* t = this; t != 0; t = t->parent) t->sendChildRemovedMessage (tree, child); - t = t->parent; - } } void ValueTree::SharedObject::sendChildOrderChangedMessage (ValueTree& tree) @@ -17390,13 +17378,9 @@ void ValueTree::SharedObject::sendChildOrderChangedMessage (ValueTree& tree) void ValueTree::SharedObject::sendChildOrderChangedMessage() { ValueTree tree (this); - ValueTree::SharedObject* t = this; - while (t != 0) - { + for (ValueTree::SharedObject* t = this; t != 0; t = t->parent) t->sendChildOrderChangedMessage (tree); - t = t->parent; - } } void ValueTree::SharedObject::sendParentChangeMessage() @@ -76214,6 +76198,17 @@ PreferencesPanel::~PreferencesPanel() { } +int PreferencesPanel::getButtonSize() const throw() +{ + return buttonSize; +} + +void PreferencesPanel::setButtonSize (int newSize) +{ + buttonSize = newSize; + resized(); +} + void PreferencesPanel::addSettingsPage (const String& title, const Drawable* icon, const Drawable* overIcon, diff --git a/juce_amalgamated.h b/juce_amalgamated.h index 0de763f3bb..760f04f516 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -73,7 +73,7 @@ namespace JuceDummyNamespace {} */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 53 -#define JUCE_BUILDNUMBER 59 +#define JUCE_BUILDNUMBER 60 /** Current Juce version number. @@ -2236,7 +2236,11 @@ public: /** Implements a memory read/write barrier. */ static void memoryBarrier() throw(); - JUCE_ALIGN(8) + #if JUCE_64BIT + JUCE_ALIGN (8) + #else + JUCE_ALIGN (4) + #endif /** The raw value that this class operates on. This is exposed publically in case you need to manipulate it directly @@ -5455,15 +5459,24 @@ JUCE_API bool JUCE_CALLTYPE operator>= (const String& string1, const String& str /** Case-sensitive comparison of two strings. */ JUCE_API bool JUCE_CALLTYPE operator<= (const String& string1, const String& string2) throw(); -/** This streaming override allows you to pass a juce String directly into std output streams. - This is very handy for writing strings to std::cout, std::cerr, etc. +/** This operator allows you to write a juce String directly to std output streams. + This is handy for writing strings to std::cout, std::cerr, etc. */ -template -std::basic_ostream & JUCE_CALLTYPE operator<< (std::basic_ostream & stream, const String& stringToWrite) +template +std::basic_ostream & JUCE_CALLTYPE operator<< (std::basic_ostream & stream, const String& stringToWrite) { return stream << stringToWrite.toUTF8().getAddress(); } +/** This operator allows you to write a juce String directly to std output streams. + This is handy for writing strings to std::wcout, std::wcerr, etc. +*/ +template +std::basic_ostream & JUCE_CALLTYPE operator<< (std::basic_ostream & stream, const String& stringToWrite) +{ + return stream << stringToWrite.toWideCharPointer(); +} + /** Writes a string to an OutputStream as UTF8. */ JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const String& text); @@ -34702,8 +34715,8 @@ public: inline void skip (int numSamples) throw() { data += numSamples; } inline float getAsFloatLE() const throw() { return (float) ((1.0 / (1.0 + maxValue)) * (int32) ByteOrder::swapIfBigEndian (*data)); } inline float getAsFloatBE() const throw() { return (float) ((1.0 / (1.0 + maxValue)) * (int32) ByteOrder::swapIfLittleEndian (*data)); } - inline void setAsFloatLE (float newValue) throw() { *data = ByteOrder::swapIfBigEndian ((uint32) jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + maxValue)))); } - inline void setAsFloatBE (float newValue) throw() { *data = ByteOrder::swapIfLittleEndian ((uint32) jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + maxValue)))); } + inline void setAsFloatLE (float newValue) throw() { *data = ByteOrder::swapIfBigEndian ((uint32) (maxValue * jlimit (-1.0f, 1.0f, newValue))); } + inline void setAsFloatBE (float newValue) throw() { *data = ByteOrder::swapIfLittleEndian ((uint32) (maxValue * jlimit (-1.0f, 1.0f, newValue))); } inline int32 getAsInt32LE() const throw() { return (int32) ByteOrder::swapIfBigEndian (*data); } inline int32 getAsInt32BE() const throw() { return (int32) ByteOrder::swapIfLittleEndian (*data); } inline void setAsInt32LE (int32 newValue) throw() { *data = ByteOrder::swapIfBigEndian ((uint32) newValue); } @@ -63588,6 +63601,12 @@ public: /** Changes the current page being displayed. */ void setCurrentPage (const String& pageName); + /** Returns the size of the buttons shown along the top. */ + int getButtonSize() const throw(); + + /** Changes the size of the buttons shown along the top. */ + void setButtonSize (int newSize); + /** @internal */ void resized(); /** @internal */ diff --git a/src/audio/dsp/juce_AudioDataConverters.h b/src/audio/dsp/juce_AudioDataConverters.h index 834f48bfb8..0d48eb83db 100644 --- a/src/audio/dsp/juce_AudioDataConverters.h +++ b/src/audio/dsp/juce_AudioDataConverters.h @@ -206,8 +206,8 @@ public: inline void skip (int numSamples) throw() { data += numSamples; } inline float getAsFloatLE() const throw() { return (float) ((1.0 / (1.0 + maxValue)) * (int32) ByteOrder::swapIfBigEndian (*data)); } inline float getAsFloatBE() const throw() { return (float) ((1.0 / (1.0 + maxValue)) * (int32) ByteOrder::swapIfLittleEndian (*data)); } - inline void setAsFloatLE (float newValue) throw() { *data = ByteOrder::swapIfBigEndian ((uint32) jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + maxValue)))); } - inline void setAsFloatBE (float newValue) throw() { *data = ByteOrder::swapIfLittleEndian ((uint32) jlimit ((int) -maxValue, (int) maxValue, roundToInt (newValue * (1.0 + maxValue)))); } + inline void setAsFloatLE (float newValue) throw() { *data = ByteOrder::swapIfBigEndian ((uint32) (maxValue * jlimit (-1.0f, 1.0f, newValue))); } + inline void setAsFloatBE (float newValue) throw() { *data = ByteOrder::swapIfLittleEndian ((uint32) (maxValue * jlimit (-1.0f, 1.0f, newValue))); } inline int32 getAsInt32LE() const throw() { return (int32) ByteOrder::swapIfBigEndian (*data); } inline int32 getAsInt32BE() const throw() { return (int32) ByteOrder::swapIfLittleEndian (*data); } inline void setAsInt32LE (int32 newValue) throw() { *data = ByteOrder::swapIfBigEndian ((uint32) newValue); } diff --git a/src/containers/juce_ValueTree.cpp b/src/containers/juce_ValueTree.cpp index 837f7c65c9..eff69b21a7 100644 --- a/src/containers/juce_ValueTree.cpp +++ b/src/containers/juce_ValueTree.cpp @@ -241,13 +241,9 @@ void ValueTree::SharedObject::sendPropertyChangeMessage (ValueTree& tree, const void ValueTree::SharedObject::sendPropertyChangeMessage (const Identifier& property) { ValueTree tree (this); - ValueTree::SharedObject* t = this; - while (t != 0) - { + for (ValueTree::SharedObject* t = this; t != 0; t = t->parent) t->sendPropertyChangeMessage (tree, property); - t = t->parent; - } } void ValueTree::SharedObject::sendChildAddedMessage (ValueTree& tree, ValueTree& child) @@ -263,13 +259,9 @@ void ValueTree::SharedObject::sendChildAddedMessage (ValueTree& tree, ValueTree& void ValueTree::SharedObject::sendChildAddedMessage (ValueTree child) { ValueTree tree (this); - ValueTree::SharedObject* t = this; - while (t != 0) - { + for (ValueTree::SharedObject* t = this; t != 0; t = t->parent) t->sendChildAddedMessage (tree, child); - t = t->parent; - } } void ValueTree::SharedObject::sendChildRemovedMessage (ValueTree& tree, ValueTree& child) @@ -285,13 +277,9 @@ void ValueTree::SharedObject::sendChildRemovedMessage (ValueTree& tree, ValueTre void ValueTree::SharedObject::sendChildRemovedMessage (ValueTree child) { ValueTree tree (this); - ValueTree::SharedObject* t = this; - while (t != 0) - { + for (ValueTree::SharedObject* t = this; t != 0; t = t->parent) t->sendChildRemovedMessage (tree, child); - t = t->parent; - } } void ValueTree::SharedObject::sendChildOrderChangedMessage (ValueTree& tree) @@ -307,13 +295,9 @@ void ValueTree::SharedObject::sendChildOrderChangedMessage (ValueTree& tree) void ValueTree::SharedObject::sendChildOrderChangedMessage() { ValueTree tree (this); - ValueTree::SharedObject* t = this; - while (t != 0) - { + for (ValueTree::SharedObject* t = this; t != 0; t = t->parent) t->sendChildOrderChangedMessage (tree); - t = t->parent; - } } void ValueTree::SharedObject::sendParentChangeMessage() diff --git a/src/core/juce_StandardHeader.h b/src/core/juce_StandardHeader.h index 740b5a8f56..536e64804f 100644 --- a/src/core/juce_StandardHeader.h +++ b/src/core/juce_StandardHeader.h @@ -33,7 +33,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 53 -#define JUCE_BUILDNUMBER 59 +#define JUCE_BUILDNUMBER 60 /** Current Juce version number. diff --git a/src/gui/components/special/juce_PreferencesPanel.cpp b/src/gui/components/special/juce_PreferencesPanel.cpp index 7d7daa25c8..d75b13cc59 100644 --- a/src/gui/components/special/juce_PreferencesPanel.cpp +++ b/src/gui/components/special/juce_PreferencesPanel.cpp @@ -43,6 +43,17 @@ PreferencesPanel::~PreferencesPanel() { } +int PreferencesPanel::getButtonSize() const throw() +{ + return buttonSize; +} + +void PreferencesPanel::setButtonSize (int newSize) +{ + buttonSize = newSize; + resized(); +} + //============================================================================== void PreferencesPanel::addSettingsPage (const String& title, const Drawable* icon, diff --git a/src/gui/components/special/juce_PreferencesPanel.h b/src/gui/components/special/juce_PreferencesPanel.h index 1729915305..fa96f75ce8 100644 --- a/src/gui/components/special/juce_PreferencesPanel.h +++ b/src/gui/components/special/juce_PreferencesPanel.h @@ -124,6 +124,12 @@ public: /** Changes the current page being displayed. */ void setCurrentPage (const String& pageName); + /** Returns the size of the buttons shown along the top. */ + int getButtonSize() const throw(); + + /** Changes the size of the buttons shown along the top. */ + void setButtonSize (int newSize); + //============================================================================== /** @internal */ void resized(); diff --git a/src/memory/juce_Atomic.h b/src/memory/juce_Atomic.h index 8385673d4d..24cb7641ad 100644 --- a/src/memory/juce_Atomic.h +++ b/src/memory/juce_Atomic.h @@ -137,7 +137,11 @@ public: static void memoryBarrier() throw(); //============================================================================== - JUCE_ALIGN(8) + #if JUCE_64BIT + JUCE_ALIGN (8) + #else + JUCE_ALIGN (4) + #endif /** The raw value that this class operates on. This is exposed publically in case you need to manipulate it directly diff --git a/src/text/juce_String.h b/src/text/juce_String.h index 1c132227f7..29b58276a6 100644 --- a/src/text/juce_String.h +++ b/src/text/juce_String.h @@ -1304,15 +1304,24 @@ JUCE_API bool JUCE_CALLTYPE operator>= (const String& string1, const String& str JUCE_API bool JUCE_CALLTYPE operator<= (const String& string1, const String& string2) throw(); //============================================================================== -/** This streaming override allows you to pass a juce String directly into std output streams. - This is very handy for writing strings to std::cout, std::cerr, etc. +/** This operator allows you to write a juce String directly to std output streams. + This is handy for writing strings to std::cout, std::cerr, etc. */ -template -std::basic_ostream & JUCE_CALLTYPE operator<< (std::basic_ostream & stream, const String& stringToWrite) +template +std::basic_ostream & JUCE_CALLTYPE operator<< (std::basic_ostream & stream, const String& stringToWrite) { return stream << stringToWrite.toUTF8().getAddress(); } +/** This operator allows you to write a juce String directly to std output streams. + This is handy for writing strings to std::wcout, std::wcerr, etc. +*/ +template +std::basic_ostream & JUCE_CALLTYPE operator<< (std::basic_ostream & stream, const String& stringToWrite) +{ + return stream << stringToWrite.toWideCharPointer(); +} + /** Writes a string to an OutputStream as UTF8. */ JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const String& text);