mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
Added a button size option to the PreferencesPanel. Added an operator for writing Strings to std::wcout. Fixed a clipping error in audio float to int conversion. Made the introjucer cope with backslashes in filenames when used on unix.
This commit is contained in:
parent
025b20bdc3
commit
a493cfee4d
10 changed files with 86 additions and 57 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 <class charT, class traits>
|
||||
std::basic_ostream <charT, traits>& JUCE_CALLTYPE operator<< (std::basic_ostream <charT, traits>& stream, const String& stringToWrite)
|
||||
template <class traits>
|
||||
std::basic_ostream <char, traits>& JUCE_CALLTYPE operator<< (std::basic_ostream <char, traits>& 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 <class traits>
|
||||
std::basic_ostream <wchar_t, traits>& JUCE_CALLTYPE operator<< (std::basic_ostream <wchar_t, traits>& 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 */
|
||||
|
|
|
|||
|
|
@ -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); }
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 <class charT, class traits>
|
||||
std::basic_ostream <charT, traits>& JUCE_CALLTYPE operator<< (std::basic_ostream <charT, traits>& stream, const String& stringToWrite)
|
||||
template <class traits>
|
||||
std::basic_ostream <char, traits>& JUCE_CALLTYPE operator<< (std::basic_ostream <char, traits>& 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 <class traits>
|
||||
std::basic_ostream <wchar_t, traits>& JUCE_CALLTYPE operator<< (std::basic_ostream <wchar_t, traits>& 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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue