@@ -4628,7 +4628,7 @@ public: | |||
: mainSymbol + "." + member; | |||
} | |||
bool referencesSymbol (const String& s, const EvaluationContext& c, int recursionDepth) const | |||
bool referencesSymbol (const String& s, const EvaluationContext* c, int recursionDepth) const | |||
{ | |||
if (s == mainSymbol) | |||
return true; | |||
@@ -4638,7 +4638,7 @@ public: | |||
try | |||
{ | |||
return c.getSymbolValue (mainSymbol, member).term->referencesSymbol (s, c, recursionDepth); | |||
return c != 0 && c->getSymbolValue (mainSymbol, member).term->referencesSymbol (s, c, recursionDepth); | |||
} | |||
catch (EvaluationError&) | |||
{ | |||
@@ -4673,7 +4673,7 @@ public: | |||
Term* getInput (int i) const { return parameters [i]; } | |||
const String getFunctionName() const { return functionName; } | |||
bool referencesSymbol (const String& s, const EvaluationContext& c, int recursionDepth) const | |||
bool referencesSymbol (const String& s, const EvaluationContext* c, int recursionDepth) const | |||
{ | |||
for (int i = 0; i < parameters.size(); ++i) | |||
if (parameters.getUnchecked(i)->referencesSymbol (s, c, recursionDepth)) | |||
@@ -4744,7 +4744,7 @@ public: | |||
return "-" + input->toString(); | |||
} | |||
bool referencesSymbol (const String& s, const EvaluationContext& c, int recursionDepth) const | |||
bool referencesSymbol (const String& s, const EvaluationContext* c, int recursionDepth) const | |||
{ | |||
return input->referencesSymbol (s, c, recursionDepth); | |||
} | |||
@@ -4771,7 +4771,7 @@ public: | |||
int getNumInputs() const { return 2; } | |||
Term* getInput (int index) const { return index == 0 ? static_cast<Term*> (left) : (index == 1 ? static_cast<Term*> (right) : 0); } | |||
bool referencesSymbol (const String& s, const EvaluationContext& c, int recursionDepth) const | |||
bool referencesSymbol (const String& s, const EvaluationContext* c, int recursionDepth) const | |||
{ | |||
return left->referencesSymbol (s, c, recursionDepth) | |||
|| right->referencesSymbol (s, c, recursionDepth); | |||
@@ -5391,7 +5391,7 @@ const Expression Expression::withRenamedSymbol (const String& oldSymbol, const S | |||
return newExpression; | |||
} | |||
bool Expression::referencesSymbol (const String& symbol, const EvaluationContext& context) const | |||
bool Expression::referencesSymbol (const String& symbol, const EvaluationContext* context) const | |||
{ | |||
return term->referencesSymbol (symbol, context, 0); | |||
} | |||
@@ -5436,7 +5436,7 @@ int Expression::Term::getOperatorPrecedence() const | |||
return 0; | |||
} | |||
bool Expression::Term::referencesSymbol (const String&, const EvaluationContext&, int) const | |||
bool Expression::Term::referencesSymbol (const String&, const EvaluationContext*, int) const | |||
{ | |||
return false; | |||
} | |||
@@ -29857,15 +29857,15 @@ const String MidiMessage::getMidiNoteName (int note, bool useSharps, bool includ | |||
return String::empty; | |||
} | |||
const double MidiMessage::getMidiNoteInHertz (int noteNumber) throw() | |||
const double MidiMessage::getMidiNoteInHertz (int noteNumber, const double frequencyOfA) throw() | |||
{ | |||
noteNumber -= 12 * 6 + 9; // now 0 = A440 | |||
return 440.0 * pow (2.0, noteNumber / 12.0); | |||
noteNumber -= 12 * 6 + 9; // now 0 = A | |||
return frequencyOfA * pow (2.0, noteNumber / 12.0); | |||
} | |||
const String MidiMessage::getGMInstrumentName (const int n) | |||
{ | |||
const char *names[] = | |||
const char* names[] = | |||
{ | |||
"Acoustic Grand Piano", "Bright Acoustic Piano", "Electric Grand Piano", "Honky-tonk Piano", | |||
"Electric Piano 1", "Electric Piano 2", "Harpsichord", "Clavinet", "Celesta", "Glockenspiel", | |||
@@ -80260,11 +80260,7 @@ bool RelativeCoordinate::references (const String& coordName, const Expression:: | |||
{ | |||
try | |||
{ | |||
if (context != 0) | |||
return term.referencesSymbol (coordName, *context); | |||
Expression::EvaluationContext defaultContext; | |||
return term.referencesSymbol (coordName, defaultContext); | |||
return term.referencesSymbol (coordName, context); | |||
} | |||
catch (...) | |||
{} | |||
@@ -80282,18 +80278,12 @@ const String RelativeCoordinate::toString() const | |||
return term.toString(); | |||
} | |||
void RelativeCoordinate::renameSymbolIfUsed (const String& oldName, const String& newName, | |||
const Expression::EvaluationContext* context) | |||
void RelativeCoordinate::renameSymbolIfUsed (const String& oldName, const String& newName) | |||
{ | |||
jassert (newName.isNotEmpty() && newName.toLowerCase().containsOnly ("abcdefghijklmnopqrstuvwxyz0123456789_")); | |||
if (term.referencesSymbol (oldName, *context)) | |||
{ | |||
const double oldValue = resolve (context); | |||
if (term.referencesSymbol (oldName, 0)) | |||
term = term.withRenamedSymbol (oldName, newName); | |||
moveToAbsolute (oldValue, context); | |||
} | |||
} | |||
RelativePoint::RelativePoint() | |||
@@ -80350,10 +80340,10 @@ const String RelativePoint::toString() const | |||
return x.toString() + ", " + y.toString(); | |||
} | |||
void RelativePoint::renameSymbolIfUsed (const String& oldName, const String& newName, const Expression::EvaluationContext* context) | |||
void RelativePoint::renameSymbolIfUsed (const String& oldName, const String& newName) | |||
{ | |||
x.renameSymbolIfUsed (oldName, newName, context); | |||
y.renameSymbolIfUsed (oldName, newName, context); | |||
x.renameSymbolIfUsed (oldName, newName); | |||
y.renameSymbolIfUsed (oldName, newName); | |||
} | |||
bool RelativePoint::isDynamic() const | |||
@@ -80424,13 +80414,12 @@ const String RelativeRectangle::toString() const | |||
return left.toString() + ", " + top.toString() + ", " + right.toString() + ", " + bottom.toString(); | |||
} | |||
void RelativeRectangle::renameSymbolIfUsed (const String& oldName, const String& newName, | |||
const Expression::EvaluationContext* context) | |||
void RelativeRectangle::renameSymbolIfUsed (const String& oldName, const String& newName) | |||
{ | |||
left.renameSymbolIfUsed (oldName, newName, context); | |||
right.renameSymbolIfUsed (oldName, newName, context); | |||
top.renameSymbolIfUsed (oldName, newName, context); | |||
bottom.renameSymbolIfUsed (oldName, newName, context); | |||
left.renameSymbolIfUsed (oldName, newName); | |||
right.renameSymbolIfUsed (oldName, newName); | |||
top.renameSymbolIfUsed (oldName, newName); | |||
bottom.renameSymbolIfUsed (oldName, newName); | |||
} | |||
RelativePointPath::RelativePointPath() | |||
@@ -242719,8 +242708,7 @@ private: | |||
{ | |||
if (rects->right <= x + w && rects->bottom <= y + h) | |||
{ | |||
// (need to move this one pixel to the left because of a win32 bug) | |||
const int cx = jmax (x, (int) rects->left - 1); | |||
const int cx = jmax (x, (int) rects->left); | |||
contextClip.addWithoutMerging (Rectangle<int> (cx - x, rects->top - y, rects->right - cx, rects->bottom - rects->top) | |||
.getIntersection (clipBounds)); | |||
} | |||
@@ -265473,7 +265461,8 @@ const File File::getLinkedTarget() const | |||
NSString* dest = [[NSFileManager defaultManager] destinationOfSymbolicLinkAtPath: juceStringToNS (getFullPathName()) error: nil]; | |||
#else | |||
NSString* dest = [[NSFileManager defaultManager] pathContentOfSymbolicLinkAtPath: juceStringToNS (getFullPathName())]; | |||
// (the cast here avoids a deprecation warning) | |||
NSString* dest = [((id) [NSFileManager defaultManager]) pathContentOfSymbolicLinkAtPath: juceStringToNS (getFullPathName())]; | |||
#endif | |||
if (dest != nil) | |||
@@ -265684,7 +265673,8 @@ OSType PlatformUtilities::getTypeOfFile (const String& filename) | |||
#if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_ALLOWED >= MAC_OS_X_VERSION_10_5) | |||
NSDictionary* fileDict = [[NSFileManager defaultManager] attributesOfItemAtPath: juceStringToNS (filename) error: nil]; | |||
#else | |||
NSDictionary* fileDict = [[NSFileManager defaultManager] fileAttributesAtPath: juceStringToNS (filename) traverseLink: NO]; | |||
// (the cast here avoids a deprecation warning) | |||
NSDictionary* fileDict = [((id) [NSFileManager defaultManager]) fileAttributesAtPath: juceStringToNS (filename) traverseLink: NO]; | |||
#endif | |||
return [fileDict fileHFSTypeCode]; | |||
@@ -64,7 +64,7 @@ | |||
*/ | |||
#define JUCE_MAJOR_VERSION 1 | |||
#define JUCE_MINOR_VERSION 52 | |||
#define JUCE_BUILDNUMBER 64 | |||
#define JUCE_BUILDNUMBER 65 | |||
/** Current Juce version number. | |||
@@ -6692,11 +6692,12 @@ public: | |||
/** Returns true if this expression makes use of the specified symbol. | |||
If a suitable context is supplied, the search will dereference and recursively check | |||
all symbols, so that it can be determined whether this expression relies on the given | |||
symbol at any level in its evaluation. | |||
symbol at any level in its evaluation. If the context parameter is null, this just checks | |||
whether the expression contains any direct references to the symbol. | |||
@throws Expression::EvaluationError | |||
*/ | |||
bool referencesSymbol (const String& symbol, const EvaluationContext& context) const; | |||
bool referencesSymbol (const String& symbol, const EvaluationContext* context) const; | |||
/** Returns true if this expression contains any symbols. */ | |||
bool usesAnySymbols() const; | |||
@@ -6773,7 +6774,7 @@ private: | |||
virtual int getInputIndexFor (const Term* possibleInput) const; | |||
virtual const String toString() const = 0; | |||
virtual int getOperatorPrecedence() const; | |||
virtual bool referencesSymbol (const String& symbol, const EvaluationContext&, int recursionDepth) const; | |||
virtual bool referencesSymbol (const String& symbol, const EvaluationContext*, int recursionDepth) const; | |||
virtual const ReferenceCountedObjectPtr<Term> createTermToEvaluateInput (const EvaluationContext&, const Term* inputTerm, | |||
double overallTarget, Term* topLevelTerm) const; | |||
virtual const ReferenceCountedObjectPtr<Term> negated(); | |||
@@ -33821,9 +33822,10 @@ public: | |||
/** Returns the frequency of a midi note number. | |||
The frequencyOfA parameter is an optional frequency for 'A', normally 440-444Hz for concert pitch. | |||
@see getMidiNoteName | |||
*/ | |||
static const double getMidiNoteInHertz (int noteNumber) throw(); | |||
static const double getMidiNoteInHertz (int noteNumber, const double frequencyOfA = 440.0) throw(); | |||
/** Returns the standard name of a GM instrument. | |||
@@ -38647,7 +38649,7 @@ public: | |||
to trigger an AsyncUpdater or ChangeBroadcaster which you can respond to later on the | |||
message thread. | |||
@see audioPluginParameterChangeGestureStart | |||
@see audioProcessorParameterChangeGestureBegin | |||
*/ | |||
virtual void audioProcessorParameterChangeGestureEnd (AudioProcessor* processor, | |||
int parameterIndex); | |||
@@ -43219,15 +43221,8 @@ public: | |||
*/ | |||
void moveToAbsolute (double absoluteTargetPosition, const Expression::EvaluationContext* evaluationContext); | |||
/** Tells the coordinate that an object is changing its name or being deleted. | |||
If either of this coordinates anchor points match this name, they will be replaced. | |||
If the newName string is empty, it indicates that the object is being removed, so if | |||
this coordinate was using it, the coordinate is changed to be relative to the origin | |||
instead. | |||
*/ | |||
void renameSymbolIfUsed (const String& oldName, const String& newName, | |||
const Expression::EvaluationContext* evaluationContext); | |||
/** Changes the name of a symbol if it is used as part of the coordinate's expression. */ | |||
void renameSymbolIfUsed (const String& oldName, const String& newName); | |||
/** Returns the expression that defines this coordinate. */ | |||
const Expression& getExpression() const { return term; } | |||
@@ -43314,11 +43309,10 @@ public: | |||
*/ | |||
const String toString() const; | |||
/** Tells the point that an object is changing its name or being deleted. | |||
/** Renames a symbol if it is used by any of the coordinates. | |||
This calls RelativeCoordinate::renameAnchorIfUsed() on its X and Y coordinates. | |||
*/ | |||
void renameSymbolIfUsed (const String& oldName, const String& newName, | |||
const Expression::EvaluationContext* evaluationContext); | |||
void renameSymbolIfUsed (const String& oldName, const String& newName); | |||
/** Returns true if this point depends on any other coordinates for its position. */ | |||
bool isDynamic() const; | |||
@@ -43381,11 +43375,10 @@ public: | |||
*/ | |||
const String toString() const; | |||
/** Tells the rectangle that an object is changing its name or being deleted. | |||
/** Renames a symbol if it is used by any of the coordinates. | |||
This calls RelativeCoordinate::renameSymbolIfUsed() on the rectangle's coordinates. | |||
*/ | |||
void renameSymbolIfUsed (const String& oldName, const String& newName, | |||
const Expression::EvaluationContext* evaluationContext); | |||
void renameSymbolIfUsed (const String& oldName, const String& newName); | |||
// The actual rectangle coords... | |||
RelativeCoordinate left, right, top, bottom; | |||
@@ -46188,7 +46181,7 @@ public: | |||
@see setSliderStyle | |||
*/ | |||
SliderStyle getSliderStyle() const { return style; } | |||
SliderStyle getSliderStyle() const throw() { return style; } | |||
/** Changes the properties of a rotary slider. | |||
@@ -46213,6 +46206,9 @@ public: | |||
*/ | |||
void setMouseDragSensitivity (int distanceForFullScaleDrag); | |||
/** Returns the current sensitivity value set by setMouseDragSensitivity(). */ | |||
int getMouseDragSensitivity() const throw() { return pixelsForFullDragExtent; } | |||
/** Changes the way the the mouse is used when dragging the slider. | |||
If true, this will turn on velocity-sensitive dragging, so that | |||
@@ -46226,7 +46222,7 @@ public: | |||
/** Returns true if velocity-based mode is active. | |||
@see setVelocityBasedMode | |||
*/ | |||
bool getVelocityBasedMode() const { return isVelocityBased; } | |||
bool getVelocityBasedMode() const throw() { return isVelocityBased; } | |||
/** Changes aspects of the scaling used when in velocity-sensitive mode. | |||
@@ -46249,22 +46245,22 @@ public: | |||
/** Returns the velocity sensitivity setting. | |||
@see setVelocityModeParameters | |||
*/ | |||
double getVelocitySensitivity() const { return velocityModeSensitivity; } | |||
double getVelocitySensitivity() const throw() { return velocityModeSensitivity; } | |||
/** Returns the velocity threshold setting. | |||
@see setVelocityModeParameters | |||
*/ | |||
int getVelocityThreshold() const { return velocityModeThreshold; } | |||
int getVelocityThreshold() const throw() { return velocityModeThreshold; } | |||
/** Returns the velocity offset setting. | |||
@see setVelocityModeParameters | |||
*/ | |||
double getVelocityOffset() const { return velocityModeOffset; } | |||
double getVelocityOffset() const throw() { return velocityModeOffset; } | |||
/** Returns the velocity user key setting. | |||
@see setVelocityModeParameters | |||
*/ | |||
bool getVelocityModeIsSwappable() const { return userKeyOverridesVelocity; } | |||
bool getVelocityModeIsSwappable() const throw() { return userKeyOverridesVelocity; } | |||
/** Sets up a skew factor to alter the way values are distributed. | |||
@@ -46298,7 +46294,7 @@ public: | |||
@see setSkewFactor, setSkewFactorFromMidPoint | |||
*/ | |||
double getSkewFactor() const { return skewFactor; } | |||
double getSkewFactor() const throw() { return skewFactor; } | |||
/** Used by setIncDecButtonsMode(). | |||
*/ | |||
@@ -46354,17 +46350,17 @@ public: | |||
/** Returns the status of the text-box. | |||
@see setTextBoxStyle | |||
*/ | |||
const TextEntryBoxPosition getTextBoxPosition() const { return textBoxPos; } | |||
const TextEntryBoxPosition getTextBoxPosition() const throw() { return textBoxPos; } | |||
/** Returns the width used for the text-box. | |||
@see setTextBoxStyle | |||
*/ | |||
int getTextBoxWidth() const { return textBoxWidth; } | |||
int getTextBoxWidth() const throw() { return textBoxWidth; } | |||
/** Returns the height used for the text-box. | |||
@see setTextBoxStyle | |||
*/ | |||
int getTextBoxHeight() const { return textBoxHeight; } | |||
int getTextBoxHeight() const throw() { return textBoxHeight; } | |||
/** Makes the text-box editable. | |||
@@ -46468,7 +46464,7 @@ public: | |||
your own Value object. | |||
@see Value, getMinValue, getMaxValueObject | |||
*/ | |||
Value& getMinValueObject() { return valueMin; } | |||
Value& getMinValueObject() throw() { return valueMin; } | |||
/** For a slider with two or three thumbs, this sets the lower of its values. | |||
@@ -46510,7 +46506,7 @@ public: | |||
your own Value object. | |||
@see Value, getMaxValue, getMinValueObject | |||
*/ | |||
Value& getMaxValueObject() { return valueMax; } | |||
Value& getMaxValueObject() throw() { return valueMax; } | |||
/** For a slider with two or three thumbs, this sets the lower of its values. | |||
@@ -46661,7 +46657,7 @@ public: | |||
This will return 0 for the main thumb, 1 for the minimum-value thumb, 2 for | |||
the maximum-value thumb, or -1 if none is currently down. | |||
*/ | |||
int getThumbBeingDragged() const { return sliderBeingDragged; } | |||
int getThumbBeingDragged() const throw() { return sliderBeingDragged; } | |||
/** Callback to indicate that the user is about to start dragging the slider. | |||
@@ -991,15 +991,15 @@ const String MidiMessage::getMidiNoteName (int note, bool useSharps, bool includ | |||
return String::empty; | |||
} | |||
const double MidiMessage::getMidiNoteInHertz (int noteNumber) throw() | |||
const double MidiMessage::getMidiNoteInHertz (int noteNumber, const double frequencyOfA) throw() | |||
{ | |||
noteNumber -= 12 * 6 + 9; // now 0 = A440 | |||
return 440.0 * pow (2.0, noteNumber / 12.0); | |||
noteNumber -= 12 * 6 + 9; // now 0 = A | |||
return frequencyOfA * pow (2.0, noteNumber / 12.0); | |||
} | |||
const String MidiMessage::getGMInstrumentName (const int n) | |||
{ | |||
const char *names[] = | |||
const char* names[] = | |||
{ | |||
"Acoustic Grand Piano", "Bright Acoustic Piano", "Electric Grand Piano", "Honky-tonk Piano", | |||
"Electric Piano 1", "Electric Piano 2", "Harpsichord", "Clavinet", "Celesta", "Glockenspiel", | |||
@@ -860,9 +860,10 @@ public: | |||
/** Returns the frequency of a midi note number. | |||
The frequencyOfA parameter is an optional frequency for 'A', normally 440-444Hz for concert pitch. | |||
@see getMidiNoteName | |||
*/ | |||
static const double getMidiNoteInHertz (int noteNumber) throw(); | |||
static const double getMidiNoteInHertz (int noteNumber, const double frequencyOfA = 440.0) throw(); | |||
/** Returns the standard name of a GM instrument. | |||
@@ -99,7 +99,7 @@ public: | |||
to trigger an AsyncUpdater or ChangeBroadcaster which you can respond to later on the | |||
message thread. | |||
@see audioPluginParameterChangeGestureStart | |||
@see audioProcessorParameterChangeGestureBegin | |||
*/ | |||
virtual void audioProcessorParameterChangeGestureEnd (AudioProcessor* processor, | |||
int parameterIndex); | |||
@@ -108,7 +108,7 @@ public: | |||
: mainSymbol + "." + member; | |||
} | |||
bool referencesSymbol (const String& s, const EvaluationContext& c, int recursionDepth) const | |||
bool referencesSymbol (const String& s, const EvaluationContext* c, int recursionDepth) const | |||
{ | |||
if (s == mainSymbol) | |||
return true; | |||
@@ -118,7 +118,7 @@ public: | |||
try | |||
{ | |||
return c.getSymbolValue (mainSymbol, member).term->referencesSymbol (s, c, recursionDepth); | |||
return c != 0 && c->getSymbolValue (mainSymbol, member).term->referencesSymbol (s, c, recursionDepth); | |||
} | |||
catch (EvaluationError&) | |||
{ | |||
@@ -154,7 +154,7 @@ public: | |||
Term* getInput (int i) const { return parameters [i]; } | |||
const String getFunctionName() const { return functionName; } | |||
bool referencesSymbol (const String& s, const EvaluationContext& c, int recursionDepth) const | |||
bool referencesSymbol (const String& s, const EvaluationContext* c, int recursionDepth) const | |||
{ | |||
for (int i = 0; i < parameters.size(); ++i) | |||
if (parameters.getUnchecked(i)->referencesSymbol (s, c, recursionDepth)) | |||
@@ -226,7 +226,7 @@ public: | |||
return "-" + input->toString(); | |||
} | |||
bool referencesSymbol (const String& s, const EvaluationContext& c, int recursionDepth) const | |||
bool referencesSymbol (const String& s, const EvaluationContext* c, int recursionDepth) const | |||
{ | |||
return input->referencesSymbol (s, c, recursionDepth); | |||
} | |||
@@ -254,7 +254,7 @@ public: | |||
int getNumInputs() const { return 2; } | |||
Term* getInput (int index) const { return index == 0 ? static_cast<Term*> (left) : (index == 1 ? static_cast<Term*> (right) : 0); } | |||
bool referencesSymbol (const String& s, const EvaluationContext& c, int recursionDepth) const | |||
bool referencesSymbol (const String& s, const EvaluationContext* c, int recursionDepth) const | |||
{ | |||
return left->referencesSymbol (s, c, recursionDepth) | |||
|| right->referencesSymbol (s, c, recursionDepth); | |||
@@ -882,7 +882,7 @@ const Expression Expression::withRenamedSymbol (const String& oldSymbol, const S | |||
return newExpression; | |||
} | |||
bool Expression::referencesSymbol (const String& symbol, const EvaluationContext& context) const | |||
bool Expression::referencesSymbol (const String& symbol, const EvaluationContext* context) const | |||
{ | |||
return term->referencesSymbol (symbol, context, 0); | |||
} | |||
@@ -928,7 +928,7 @@ int Expression::Term::getOperatorPrecedence() const | |||
return 0; | |||
} | |||
bool Expression::Term::referencesSymbol (const String&, const EvaluationContext&, int) const | |||
bool Expression::Term::referencesSymbol (const String&, const EvaluationContext*, int) const | |||
{ | |||
return false; | |||
} | |||
@@ -156,11 +156,12 @@ public: | |||
/** Returns true if this expression makes use of the specified symbol. | |||
If a suitable context is supplied, the search will dereference and recursively check | |||
all symbols, so that it can be determined whether this expression relies on the given | |||
symbol at any level in its evaluation. | |||
symbol at any level in its evaluation. If the context parameter is null, this just checks | |||
whether the expression contains any direct references to the symbol. | |||
@throws Expression::EvaluationError | |||
*/ | |||
bool referencesSymbol (const String& symbol, const EvaluationContext& context) const; | |||
bool referencesSymbol (const String& symbol, const EvaluationContext* context) const; | |||
/** Returns true if this expression contains any symbols. */ | |||
bool usesAnySymbols() const; | |||
@@ -241,7 +242,7 @@ private: | |||
virtual int getInputIndexFor (const Term* possibleInput) const; | |||
virtual const String toString() const = 0; | |||
virtual int getOperatorPrecedence() const; | |||
virtual bool referencesSymbol (const String& symbol, const EvaluationContext&, int recursionDepth) const; | |||
virtual bool referencesSymbol (const String& symbol, const EvaluationContext*, int recursionDepth) const; | |||
virtual const ReferenceCountedObjectPtr<Term> createTermToEvaluateInput (const EvaluationContext&, const Term* inputTerm, | |||
double overallTarget, Term* topLevelTerm) const; | |||
virtual const ReferenceCountedObjectPtr<Term> negated(); | |||
@@ -33,7 +33,7 @@ | |||
*/ | |||
#define JUCE_MAJOR_VERSION 1 | |||
#define JUCE_MINOR_VERSION 52 | |||
#define JUCE_BUILDNUMBER 64 | |||
#define JUCE_BUILDNUMBER 65 | |||
/** Current Juce version number. | |||
@@ -114,7 +114,7 @@ public: | |||
@see setSliderStyle | |||
*/ | |||
SliderStyle getSliderStyle() const { return style; } | |||
SliderStyle getSliderStyle() const throw() { return style; } | |||
//============================================================================== | |||
/** Changes the properties of a rotary slider. | |||
@@ -140,6 +140,9 @@ public: | |||
*/ | |||
void setMouseDragSensitivity (int distanceForFullScaleDrag); | |||
/** Returns the current sensitivity value set by setMouseDragSensitivity(). */ | |||
int getMouseDragSensitivity() const throw() { return pixelsForFullDragExtent; } | |||
//============================================================================== | |||
/** Changes the way the the mouse is used when dragging the slider. | |||
@@ -154,7 +157,7 @@ public: | |||
/** Returns true if velocity-based mode is active. | |||
@see setVelocityBasedMode | |||
*/ | |||
bool getVelocityBasedMode() const { return isVelocityBased; } | |||
bool getVelocityBasedMode() const throw() { return isVelocityBased; } | |||
/** Changes aspects of the scaling used when in velocity-sensitive mode. | |||
@@ -177,22 +180,22 @@ public: | |||
/** Returns the velocity sensitivity setting. | |||
@see setVelocityModeParameters | |||
*/ | |||
double getVelocitySensitivity() const { return velocityModeSensitivity; } | |||
double getVelocitySensitivity() const throw() { return velocityModeSensitivity; } | |||
/** Returns the velocity threshold setting. | |||
@see setVelocityModeParameters | |||
*/ | |||
int getVelocityThreshold() const { return velocityModeThreshold; } | |||
int getVelocityThreshold() const throw() { return velocityModeThreshold; } | |||
/** Returns the velocity offset setting. | |||
@see setVelocityModeParameters | |||
*/ | |||
double getVelocityOffset() const { return velocityModeOffset; } | |||
double getVelocityOffset() const throw() { return velocityModeOffset; } | |||
/** Returns the velocity user key setting. | |||
@see setVelocityModeParameters | |||
*/ | |||
bool getVelocityModeIsSwappable() const { return userKeyOverridesVelocity; } | |||
bool getVelocityModeIsSwappable() const throw() { return userKeyOverridesVelocity; } | |||
//============================================================================== | |||
/** Sets up a skew factor to alter the way values are distributed. | |||
@@ -227,7 +230,7 @@ public: | |||
@see setSkewFactor, setSkewFactorFromMidPoint | |||
*/ | |||
double getSkewFactor() const { return skewFactor; } | |||
double getSkewFactor() const throw() { return skewFactor; } | |||
//============================================================================== | |||
/** Used by setIncDecButtonsMode(). | |||
@@ -285,17 +288,17 @@ public: | |||
/** Returns the status of the text-box. | |||
@see setTextBoxStyle | |||
*/ | |||
const TextEntryBoxPosition getTextBoxPosition() const { return textBoxPos; } | |||
const TextEntryBoxPosition getTextBoxPosition() const throw() { return textBoxPos; } | |||
/** Returns the width used for the text-box. | |||
@see setTextBoxStyle | |||
*/ | |||
int getTextBoxWidth() const { return textBoxWidth; } | |||
int getTextBoxWidth() const throw() { return textBoxWidth; } | |||
/** Returns the height used for the text-box. | |||
@see setTextBoxStyle | |||
*/ | |||
int getTextBoxHeight() const { return textBoxHeight; } | |||
int getTextBoxHeight() const throw() { return textBoxHeight; } | |||
/** Makes the text-box editable. | |||
@@ -403,7 +406,7 @@ public: | |||
your own Value object. | |||
@see Value, getMinValue, getMaxValueObject | |||
*/ | |||
Value& getMinValueObject() { return valueMin; } | |||
Value& getMinValueObject() throw() { return valueMin; } | |||
/** For a slider with two or three thumbs, this sets the lower of its values. | |||
@@ -445,7 +448,7 @@ public: | |||
your own Value object. | |||
@see Value, getMaxValue, getMinValueObject | |||
*/ | |||
Value& getMaxValueObject() { return valueMax; } | |||
Value& getMaxValueObject() throw() { return valueMax; } | |||
/** For a slider with two or three thumbs, this sets the lower of its values. | |||
@@ -601,7 +604,7 @@ public: | |||
This will return 0 for the main thumb, 1 for the minimum-value thumb, 2 for | |||
the maximum-value thumb, or -1 if none is currently down. | |||
*/ | |||
int getThumbBeingDragged() const { return sliderBeingDragged; } | |||
int getThumbBeingDragged() const throw() { return sliderBeingDragged; } | |||
//============================================================================== | |||
/** Callback to indicate that the user is about to start dragging the slider. | |||
@@ -160,11 +160,7 @@ bool RelativeCoordinate::references (const String& coordName, const Expression:: | |||
{ | |||
try | |||
{ | |||
if (context != 0) | |||
return term.referencesSymbol (coordName, *context); | |||
Expression::EvaluationContext defaultContext; | |||
return term.referencesSymbol (coordName, defaultContext); | |||
return term.referencesSymbol (coordName, context); | |||
} | |||
catch (...) | |||
{} | |||
@@ -182,18 +178,12 @@ const String RelativeCoordinate::toString() const | |||
return term.toString(); | |||
} | |||
void RelativeCoordinate::renameSymbolIfUsed (const String& oldName, const String& newName, | |||
const Expression::EvaluationContext* context) | |||
void RelativeCoordinate::renameSymbolIfUsed (const String& oldName, const String& newName) | |||
{ | |||
jassert (newName.isNotEmpty() && newName.toLowerCase().containsOnly ("abcdefghijklmnopqrstuvwxyz0123456789_")); | |||
if (term.referencesSymbol (oldName, *context)) | |||
{ | |||
const double oldValue = resolve (context); | |||
if (term.referencesSymbol (oldName, 0)) | |||
term = term.withRenamedSymbol (oldName, newName); | |||
moveToAbsolute (oldValue, context); | |||
} | |||
} | |||
//============================================================================== | |||
@@ -251,10 +241,10 @@ const String RelativePoint::toString() const | |||
return x.toString() + ", " + y.toString(); | |||
} | |||
void RelativePoint::renameSymbolIfUsed (const String& oldName, const String& newName, const Expression::EvaluationContext* context) | |||
void RelativePoint::renameSymbolIfUsed (const String& oldName, const String& newName) | |||
{ | |||
x.renameSymbolIfUsed (oldName, newName, context); | |||
y.renameSymbolIfUsed (oldName, newName, context); | |||
x.renameSymbolIfUsed (oldName, newName); | |||
y.renameSymbolIfUsed (oldName, newName); | |||
} | |||
bool RelativePoint::isDynamic() const | |||
@@ -327,13 +317,12 @@ const String RelativeRectangle::toString() const | |||
return left.toString() + ", " + top.toString() + ", " + right.toString() + ", " + bottom.toString(); | |||
} | |||
void RelativeRectangle::renameSymbolIfUsed (const String& oldName, const String& newName, | |||
const Expression::EvaluationContext* context) | |||
void RelativeRectangle::renameSymbolIfUsed (const String& oldName, const String& newName) | |||
{ | |||
left.renameSymbolIfUsed (oldName, newName, context); | |||
right.renameSymbolIfUsed (oldName, newName, context); | |||
top.renameSymbolIfUsed (oldName, newName, context); | |||
bottom.renameSymbolIfUsed (oldName, newName, context); | |||
left.renameSymbolIfUsed (oldName, newName); | |||
right.renameSymbolIfUsed (oldName, newName); | |||
top.renameSymbolIfUsed (oldName, newName); | |||
bottom.renameSymbolIfUsed (oldName, newName); | |||
} | |||
@@ -100,15 +100,8 @@ public: | |||
*/ | |||
void moveToAbsolute (double absoluteTargetPosition, const Expression::EvaluationContext* evaluationContext); | |||
/** Tells the coordinate that an object is changing its name or being deleted. | |||
If either of this coordinates anchor points match this name, they will be replaced. | |||
If the newName string is empty, it indicates that the object is being removed, so if | |||
this coordinate was using it, the coordinate is changed to be relative to the origin | |||
instead. | |||
*/ | |||
void renameSymbolIfUsed (const String& oldName, const String& newName, | |||
const Expression::EvaluationContext* evaluationContext); | |||
/** Changes the name of a symbol if it is used as part of the coordinate's expression. */ | |||
void renameSymbolIfUsed (const String& oldName, const String& newName); | |||
/** Returns the expression that defines this coordinate. */ | |||
const Expression& getExpression() const { return term; } | |||
@@ -200,11 +193,10 @@ public: | |||
*/ | |||
const String toString() const; | |||
/** Tells the point that an object is changing its name or being deleted. | |||
/** Renames a symbol if it is used by any of the coordinates. | |||
This calls RelativeCoordinate::renameAnchorIfUsed() on its X and Y coordinates. | |||
*/ | |||
void renameSymbolIfUsed (const String& oldName, const String& newName, | |||
const Expression::EvaluationContext* evaluationContext); | |||
void renameSymbolIfUsed (const String& oldName, const String& newName); | |||
/** Returns true if this point depends on any other coordinates for its position. */ | |||
bool isDynamic() const; | |||
@@ -270,11 +262,10 @@ public: | |||
*/ | |||
const String toString() const; | |||
/** Tells the rectangle that an object is changing its name or being deleted. | |||
/** Renames a symbol if it is used by any of the coordinates. | |||
This calls RelativeCoordinate::renameSymbolIfUsed() on the rectangle's coordinates. | |||
*/ | |||
void renameSymbolIfUsed (const String& oldName, const String& newName, | |||
const Expression::EvaluationContext* evaluationContext); | |||
void renameSymbolIfUsed (const String& oldName, const String& newName); | |||
// The actual rectangle coords... | |||
RelativeCoordinate left, right, top, bottom; | |||
@@ -234,7 +234,8 @@ const File File::getLinkedTarget() const | |||
NSString* dest = [[NSFileManager defaultManager] destinationOfSymbolicLinkAtPath: juceStringToNS (getFullPathName()) error: nil]; | |||
#else | |||
NSString* dest = [[NSFileManager defaultManager] pathContentOfSymbolicLinkAtPath: juceStringToNS (getFullPathName())]; | |||
// (the cast here avoids a deprecation warning) | |||
NSString* dest = [((id) [NSFileManager defaultManager]) pathContentOfSymbolicLinkAtPath: juceStringToNS (getFullPathName())]; | |||
#endif | |||
if (dest != nil) | |||
@@ -451,7 +452,8 @@ OSType PlatformUtilities::getTypeOfFile (const String& filename) | |||
#if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_ALLOWED >= MAC_OS_X_VERSION_10_5) | |||
NSDictionary* fileDict = [[NSFileManager defaultManager] attributesOfItemAtPath: juceStringToNS (filename) error: nil]; | |||
#else | |||
NSDictionary* fileDict = [[NSFileManager defaultManager] fileAttributesAtPath: juceStringToNS (filename) traverseLink: NO]; | |||
// (the cast here avoids a deprecation warning) | |||
NSDictionary* fileDict = [((id) [NSFileManager defaultManager]) fileAttributesAtPath: juceStringToNS (filename) traverseLink: NO]; | |||
#endif | |||
return [fileDict fileHFSTypeCode]; | |||
@@ -1211,8 +1211,7 @@ private: | |||
{ | |||
if (rects->right <= x + w && rects->bottom <= y + h) | |||
{ | |||
// (need to move this one pixel to the left because of a win32 bug) | |||
const int cx = jmax (x, (int) rects->left - 1); | |||
const int cx = jmax (x, (int) rects->left); | |||
contextClip.addWithoutMerging (Rectangle<int> (cx - x, rects->top - y, rects->right - cx, rects->bottom - rects->top) | |||
.getIntersection (clipBounds)); | |||
} | |||