From 88e1e031d56e858faefd6da05085d8a7178ab327 Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Wed, 15 Jun 2011 20:56:35 +0100 Subject: [PATCH] Font fix. Juggled some win32 headers around to try to avoid include problems with certain SDK versions. --- juce_amalgamated.cpp | 643 +++++++++--------- juce_amalgamated.h | 333 +++++---- src/core/juce_StandardHeader.h | 2 +- src/gui/graphics/fonts/juce_Font.cpp | 5 +- .../mac/juce_mac_QuickTimeMovieComponent.mm | 2 +- .../windows/juce_win32_NativeIncludes.h | 14 +- .../juce_win32_QuickTimeMovieComponent.cpp | 2 +- 7 files changed, 497 insertions(+), 504 deletions(-) diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index bf69c09963..6e37d7b289 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -610,7 +610,7 @@ #include #endif -#if JUCE_USE_CAMERA && JUCE_BUILD_NATIVE +#if (JUCE_USE_CAMERA || JUCE_DIRECTSHOW) && JUCE_BUILD_NATIVE /* If you're using the camera classes, you'll need access to a few DirectShow headers. @@ -633,6 +633,10 @@ #include #endif +#if JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE + #include +#endif + #if JUCE_WASAPI && JUCE_BUILD_NATIVE #include #include @@ -664,14 +668,6 @@ #import #endif -#if JUCE_DIRECTSHOW && JUCE_BUILD_NATIVE - #include -#endif - -#if JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE - #include -#endif - #if JUCE_MSVC #pragma warning (pop) #endif @@ -1721,7 +1717,7 @@ const SystemStats::CPUFlags& SystemStats::getCPUFlags() return cpuFlags; } -const String SystemStats::getJUCEVersion() +String SystemStats::getJUCEVersion() { // Some basic tests, to keep an eye on things and make sure these types work ok // on all platforms. Let me know if any of these assertions fail on your system! @@ -3803,7 +3799,7 @@ void MemoryBlock::removeSection (size_t startByte, size_t numBytesToRemove) } } -const String MemoryBlock::toString() const +String MemoryBlock::toString() const { return String (static_cast (getData()), size); } @@ -3902,7 +3898,7 @@ void MemoryBlock::loadFromHexString (const String& hex) const char* const MemoryBlock::encodingTable = ".ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+"; -const String MemoryBlock::toBase64Encoding() const +String MemoryBlock::toBase64Encoding() const { const size_t numChars = ((size << 3) + 5) / 6; @@ -5031,7 +5027,7 @@ bool DynamicObject::hasProperty (const Identifier& propertyName) const return v != nullptr && ! v->isMethod(); } -const var DynamicObject::getProperty (const Identifier& propertyName) const +var DynamicObject::getProperty (const Identifier& propertyName) const { return properties [propertyName]; } @@ -5051,9 +5047,9 @@ bool DynamicObject::hasMethod (const Identifier& methodName) const return getProperty (methodName).isMethod(); } -const var DynamicObject::invokeMethod (const Identifier& methodName, - const var* parameters, - int numParameters) +var DynamicObject::invokeMethod (const Identifier& methodName, + const var* parameters, + int numParameters) { return properties [methodName].invokeMethod (this, parameters, numParameters); } @@ -5085,16 +5081,16 @@ public: virtual Type getType() const noexcept = 0; virtual Term* clone() const = 0; - virtual const ReferenceCountedObjectPtr resolve (const Scope&, int recursionDepth) = 0; + virtual ReferenceCountedObjectPtr resolve (const Scope&, int recursionDepth) = 0; virtual String toString() const = 0; virtual double toDouble() const { return 0; } virtual int getInputIndexFor (const Term*) const { return -1; } virtual int getOperatorPrecedence() const { return 0; } virtual int getNumInputs() const { return 0; } virtual Term* getInput (int) const { return nullptr; } - virtual const ReferenceCountedObjectPtr negated(); + virtual ReferenceCountedObjectPtr negated(); - virtual const ReferenceCountedObjectPtr createTermToEvaluateInput (const Scope&, const Term* /*inputTerm*/, + virtual ReferenceCountedObjectPtr createTermToEvaluateInput (const Scope&, const Term* /*inputTerm*/, double /*overallTarget*/, Term* /*topLevelTerm*/) const { jassertfalse; @@ -5167,9 +5163,9 @@ public: Type getType() const noexcept { return constantType; } Term* clone() const { return new Constant (value, isResolutionTarget); } - const TermPtr resolve (const Scope&, int) { return this; } + TermPtr resolve (const Scope&, int) { return this; } double toDouble() const { return value; } - const TermPtr negated() { return new Constant (-value, isResolutionTarget); } + TermPtr negated() { return new Constant (-value, isResolutionTarget); } String toString() const { @@ -5204,7 +5200,7 @@ public: virtual double performFunction (double left, double right) const = 0; virtual void writeOperator (String& dest) const = 0; - const TermPtr resolve (const Scope& scope, int recursionDepth) + TermPtr resolve (const Scope& scope, int recursionDepth) { return new Constant (performFunction (left->resolve (scope, recursionDepth)->toDouble(), right->resolve (scope, recursionDepth)->toDouble()), false); @@ -5233,7 +5229,7 @@ public: protected: const TermPtr left, right; - const TermPtr createDestinationTerm (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const + TermPtr createDestinationTerm (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const { jassert (input == left || input == right); if (input != left && input != right) @@ -5253,7 +5249,7 @@ public: public: explicit SymbolTerm (const String& symbol_) : symbol (symbol_) {} - const TermPtr resolve (const Scope& scope, int recursionDepth) + TermPtr resolve (const Scope& scope, int recursionDepth) { checkRecursionDepth (recursionDepth); return getTermFor (scope.getSymbolValue (symbol))->resolve (scope, recursionDepth + 1); @@ -5295,7 +5291,7 @@ public: Term* getInput (int i) const { return getTermFor (parameters [i]); } String getName() const { return functionName; } - const TermPtr resolve (const Scope& scope, int recursionDepth) + TermPtr resolve (const Scope& scope, int recursionDepth) { checkRecursionDepth (recursionDepth); double result = 0; @@ -5353,7 +5349,7 @@ public: public: DotOperator (SymbolTerm* const left_, Term* const right_) : BinaryTerm (left_, right_) {} - const TermPtr resolve (const Scope& scope, int recursionDepth) + TermPtr resolve (const Scope& scope, int recursionDepth) { checkRecursionDepth (recursionDepth); @@ -5466,15 +5462,15 @@ public: Term* getInput (int index) const { return index == 0 ? input.getObject() : nullptr; } Term* clone() const { return new Negate (input->clone()); } - const TermPtr resolve (const Scope& scope, int recursionDepth) + TermPtr resolve (const Scope& scope, int recursionDepth) { return new Constant (-input->resolve (scope, recursionDepth)->toDouble(), false); } String getName() const { return "-"; } - const TermPtr negated() { return input; } + TermPtr negated() { return input; } - const TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input_, double overallTarget, Term* topLevelTerm) const + TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input_, double overallTarget, Term* topLevelTerm) const { (void) input_; jassert (input_ == input); @@ -5508,7 +5504,7 @@ public: String getName() const { return "+"; } void writeOperator (String& dest) const { dest << " + "; } - const TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const + TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const { const TermPtr newDest (createDestinationTerm (scope, input, overallTarget, topLevelTerm)); if (newDest == nullptr) @@ -5532,7 +5528,7 @@ public: String getName() const { return "-"; } void writeOperator (String& dest) const { dest << " - "; } - const TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const + TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const { const TermPtr newDest (createDestinationTerm (scope, input, overallTarget, topLevelTerm)); if (newDest == nullptr) @@ -5559,7 +5555,7 @@ public: void writeOperator (String& dest) const { dest << " * "; } int getOperatorPrecedence() const { return 2; } - const TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const + TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const { const TermPtr newDest (createDestinationTerm (scope, input, overallTarget, topLevelTerm)); if (newDest == nullptr) @@ -5583,7 +5579,7 @@ public: void writeOperator (String& dest) const { dest << " / "; } int getOperatorPrecedence() const { return 2; } - const TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const + TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const { const TermPtr newDest (createDestinationTerm (scope, input, overallTarget, topLevelTerm)); if (newDest == nullptr) @@ -5693,7 +5689,7 @@ public: { } - const TermPtr readUpToComma() + TermPtr readUpToComma() { if (text.isEmpty()) return new Constant (0.0, false); @@ -5798,7 +5794,7 @@ public: return nullptr; } - const TermPtr readExpression() + TermPtr readExpression() { TermPtr lhs (readMultiplyOrDivideExpression()); @@ -5819,7 +5815,7 @@ public: return lhs; } - const TermPtr readMultiplyOrDivideExpression() + TermPtr readMultiplyOrDivideExpression() { TermPtr lhs (readUnaryExpression()); @@ -5840,7 +5836,7 @@ public: return lhs; } - const TermPtr readUnaryExpression() + TermPtr readUnaryExpression() { char opType; if (readOperator ("+-", &opType)) @@ -5859,7 +5855,7 @@ public: return readPrimaryExpression(); } - const TermPtr readPrimaryExpression() + TermPtr readPrimaryExpression() { TermPtr e (readParenthesisedExpression()); if (e != nullptr) @@ -5872,7 +5868,7 @@ public: return readSymbolOrFunction(); } - const TermPtr readSymbolOrFunction() + TermPtr readSymbolOrFunction() { String identifier; if (readIdentifier (identifier)) @@ -5931,7 +5927,7 @@ public: return nullptr; } - const TermPtr readParenthesisedExpression() + TermPtr readParenthesisedExpression() { if (! readOperator ("(")) return nullptr; @@ -6114,7 +6110,7 @@ String Expression::getSymbolOrFunction() const { return term->getName(); } int Expression::getNumInputs() const { return term->getNumInputs(); } Expression Expression::getInput (int index) const { return Expression (term->getInput (index)); } -const ReferenceCountedObjectPtr Expression::Term::negated() +ReferenceCountedObjectPtr Expression::Term::negated() { return new Helpers::Negate (this); } @@ -6143,7 +6139,7 @@ bool Expression::Symbol::operator!= (const Symbol& other) const noexcept Expression::Scope::Scope() {} Expression::Scope::~Scope() {} -const Expression Expression::Scope::getSymbolValue (const String& symbol) const +Expression Expression::Scope::getSymbolValue (const String& symbol) const { throw Helpers::EvaluationError ("Unknown symbol: " + symbol); } @@ -6185,7 +6181,7 @@ void Expression::Scope::visitRelativeScope (const String& scopeName, Visitor&) c throw Helpers::EvaluationError ("Unknown symbol: " + scopeName); } -const String Expression::Scope::getScopeUID() const +String Expression::Scope::getScopeUID() const { return String::empty; } @@ -8120,9 +8116,9 @@ Result File::createDirectory() const return r; } -const Time File::getLastModificationTime() const { int64 m, a, c; getFileTimesInternal (m, a, c); return Time (m); } -const Time File::getLastAccessTime() const { int64 m, a, c; getFileTimesInternal (m, a, c); return Time (a); } -const Time File::getCreationTime() const { int64 m, a, c; getFileTimesInternal (m, a, c); return Time (c); } +Time File::getLastModificationTime() const { int64 m, a, c; getFileTimesInternal (m, a, c); return Time (m); } +Time File::getLastAccessTime() const { int64 m, a, c; getFileTimesInternal (m, a, c); return Time (a); } +Time File::getCreationTime() const { int64 m, a, c; getFileTimesInternal (m, a, c); return Time (c); } bool File::setLastModificationTime (const Time& t) const { return setFileTimesInternal (t.toMilliseconds(), 0, 0); } bool File::setLastAccessTime (const Time& t) const { return setFileTimesInternal (0, t.toMilliseconds(), 0); } @@ -10190,7 +10186,7 @@ MACAddress::MACAddress (const uint8 bytes[6]) memcpy (asBytes, bytes, sizeof (asBytes)); } -const String MACAddress::toString() const +String MACAddress::toString() const { String s; @@ -10543,7 +10539,7 @@ public: expect (mi.readDoubleBigEndian() == randomDouble); } - static const String createRandomWideCharString() + static String createRandomWideCharString() { juce_wchar buffer [50] = { 0 }; @@ -18339,7 +18335,7 @@ const var& ValueTree::SharedObject::getProperty (const Identifier& name) const return properties [name]; } -const var ValueTree::SharedObject::getProperty (const Identifier& name, const var& defaultReturnValue) const +var ValueTree::SharedObject::getProperty (const Identifier& name, const var& defaultReturnValue) const { return properties.getWithDefault (name, defaultReturnValue); } @@ -18743,7 +18739,7 @@ public: tree.removeListener (this); } - const var getValue() const + var getValue() const { return tree [property]; } @@ -19010,7 +19006,7 @@ public: { } - const var getValue() const + var getValue() const { return value; } @@ -19546,14 +19542,14 @@ const ApplicationCommandInfo* ApplicationCommandManager::getCommandForID (const return nullptr; } -const String ApplicationCommandManager::getNameOfCommand (const CommandID commandID) const noexcept +String ApplicationCommandManager::getNameOfCommand (const CommandID commandID) const noexcept { const ApplicationCommandInfo* const ci = getCommandForID (commandID); return ci != nullptr ? ci->shortName : String::empty; } -const String ApplicationCommandManager::getDescriptionOfCommand (const CommandID commandID) const noexcept +String ApplicationCommandManager::getDescriptionOfCommand (const CommandID commandID) const noexcept { const ApplicationCommandInfo* const ci = getCommandForID (commandID); @@ -19571,7 +19567,7 @@ StringArray ApplicationCommandManager::getCommandCategories() const return s; } -const Array ApplicationCommandManager::getCommandsInCategory (const String& categoryName) const +Array ApplicationCommandManager::getCommandsInCategory (const String& categoryName) const { Array results; @@ -21953,7 +21949,7 @@ bool AudioFormat::canHandleFile (const File& f) const String& AudioFormat::getFormatName() const { return formatName; } const StringArray& AudioFormat::getFileExtensions() const { return fileExtensions; } bool AudioFormat::isCompressed() { return false; } -const StringArray AudioFormat::getQualityOptions() { return StringArray(); } +StringArray AudioFormat::getQualityOptions() { return StringArray(); } END_JUCE_NAMESPACE @@ -22638,7 +22634,7 @@ AudioFormat* AudioFormatManager::findFormatForFileExtension (const String& fileE return nullptr; } -const String AudioFormatManager::getWildcardForAllFormats() const +String AudioFormatManager::getWildcardForAllFormats() const { StringArray allExtensions; @@ -26784,12 +26780,12 @@ void AudioDeviceManager::createAudioDeviceTypes (OwnedArray & addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_Android()); } -const String AudioDeviceManager::initialise (const int numInputChannelsNeeded, - const int numOutputChannelsNeeded, - const XmlElement* const e, - const bool selectDefaultDeviceOnFailure, - const String& preferredDefaultDeviceName, - const AudioDeviceSetup* preferredSetupOptions) +String AudioDeviceManager::initialise (const int numInputChannelsNeeded, + const int numOutputChannelsNeeded, + const XmlElement* const e, + const bool selectDefaultDeviceOnFailure, + const String& preferredDefaultDeviceName, + const AudioDeviceSetup* preferredSetupOptions) { scanDevicesIfNeeded(); @@ -26991,8 +26987,8 @@ AudioIODeviceType* AudioDeviceManager::getCurrentDeviceTypeObject() const return availableDeviceTypes[0]; } -const String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup, - const bool treatAsChosenDevice) +String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup, + const bool treatAsChosenDevice) { jassert (&newSetup != ¤tSetup); // this will have no effect @@ -31695,7 +31691,7 @@ void KnownPluginList::removeType (const int index) namespace { - const Time getPluginFileModTime (const String& fileOrIdentifier) + Time getPluginFileModTime (const String& fileOrIdentifier) { if (fileOrIdentifier.startsWithChar ('/') || fileOrIdentifier[1] == ':') return File (fileOrIdentifier).getLastModificationTime(); @@ -32104,7 +32100,7 @@ bool PluginDescription::isDuplicateOf (const PluginDescription& other) const && uid == other.uid; } -const String PluginDescription::createIdentifierString() const +String PluginDescription::createIdentifierString() const { return pluginFormatName + "-" + name @@ -33989,7 +33985,7 @@ AudioPluginInstance* AudioUnitPluginFormat::createInstanceFromDescription (const return nullptr; } -const StringArray AudioUnitPluginFormat::searchPathsForPlugins (const FileSearchPath& /*directoriesToSearch*/, +StringArray AudioUnitPluginFormat::searchPathsForPlugins (const FileSearchPath& /*directoriesToSearch*/, const bool /*recursive*/) { StringArray result; @@ -34034,7 +34030,7 @@ bool AudioUnitPluginFormat::fileMightContainThisPluginType (const String& fileOr && f.isDirectory(); } -const String AudioUnitPluginFormat::getNameOfPluginFromIdentifier (const String& fileOrIdentifier) +String AudioUnitPluginFormat::getNameOfPluginFromIdentifier (const String& fileOrIdentifier) { ComponentDescription desc; String name, version, manufacturer; @@ -34054,7 +34050,7 @@ bool AudioUnitPluginFormat::doesPluginStillExist (const PluginDescription& desc) return File (desc.fileOrIdentifier).exists(); } -const FileSearchPath AudioUnitPluginFormat::getDefaultLocationsToSearch() +FileSearchPath AudioUnitPluginFormat::getDefaultLocationsToSearch() { return FileSearchPath ("/(Default AudioUnit locations)"); } @@ -37018,7 +37014,7 @@ bool VSTPluginFormat::fileMightContainThisPluginType (const String& fileOrIdenti #endif } -const String VSTPluginFormat::getNameOfPluginFromIdentifier (const String& fileOrIdentifier) +String VSTPluginFormat::getNameOfPluginFromIdentifier (const String& fileOrIdentifier) { return fileOrIdentifier; } @@ -37028,7 +37024,7 @@ bool VSTPluginFormat::doesPluginStillExist (const PluginDescription& desc) return File (desc.fileOrIdentifier).exists(); } -const StringArray VSTPluginFormat::searchPathsForPlugins (const FileSearchPath& directoriesToSearch, const bool recursive) +StringArray VSTPluginFormat::searchPathsForPlugins (const FileSearchPath& directoriesToSearch, const bool recursive) { StringArray results; @@ -37060,7 +37056,7 @@ void VSTPluginFormat::recursiveFileSearch (StringArray& results, const File& dir } } -const FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() +FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() { #if JUCE_MAC return FileSearchPath ("~/Library/Audio/Plug-Ins/VST;/Library/Audio/Plug-Ins/VST"); @@ -40151,7 +40147,7 @@ bool InterprocessConnection::isConnected() const && isThreadRunning(); } -const String InterprocessConnection::getConnectedHostName() const +String InterprocessConnection::getConnectedHostName() const { if (pipe != nullptr) { @@ -46806,7 +46802,7 @@ const juce_wchar CodeDocument::Position::getCharacter() const return l == nullptr ? 0 : l->line [getIndexInLine()]; } -const String CodeDocument::Position::getLineText() const +String CodeDocument::Position::getLineText() const { const CodeDocumentLine* const l = owner->lines [line]; return l == nullptr ? String::empty : l->line; @@ -46848,13 +46844,13 @@ CodeDocument::~CodeDocument() { } -const String CodeDocument::getAllContent() const +String CodeDocument::getAllContent() const { return getTextBetween (Position (this, 0), Position (this, lines.size(), 0)); } -const String CodeDocument::getTextBetween (const Position& start, const Position& end) const +String CodeDocument::getTextBetween (const Position& start, const Position& end) const { if (end.getPosition() <= start.getPosition()) return String::empty; @@ -46903,7 +46899,7 @@ int CodeDocument::getNumCharacters() const noexcept return (lastLine == nullptr) ? 0 : lastLine->lineStartInFile + lastLine->lineLength; } -const String CodeDocument::getLine (const int lineIndex) const noexcept +String CodeDocument::getLine (const int lineIndex) const noexcept { const CodeDocumentLine* const line = lines [lineIndex]; return (line == nullptr) ? String::empty : line->line; @@ -49033,7 +49029,7 @@ int CPlusPlusCodeTokeniser::readNextToken (CodeDocument::Iterator& source) return result; } -const StringArray CPlusPlusCodeTokeniser::getTokenTypes() +StringArray CPlusPlusCodeTokeniser::getTokenTypes() { const char* const types[] = { @@ -49768,7 +49764,7 @@ void Label::setText (const String& newText, } } -const String Label::getText (const bool returnActiveEditorContents) const +String Label::getText (const bool returnActiveEditorContents) const { return (returnActiveEditorContents && isBeingEdited()) ? editor->getText() @@ -51778,7 +51774,7 @@ void Slider::setTextValueSuffix (const String& suffix) } } -const String Slider::getTextValueSuffix() const +String Slider::getTextValueSuffix() const { return textSuffix; } @@ -52639,7 +52635,7 @@ int TableHeaderComponent::getNumColumns (const bool onlyCountVisibleColumns) con } } -const String TableHeaderComponent::getColumnName (const int columnId) const +String TableHeaderComponent::getColumnName (const int columnId) const { const ColumnInfo* const ci = getInfoForId (columnId); return ci != nullptr ? ci->name : String::empty; @@ -52962,7 +52958,7 @@ void TableHeaderComponent::reSortTable() triggerAsyncUpdate(); } -const String TableHeaderComponent::toString() const +String TableHeaderComponent::toString() const { String s; @@ -56868,7 +56864,7 @@ void Toolbar::setStyle (const ToolbarItemStyle& newStyle) } } -const String Toolbar::toString() const +String Toolbar::toString() const { String s ("TB:"); @@ -63429,7 +63425,7 @@ BEGIN_JUCE_NAMESPACE namespace ComponentBuilderHelpers { - const String getStateId (const ValueTree& state) + String getStateId (const ValueTree& state) { return state [ComponentBuilder::idProperty].toString(); } @@ -64143,7 +64139,7 @@ void GroupComponent::setText (const String& newText) } } -const String GroupComponent::getText() const +String GroupComponent::getText() const { return text; } @@ -66195,7 +66191,7 @@ int TabbedButtonBar::getNumTabs() const return tabs.size(); } -const String TabbedButtonBar::getCurrentTabName() const +String TabbedButtonBar::getCurrentTabName() const { TabInfo* tab = tabs [currentTabIndex]; return tab == nullptr ? String::empty : tab->name; @@ -66618,7 +66614,7 @@ int TabbedComponent::getCurrentTabIndex() const return tabs->getCurrentTabIndex(); } -const String TabbedComponent::getCurrentTabName() const +String TabbedComponent::getCurrentTabName() const { return tabs->getCurrentTabName(); } @@ -73181,7 +73177,7 @@ bool DragAndDropContainer::isDragAndDropActive() const return dragImageComponent != nullptr; } -const String DragAndDropContainer::getCurrentDragDescription() const +String DragAndDropContainer::getCurrentDragDescription() const { return dragImageComponent != nullptr ? currentDragDesc : String::empty; @@ -73790,12 +73786,12 @@ public: } } - const Time getLastMouseDownTime() const noexcept + Time getLastMouseDownTime() const noexcept { return Time (mouseDowns[0].time); } - const Point getLastMouseDownPosition() const noexcept + Point getLastMouseDownPosition() const noexcept { return mouseDowns[0].position; } @@ -73991,8 +73987,8 @@ const ModifierKeys MouseInputSource::getCurrentModifiers() const { return pimpl- Component* MouseInputSource::getComponentUnderMouse() const { return pimpl->getComponentUnderMouse(); } void MouseInputSource::triggerFakeMove() const { pimpl->triggerFakeMove(); } int MouseInputSource::getNumberOfMultipleClicks() const noexcept { return pimpl->getNumberOfMultipleClicks(); } -const Time MouseInputSource::getLastMouseDownTime() const noexcept { return pimpl->getLastMouseDownTime(); } -const Point MouseInputSource::getLastMouseDownPosition() const noexcept { return pimpl->getLastMouseDownPosition(); } +Time MouseInputSource::getLastMouseDownTime() const noexcept { return pimpl->getLastMouseDownTime(); } +Point MouseInputSource::getLastMouseDownPosition() const noexcept { return pimpl->getLastMouseDownPosition(); } bool MouseInputSource::hasMouseMovedSignificantlySincePressed() const noexcept { return pimpl->hasMouseMovedSignificantlySincePressed(); } bool MouseInputSource::canDoUnboundedMovement() const noexcept { return isMouse(); } void MouseInputSource::enableUnboundedMouseMovement (bool isEnabled, bool keepCursorVisibleUntilOffscreen) { pimpl->enableUnboundedMouseMovement (isEnabled, keepCursorVisibleUntilOffscreen); } @@ -74174,7 +74170,7 @@ public: ~RemapperValueSource() {} - const var getValue() const + var getValue() const { return mappings.indexOf (sourceValue.getValue()) + 1; } @@ -79926,7 +79922,7 @@ void ComponentPeer::addMaskedRegion (int x, int y, int w, int h) maskedRegion.add (x, y, w, h); } -const StringArray ComponentPeer::getAvailableRenderingEngines() +StringArray ComponentPeer::getAvailableRenderingEngines() { return StringArray ("Software Renderer"); } @@ -81813,12 +81809,12 @@ int MarkerList::ValueTreeWrapper::getNumMarkers() const return state.getNumChildren(); } -const ValueTree MarkerList::ValueTreeWrapper::getMarkerState (int index) const +ValueTree MarkerList::ValueTreeWrapper::getMarkerState (int index) const { return state.getChild (index); } -const ValueTree MarkerList::ValueTreeWrapper::getMarkerState (const String& name) const +ValueTree MarkerList::ValueTreeWrapper::getMarkerState (const String& name) const { return state.getChildWithProperty (nameProperty, name); } @@ -81828,7 +81824,7 @@ bool MarkerList::ValueTreeWrapper::containsMarker (const ValueTree& marker) cons return marker.isAChildOf (state); } -const MarkerList::Marker MarkerList::ValueTreeWrapper::getMarker (const ValueTree& marker) const +MarkerList::Marker MarkerList::ValueTreeWrapper::getMarker (const ValueTree& marker) const { jassert (containsMarker (marker)); @@ -82212,7 +82208,7 @@ class RelativeRectangleLocalScope : public Expression::Scope public: RelativeRectangleLocalScope (const RelativeRectangle& rect_) : rect (rect_) {} - const Expression getSymbolValue (const String& symbol) const + Expression getSymbolValue (const String& symbol) const { switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol)) { @@ -82270,7 +82266,7 @@ bool RelativeRectangle::isDynamic() const || dependsOnSymbolsOtherThanThis (bottom.getExpression()); } -const String RelativeRectangle::toString() const +String RelativeRectangle::toString() const { return left.toString() + ", " + top.toString() + ", " + right.toString() + ", " + bottom.toString(); } @@ -82486,7 +82482,7 @@ RelativePointPath::StartSubPath::StartSubPath (const RelativePoint& pos) { } -const ValueTree RelativePointPath::StartSubPath::createTree() const +ValueTree RelativePointPath::StartSubPath::createTree() const { ValueTree v (DrawablePath::ValueTreeWrapper::Element::startSubPathElement); v.setProperty (DrawablePath::ValueTreeWrapper::point1, startPos.toString(), nullptr); @@ -82514,7 +82510,7 @@ RelativePointPath::CloseSubPath::CloseSubPath() { } -const ValueTree RelativePointPath::CloseSubPath::createTree() const +ValueTree RelativePointPath::CloseSubPath::createTree() const { return ValueTree (DrawablePath::ValueTreeWrapper::Element::closeSubPathElement); } @@ -82540,7 +82536,7 @@ RelativePointPath::LineTo::LineTo (const RelativePoint& endPoint_) { } -const ValueTree RelativePointPath::LineTo::createTree() const +ValueTree RelativePointPath::LineTo::createTree() const { ValueTree v (DrawablePath::ValueTreeWrapper::Element::lineToElement); v.setProperty (DrawablePath::ValueTreeWrapper::point1, endPoint.toString(), nullptr); @@ -82570,7 +82566,7 @@ RelativePointPath::QuadraticTo::QuadraticTo (const RelativePoint& controlPoint, controlPoints[1] = endPoint; } -const ValueTree RelativePointPath::QuadraticTo::createTree() const +ValueTree RelativePointPath::QuadraticTo::createTree() const { ValueTree v (DrawablePath::ValueTreeWrapper::Element::quadraticToElement); v.setProperty (DrawablePath::ValueTreeWrapper::point1, controlPoints[0].toString(), nullptr); @@ -82603,7 +82599,7 @@ RelativePointPath::CubicTo::CubicTo (const RelativePoint& controlPoint1, const R controlPoints[2] = endPoint; } -const ValueTree RelativePointPath::CubicTo::createTree() const +ValueTree RelativePointPath::CubicTo::createTree() const { ValueTree v (DrawablePath::ValueTreeWrapper::Element::cubicToElement); v.setProperty (DrawablePath::ValueTreeWrapper::point1, controlPoints[0].toString(), nullptr); @@ -82762,7 +82758,7 @@ RelativeCoordinatePositionerBase::ComponentScope::ComponentScope (Component& com { } -const Expression RelativeCoordinatePositionerBase::ComponentScope::getSymbolValue (const String& symbol) const +Expression RelativeCoordinatePositionerBase::ComponentScope::getSymbolValue (const String& symbol) const { switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol)) { @@ -82801,7 +82797,7 @@ void RelativeCoordinatePositionerBase::ComponentScope::visitRelativeScope (const Expression::Scope::visitRelativeScope (scopeName, visitor); } -const String RelativeCoordinatePositionerBase::ComponentScope::getScopeUID() const +String RelativeCoordinatePositionerBase::ComponentScope::getScopeUID() const { return String::toHexString ((int) (pointer_sized_int) (void*) &component); } @@ -82856,7 +82852,7 @@ public: { } - const Expression getSymbolValue (const String& symbol) const + Expression getSymbolValue (const String& symbol) const { if (symbol == RelativeCoordinate::Strings::left || symbol == RelativeCoordinate::Strings::x || symbol == RelativeCoordinate::Strings::width || symbol == RelativeCoordinate::Strings::right @@ -87060,19 +87056,19 @@ public: typedef ReferenceCountedObjectPtr Ptr; - virtual const Ptr clone() const = 0; - virtual const Ptr applyClipTo (const Ptr& target) const = 0; + virtual Ptr clone() const = 0; + virtual Ptr applyClipTo (const Ptr& target) const = 0; - virtual const Ptr clipToRectangle (const Rectangle& r) = 0; - virtual const Ptr clipToRectangleList (const RectangleList& r) = 0; - virtual const Ptr excludeClipRectangle (const Rectangle& r) = 0; - virtual const Ptr clipToPath (const Path& p, const AffineTransform& transform) = 0; - virtual const Ptr clipToEdgeTable (const EdgeTable& et) = 0; - virtual const Ptr clipToImageAlpha (const Image& image, const AffineTransform& t, const bool betterQuality) = 0; - virtual const Ptr translated (const Point& delta) = 0; + virtual Ptr clipToRectangle (const Rectangle& r) = 0; + virtual Ptr clipToRectangleList (const RectangleList& r) = 0; + virtual Ptr excludeClipRectangle (const Rectangle& r) = 0; + virtual Ptr clipToPath (const Path& p, const AffineTransform& transform) = 0; + virtual Ptr clipToEdgeTable (const EdgeTable& et) = 0; + virtual Ptr clipToImageAlpha (const Image& image, const AffineTransform& t, const bool betterQuality) = 0; + virtual Ptr translated (const Point& delta) = 0; virtual bool clipRegionIntersects (const Rectangle& r) const = 0; - virtual const Rectangle getClipBounds() const = 0; + virtual Rectangle getClipBounds() const = 0; virtual void fillRectWithColour (Image::BitmapData& destData, const Rectangle& area, const PixelARGB& colour, bool replaceContents) const = 0; virtual void fillRectWithColour (Image::BitmapData& destData, const Rectangle& area, const PixelARGB& colour) const = 0; @@ -87259,23 +87255,23 @@ public: ClipRegion_EdgeTable (const Rectangle& bounds, const Path& p, const AffineTransform& t) : edgeTable (bounds, p, t) {} ClipRegion_EdgeTable (const ClipRegion_EdgeTable& other) : edgeTable (other.edgeTable) {} - const Ptr clone() const + Ptr clone() const { return new ClipRegion_EdgeTable (*this); } - const Ptr applyClipTo (const Ptr& target) const + Ptr applyClipTo (const Ptr& target) const { return target->clipToEdgeTable (edgeTable); } - const Ptr clipToRectangle (const Rectangle& r) + Ptr clipToRectangle (const Rectangle& r) { edgeTable.clipToRectangle (r); return edgeTable.isEmpty() ? nullptr : this; } - const Ptr clipToRectangleList (const RectangleList& r) + Ptr clipToRectangleList (const RectangleList& r) { RectangleList inverse (edgeTable.getMaximumBounds()); @@ -87286,26 +87282,26 @@ public: return edgeTable.isEmpty() ? nullptr : this; } - const Ptr excludeClipRectangle (const Rectangle& r) + Ptr excludeClipRectangle (const Rectangle& r) { edgeTable.excludeRectangle (r); return edgeTable.isEmpty() ? nullptr : this; } - const Ptr clipToPath (const Path& p, const AffineTransform& transform) + Ptr clipToPath (const Path& p, const AffineTransform& transform) { EdgeTable et (edgeTable.getMaximumBounds(), p, transform); edgeTable.clipToEdgeTable (et); return edgeTable.isEmpty() ? nullptr : this; } - const Ptr clipToEdgeTable (const EdgeTable& et) + Ptr clipToEdgeTable (const EdgeTable& et) { edgeTable.clipToEdgeTable (et); return edgeTable.isEmpty() ? nullptr : this; } - const Ptr clipToImageAlpha (const Image& image, const AffineTransform& transform, const bool betterQuality) + Ptr clipToImageAlpha (const Image& image, const AffineTransform& transform, const bool betterQuality) { const Image::BitmapData srcData (image, Image::BitmapData::readOnly); @@ -87350,7 +87346,7 @@ public: return edgeTable.isEmpty() ? nullptr : this; } - const Ptr translated (const Point& delta) + Ptr translated (const Point& delta) { edgeTable.translate ((float) delta.getX(), delta.getY()); return edgeTable.isEmpty() ? nullptr : this; @@ -87361,7 +87357,7 @@ public: return edgeTable.getMaximumBounds().intersects (r); } - const Rectangle getClipBounds() const + Rectangle getClipBounds() const { return edgeTable.getMaximumBounds(); } @@ -87462,50 +87458,50 @@ public: ClipRegion_RectangleList (const RectangleList& r) : clip (r) {} ClipRegion_RectangleList (const ClipRegion_RectangleList& other) : clip (other.clip) {} - const Ptr clone() const + Ptr clone() const { return new ClipRegion_RectangleList (*this); } - const Ptr applyClipTo (const Ptr& target) const + Ptr applyClipTo (const Ptr& target) const { return target->clipToRectangleList (clip); } - const Ptr clipToRectangle (const Rectangle& r) + Ptr clipToRectangle (const Rectangle& r) { clip.clipTo (r); return clip.isEmpty() ? nullptr : this; } - const Ptr clipToRectangleList (const RectangleList& r) + Ptr clipToRectangleList (const RectangleList& r) { clip.clipTo (r); return clip.isEmpty() ? nullptr : this; } - const Ptr excludeClipRectangle (const Rectangle& r) + Ptr excludeClipRectangle (const Rectangle& r) { clip.subtract (r); return clip.isEmpty() ? nullptr : this; } - const Ptr clipToPath (const Path& p, const AffineTransform& transform) + Ptr clipToPath (const Path& p, const AffineTransform& transform) { return Ptr (new ClipRegion_EdgeTable (clip))->clipToPath (p, transform); } - const Ptr clipToEdgeTable (const EdgeTable& et) + Ptr clipToEdgeTable (const EdgeTable& et) { return Ptr (new ClipRegion_EdgeTable (clip))->clipToEdgeTable (et); } - const Ptr clipToImageAlpha (const Image& image, const AffineTransform& transform, const bool betterQuality) + Ptr clipToImageAlpha (const Image& image, const AffineTransform& transform, const bool betterQuality) { return Ptr (new ClipRegion_EdgeTable (clip))->clipToImageAlpha (image, transform, betterQuality); } - const Ptr translated (const Point& delta) + Ptr translated (const Point& delta) { clip.offsetAll (delta.getX(), delta.getY()); return clip.isEmpty() ? nullptr : this; @@ -87516,7 +87512,7 @@ public: return clip.intersects (r); } - const Rectangle getClipBounds() const + Rectangle getClipBounds() const { return clip.getBounds(); } @@ -87962,12 +87958,12 @@ public: return false; } - const Rectangle getUntransformedClipBounds() const + Rectangle getUntransformedClipBounds() const { return clip != nullptr ? clip->getClipBounds() : Rectangle(); } - const Rectangle getClipBounds() const + Rectangle getClipBounds() const { if (clip != nullptr) { @@ -88852,7 +88848,7 @@ Drawable::ValueTreeWrapperBase::ValueTreeWrapperBase (const ValueTree& state_) { } -const String Drawable::ValueTreeWrapperBase::getID() const +String Drawable::ValueTreeWrapperBase::getID() const { return state [ComponentBuilder::idProperty]; } @@ -89032,7 +89028,7 @@ void DrawableShape::strokeChanged() repaint(); } -const Rectangle DrawableShape::getDrawableBounds() const +Rectangle DrawableShape::getDrawableBounds() const { if (isStrokeVisible()) return strokePath.getBounds(); @@ -89252,7 +89248,7 @@ DrawableShape::FillAndStrokeState::FillAndStrokeState (const ValueTree& state_) { } -const DrawableShape::RelativeFillType DrawableShape::FillAndStrokeState::getFill (const Identifier& fillOrStrokeType, ComponentBuilder::ImageProvider* imageProvider) const +DrawableShape::RelativeFillType DrawableShape::FillAndStrokeState::getFill (const Identifier& fillOrStrokeType, ComponentBuilder::ImageProvider* imageProvider) const { DrawableShape::RelativeFillType f; f.readFrom (state.getChildWithName (fillOrStrokeType), imageProvider); @@ -89276,7 +89272,7 @@ void DrawableShape::FillAndStrokeState::setFill (const Identifier& fillOrStrokeT newFill.writeTo (v, imageProvider, undoManager); } -const PathStrokeType DrawableShape::FillAndStrokeState::getStrokeType() const +PathStrokeType DrawableShape::FillAndStrokeState::getStrokeType() const { const String jointStyleString (state [jointStyle].toString()); const String capStyleString (state [capStyle].toString()); @@ -89342,7 +89338,7 @@ Drawable* DrawableComposite::createCopy() const return new DrawableComposite (*this); } -const Rectangle DrawableComposite::getDrawableBounds() const +Rectangle DrawableComposite::getDrawableBounds() const { Rectangle r; @@ -89363,7 +89359,7 @@ MarkerList* DrawableComposite::getMarkers (bool xAxis) return xAxis ? &markersX : &markersY; } -const RelativeRectangle DrawableComposite::getContentArea() const +RelativeRectangle DrawableComposite::getContentArea() const { jassert (markersX.getNumMarkers() >= 2 && markersX.getMarker (0)->name == contentLeftMarkerName && markersX.getMarker (1)->name == contentRightMarkerName); jassert (markersY.getNumMarkers() >= 2 && markersY.getMarker (0)->name == contentTopMarkerName && markersY.getMarker (1)->name == contentBottomMarkerName); @@ -89525,7 +89521,7 @@ ValueTree DrawableComposite::ValueTreeWrapper::getChildListCreating (UndoManager return state.getOrCreateChildWithName (childGroupTag, undoManager); } -const RelativeParallelogram DrawableComposite::ValueTreeWrapper::getBoundingBox() const +RelativeParallelogram DrawableComposite::ValueTreeWrapper::getBoundingBox() const { return RelativeParallelogram (state.getProperty (topLeft, "0, 0"), state.getProperty (topRight, "100, 0"), @@ -89548,7 +89544,7 @@ void DrawableComposite::ValueTreeWrapper::resetBoundingBoxToContentArea (UndoMan RelativePoint (content.left, content.bottom)), undoManager); } -const RelativeRectangle DrawableComposite::ValueTreeWrapper::getContentArea() const +RelativeRectangle DrawableComposite::ValueTreeWrapper::getContentArea() const { MarkerList::ValueTreeWrapper markersX (getMarkerList (true)); MarkerList::ValueTreeWrapper markersY (getMarkerList (false)); @@ -89593,7 +89589,7 @@ void DrawableComposite::refreshFromValueTree (const ValueTree& tree, ComponentBu builder.updateChildComponents (*this, wrapper.getChildList()); } -const ValueTree DrawableComposite::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const +ValueTree DrawableComposite::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const { ValueTree tree (valueTreeType); ValueTreeWrapper v (tree); @@ -89734,7 +89730,7 @@ void DrawableImage::paint (Graphics& g) } } -const Rectangle DrawableImage::getDrawableBounds() const +Rectangle DrawableImage::getDrawableBounds() const { return image.getBounds().toFloat(); } @@ -89764,7 +89760,7 @@ DrawableImage::ValueTreeWrapper::ValueTreeWrapper (const ValueTree& state_) jassert (state.hasType (valueTreeType)); } -const var DrawableImage::ValueTreeWrapper::getImageIdentifier() const +var DrawableImage::ValueTreeWrapper::getImageIdentifier() const { return state [image]; } @@ -89815,7 +89811,7 @@ Value DrawableImage::ValueTreeWrapper::getOverlayColourValue (UndoManager* undoM return state.getPropertyAsValue (overlay, undoManager); } -const RelativeParallelogram DrawableImage::ValueTreeWrapper::getBoundingBox() const +RelativeParallelogram DrawableImage::ValueTreeWrapper::getBoundingBox() const { return RelativeParallelogram (state.getProperty (topLeft, "0, 0"), state.getProperty (topRight, "100, 0"), @@ -89861,7 +89857,7 @@ void DrawableImage::refreshFromValueTree (const ValueTree& tree, ComponentBuilde } } -const ValueTree DrawableImage::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const +ValueTree DrawableImage::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const { ValueTree tree (valueTreeType); ValueTreeWrapper v (tree); @@ -90116,7 +90112,7 @@ int DrawablePath::ValueTreeWrapper::Element::getNumControlPoints() const noexcep return 0; } -const RelativePoint DrawablePath::ValueTreeWrapper::Element::getControlPoint (const int index) const +RelativePoint DrawablePath::ValueTreeWrapper::Element::getControlPoint (const int index) const { jassert (index >= 0 && index < getNumControlPoints()); return RelativePoint (state [index == 0 ? point1 : (index == 1 ? point2 : point3)].toString()); @@ -90134,7 +90130,7 @@ void DrawablePath::ValueTreeWrapper::Element::setControlPoint (const int index, state.setProperty (index == 0 ? point1 : (index == 1 ? point2 : point3), point.toString(), undoManager); } -const RelativePoint DrawablePath::ValueTreeWrapper::Element::getStartPoint() const +RelativePoint DrawablePath::ValueTreeWrapper::Element::getStartPoint() const { const Identifier i (state.getType()); @@ -90146,7 +90142,7 @@ const RelativePoint DrawablePath::ValueTreeWrapper::Element::getStartPoint() con return getPreviousElement().getEndPoint(); } -const RelativePoint DrawablePath::ValueTreeWrapper::Element::getEndPoint() const +RelativePoint DrawablePath::ValueTreeWrapper::Element::getEndPoint() const { const Identifier i (state.getType()); if (i == startSubPathElement || i == lineToElement) return getControlPoint (0); @@ -90184,7 +90180,7 @@ float DrawablePath::ValueTreeWrapper::Element::getLength (Expression::Scope* sco return 0; } -const String DrawablePath::ValueTreeWrapper::Element::getModeOfEndPoint() const +String DrawablePath::ValueTreeWrapper::Element::getModeOfEndPoint() const { return state [mode].toString(); } @@ -90244,7 +90240,7 @@ void DrawablePath::ValueTreeWrapper::Element::convertToPathBreak (UndoManager* u namespace DrawablePathHelpers { - const Point findCubicSubdivisionPoint (float proportion, const Point points[4]) + Point findCubicSubdivisionPoint (float proportion, const Point points[4]) { const Point mid1 (points[0] + (points[1] - points[0]) * proportion), mid2 (points[1] + (points[2] - points[1]) * proportion), @@ -90256,7 +90252,7 @@ namespace DrawablePathHelpers return newCp1 + (newCp2 - newCp1) * proportion; } - const Point findQuadraticSubdivisionPoint (float proportion, const Point points[3]) + Point findQuadraticSubdivisionPoint (float proportion, const Point points[3]) { const Point mid1 (points[0] + (points[1] - points[0]) * proportion), mid2 (points[1] + (points[2] - points[1]) * proportion); @@ -90415,7 +90411,7 @@ void DrawablePath::refreshFromValueTree (const ValueTree& tree, ComponentBuilder setPath (newRelativePath); } -const ValueTree DrawablePath::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const +ValueTree DrawablePath::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const { ValueTree tree (valueTreeType); ValueTreeWrapper v (tree); @@ -90541,7 +90537,7 @@ DrawableRectangle::ValueTreeWrapper::ValueTreeWrapper (const ValueTree& state_) jassert (state.hasType (valueTreeType)); } -const RelativeParallelogram DrawableRectangle::ValueTreeWrapper::getRectangle() const +RelativeParallelogram DrawableRectangle::ValueTreeWrapper::getRectangle() const { return RelativeParallelogram (state.getProperty (topLeft, "0, 0"), state.getProperty (topRight, "100, 0"), @@ -90560,7 +90556,7 @@ void DrawableRectangle::ValueTreeWrapper::setCornerSize (const RelativePoint& ne state.setProperty (cornerSize, newSize.toString(), undoManager); } -const RelativePoint DrawableRectangle::ValueTreeWrapper::getCornerSize() const +RelativePoint DrawableRectangle::ValueTreeWrapper::getCornerSize() const { return RelativePoint (state [cornerSize]); } @@ -90581,7 +90577,7 @@ void DrawableRectangle::refreshFromValueTree (const ValueTree& tree, ComponentBu setCornerSize (v.getCornerSize()); } -const ValueTree DrawableRectangle::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const +ValueTree DrawableRectangle::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const { ValueTree tree (valueTreeType); ValueTreeWrapper v (tree); @@ -90749,7 +90745,7 @@ void DrawableText::paint (Graphics& g) ga.draw (g, transform); } -const Rectangle DrawableText::getDrawableBounds() const +Rectangle DrawableText::getDrawableBounds() const { return RelativeParallelogram::getBoundingBox (resolvedPoints); } @@ -90872,7 +90868,7 @@ void DrawableText::refreshFromValueTree (const ValueTree& tree, ComponentBuilder } } -const ValueTree DrawableText::createValueTree (ComponentBuilder::ImageProvider*) const +ValueTree DrawableText::createValueTree (ComponentBuilder::ImageProvider*) const { ValueTree tree (valueTreeType); ValueTreeWrapper v (tree); @@ -91526,11 +91522,11 @@ private: } } - const FillType getPathFillType (const Path& path, - const String& fill, - const String& fillOpacity, - const String& overallOpacity, - const Colour& defaultColour) const + FillType getPathFillType (const Path& path, + const String& fill, + const String& fillOpacity, + const String& overallOpacity, + const Colour& defaultColour) const { float opacity = 1.0f; @@ -91644,7 +91640,7 @@ private: return colour.withMultipliedAlpha (opacity); } - const PathStrokeType getStrokeFor (const XmlElement* const xml) const + PathStrokeType getStrokeFor (const XmlElement* const xml) const { const String strokeWidth (getStyleAttribute (xml, "stroke-width")); const String cap (getStyleAttribute (xml, "stroke-linecap")); @@ -92324,7 +92320,7 @@ public: faces.insertMultiple (-1, CachedFace(), numToCache); } - const Typeface::Ptr findTypefaceFor (const Font& font) + Typeface::Ptr findTypefaceFor (const Font& font) { const int flags = font.getStyleFlags() & (Font::bold | Font::italic); const String faceName (font.getTypefaceName()); @@ -92370,7 +92366,7 @@ public: return face.typeface; } - const Typeface::Ptr getDefaultTypeface() const noexcept + Typeface::Ptr getDefaultTypeface() const noexcept { return defaultFace; } @@ -92413,7 +92409,8 @@ Font::SharedFontInternal::SharedFontInternal (const float height_, const int sty kerning (0), ascent (0), styleFlags (styleFlags_), - typeface (TypefaceCache::getInstance()->getDefaultTypeface()) + typeface ((styleFlags_ & (Font::bold | Font::italic)) == 0 + ? TypefaceCache::getInstance()->getDefaultTypeface() : nullptr) { } @@ -92424,7 +92421,7 @@ Font::SharedFontInternal::SharedFontInternal (const String& typefaceName_, const kerning (0), ascent (0), styleFlags (styleFlags_), - typeface (0) + typeface (nullptr) { } @@ -93920,7 +93917,7 @@ Typeface::~Typeface() { } -const Typeface::Ptr Typeface::getFallbackTypeface() +Typeface::Ptr Typeface::getFallbackTypeface() { const Font fallbackFont (Font::getFallbackFontName(), 10, 0); return fallbackFont.getTypeface(); @@ -131594,7 +131591,7 @@ AudioFormatWriter* FlacAudioFormat::createWriterFor (OutputStream* out, return nullptr; } -const StringArray FlacAudioFormat::getQualityOptions() +StringArray FlacAudioFormat::getQualityOptions() { const char* options[] = { "0 (Fastest)", "1", "2", "3", "4", "5 (Default)","6", "7", "8 (Highest quality)", 0 }; return StringArray (options); @@ -194859,7 +194856,7 @@ AudioFormatWriter* OggVorbisAudioFormat::createWriterFor (OutputStream* out, return w->ok ? w.release() : nullptr; } -const StringArray OggVorbisAudioFormat::getQualityOptions() +StringArray OggVorbisAudioFormat::getQualityOptions() { const char* options[] = { "64 kbps", "80 kbps", "96 kbps", "112 kbps", "128 kbps", "160 kbps", "192 kbps", "224 kbps", "256 kbps", "320 kbps", "500 kbps", 0 }; @@ -244625,7 +244622,7 @@ void Logger::outputDebugString (const String& text) #pragma intrinsic (__cpuid) #pragma intrinsic (__rdtsc) -const String SystemStats::getCpuVendor() +String SystemStats::getCpuVendor() { int info [4]; __cpuid (info, 0); @@ -244674,7 +244671,7 @@ static void juce_getCpuVendor (char* const v) memcpy (v, vendor, 16); } -const String SystemStats::getCpuVendor() +String SystemStats::getCpuVendor() { char v [16]; juce_getCpuVendor (v); @@ -244734,7 +244731,7 @@ SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() return UnknownOS; } -const String SystemStats::getOperatingSystemName() +String SystemStats::getOperatingSystemName() { const char* name = "Unknown OS"; @@ -244922,7 +244919,7 @@ int SystemStats::getPageSize() return systemInfo.dwPageSize; } -const String SystemStats::getLogonName() +String SystemStats::getLogonName() { TCHAR text [256] = { 0 }; DWORD len = numElementsInArray (text) - 1; @@ -244930,12 +244927,12 @@ const String SystemStats::getLogonName() return String (text, len); } -const String SystemStats::getFullUserName() +String SystemStats::getFullUserName() { return getLogonName(); } -const String SystemStats::getComputerName() +String SystemStats::getComputerName() { TCHAR text [MAX_COMPUTERNAME_LENGTH + 1] = { 0 }; DWORD len = numElementsInArray (text) - 1; @@ -245388,7 +245385,7 @@ namespace WindowsFileHelpers reinterpret_cast (ft)->QuadPart = time * 10000 + literal64bit (116444736000000000); } - const String getDriveFromPath (String path) + String getDriveFromPath (String path) { // (mess with the string to make sure it's not sharing its internal storage) path = (path + " ").dropLastCharacters(1); @@ -246766,8 +246763,8 @@ namespace } } -const String PlatformUtilities::getRegistryValue (const String& regValuePath, - const String& defaultValue) +String PlatformUtilities::getRegistryValue (const String& regValuePath, + const String& defaultValue) { String valueName, result (defaultValue); HKEY k = findKeyForPath (regValuePath, false, valueName); @@ -246877,7 +246874,7 @@ bool juce_IsRunningInWine() return ntdll != 0 && GetProcAddress (ntdll, "wine_get_version") != 0; } -const String JUCE_CALLTYPE PlatformUtilities::getCurrentCommandLineParams() +String JUCE_CALLTYPE PlatformUtilities::getCurrentCommandLineParams() { const String commandLine (GetCommandLineW()); return String (CharacterFunctions::findEndOfToken (commandLine.getCharPointer(), @@ -247559,7 +247556,7 @@ private: const MAT2 WindowsTypeface::identityMatrix = { { 0, 1 }, { 0, 0 }, { 0, 0 }, { 0, 1 } }; -const Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) +Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) { return new WindowsTypeface (font); } @@ -249801,7 +249798,7 @@ private: handleMouseEvent (0, position, currentModifiers, getMouseEventTime()); } - const StringArray getAvailableRenderingEngines() + StringArray getAvailableRenderingEngines() { StringArray s (ComponentPeer::getAvailableRenderingEngines()); @@ -250859,7 +250856,7 @@ private: compositionInProgress = false; } - const String getCompositionString (HIMC hImc, const DWORD type) const + String getCompositionString (HIMC hImc, const DWORD type) const { jassert (hImc != 0); @@ -250894,7 +250891,7 @@ private: // Get selected/highlighted range while doing composition: // returned range is relative to beginning of TextInputTarget, not composition string - const Range getCompositionSelection (HIMC hImc, LPARAM lParam) const + Range getCompositionSelection (HIMC hImc, LPARAM lParam) const { jassert (hImc != 0); int selectionStart = 0; @@ -250935,7 +250932,7 @@ private: target->setHighlightedRegion (newSelection); } - const Array > getCompositionUnderlines (HIMC hImc, LPARAM lParam) const + Array > getCompositionUnderlines (HIMC hImc, LPARAM lParam) const { Array > result; @@ -252578,7 +252575,7 @@ void QuickTimeMovieComponent::closeMovie() pimpl->clearHandle(); } -const File QuickTimeMovieComponent::getCurrentMovieFile() const +File QuickTimeMovieComponent::getCurrentMovieFile() const { return movieFile; } @@ -253691,7 +253688,7 @@ void DirectShowComponent::closeMovie() videoPath = String::empty; } -const File DirectShowComponent::getCurrentMoviePath() const { return videoPath; } +File DirectShowComponent::getCurrentMoviePath() const { return videoPath; } bool DirectShowComponent::isMovieOpen() const { return videoLoaded; } double DirectShowComponent::getMovieDuration() const { return videoLoaded ? context->getDuration() : 0.0; } void DirectShowComponent::setLooping (const bool shouldLoop) { looping = shouldLoop; } @@ -255492,7 +255489,7 @@ const int framesPerIndexRead = 4; } -const StringArray AudioCDReader::getAvailableCDNames() +StringArray AudioCDReader::getAvailableCDNames() { using namespace CDReaderHelpers; StringArray results; @@ -256056,7 +256053,7 @@ AudioCDBurner::~AudioCDBurner() pimpl.release()->releaseObjects(); } -const StringArray AudioCDBurner::findAvailableDevices() +StringArray AudioCDBurner::findAvailableDevices() { StringArray devs; CDBurnerHelpers::enumCDBurners (&devs, -1, 0); @@ -256104,7 +256101,7 @@ AudioCDBurner::DiskState AudioCDBurner::waitUntilStateChange (int timeOutMillise return newState; } -const Array AudioCDBurner::getAvailableWriteSpeeds() const +Array AudioCDBurner::getAvailableWriteSpeeds() const { Array results; const int maxSpeed = pimpl->getIntProperty (L"MaxWriteSpeed", 1); @@ -256134,8 +256131,8 @@ int AudioCDBurner::getNumAvailableAudioBlocks() const return blocksFree; } -const String AudioCDBurner::burn (AudioCDBurner::BurnProgressListener* listener, bool ejectDiscAfterwards, - bool performFakeBurnForTesting, int writeSpeed) +String AudioCDBurner::burn (AudioCDBurner::BurnProgressListener* listener, bool ejectDiscAfterwards, + bool performFakeBurnForTesting, int writeSpeed) { pimpl->setIntProperty (L"WriteSpeed", writeSpeed > 0 ? writeSpeed : -1); @@ -256434,7 +256431,7 @@ private: Array MidiInCollector::activeMidiCollectors; -const StringArray MidiInput::getDevices() +StringArray MidiInput::getDevices() { StringArray s; const int num = midiInGetNumDevs(); @@ -256537,7 +256534,7 @@ private: Array MidiOutHandle::activeHandles; -const StringArray MidiOutput::getDevices() +StringArray MidiOutput::getDevices() { StringArray s; const int num = midiOutGetNumDevs(); @@ -256836,8 +256833,8 @@ public: } } - const StringArray getOutputChannelNames() { return outputChannelNames; } - const StringArray getInputChannelNames() { return inputChannelNames; } + StringArray getOutputChannelNames() { return outputChannelNames; } + StringArray getInputChannelNames() { return inputChannelNames; } int getNumSampleRates() { return sampleRates.size(); } double getSampleRate (int index) { return sampleRates [index]; } @@ -257508,7 +257505,7 @@ private: return false; } - const String initDriver() + String initDriver() { if (asioObject != nullptr) { @@ -257529,7 +257526,7 @@ private: return "No Driver"; } - const String openDevice() + String openDevice() { // use this in case the driver starts opening dialog boxes.. Component modalWindow (String::empty); @@ -258338,7 +258335,7 @@ public: } } - const StringArray getDeviceNames (bool /*wantInputNames*/) const + StringArray getDeviceNames (bool /*wantInputNames*/) const { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -258631,7 +258628,7 @@ BEGIN_JUCE_NAMESPACE namespace { - const String getDSErrorMessage (HRESULT hr) + String getDSErrorMessage (HRESULT hr) { const char* result = nullptr; @@ -258753,7 +258750,7 @@ public: } } - const String open() + String open() { log ("opening dsound out device: " + name + " rate=" + String (sampleRate) + " bits=" + String (bitDepth) + " buf=" + String (bufferSizeSamples)); @@ -259070,7 +259067,7 @@ public: } } - const String open() + String open() { log ("opening dsound in device: " + name + " rate=" + String (sampleRate) + " bits=" + String (bitDepth) + " buf=" + String (bufferSizeSamples)); @@ -259339,8 +259336,8 @@ public: const BigInteger getActiveInputChannels() const { return enabledInputs; } int getOutputLatencyInSamples() { return (int) (getCurrentBufferSizeSamples() * 1.5); } int getInputLatencyInSamples() { return getOutputLatencyInSamples(); } - const StringArray getOutputChannelNames() { return outChannels; } - const StringArray getInputChannelNames() { return inChannels; } + StringArray getOutputChannelNames() { return outChannels; } + StringArray getInputChannelNames() { return inChannels; } int getNumSampleRates() { return 4; } int getDefaultBufferSize() { return 2560; } @@ -259439,9 +259436,9 @@ private: AudioIODeviceCallback* callback; CriticalSection startStopLock; - const String openDevice (const BigInteger& inputChannels, - const BigInteger& outputChannels, - double sampleRate_, int bufferSizeSamples_); + String openDevice (const BigInteger& inputChannels, + const BigInteger& outputChannels, + double sampleRate_, int bufferSizeSamples_); void closeDevice() { @@ -259606,7 +259603,7 @@ public: } } - const StringArray getDeviceNames (bool wantInputNames) const + StringArray getDeviceNames (bool wantInputNames) const { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -259729,9 +259726,9 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DSoundAudioIODeviceType); }; -const String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels, - const BigInteger& outputChannels, - double sampleRate_, int bufferSizeSamples_) +String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels, + const BigInteger& outputChannels, + double sampleRate_, int bufferSizeSamples_) { closeDevice(); totalSamplesOut = 0; @@ -259936,7 +259933,7 @@ bool check (HRESULT hr) return SUCCEEDED (hr); } -const String getDeviceID (IMMDevice* const device) +String getDeviceID (IMMDevice* const device) { String s; WCHAR* deviceId = nullptr; @@ -260517,7 +260514,7 @@ public: return false; } - const StringArray getOutputChannelNames() + StringArray getOutputChannelNames() { StringArray outChannels; @@ -260528,7 +260525,7 @@ public: return outChannels; } - const StringArray getInputChannelNames() + StringArray getInputChannelNames() { StringArray inChannels; @@ -260879,7 +260876,7 @@ public: outputDeviceNames.appendNumbersToDuplicates (false, false); } - const StringArray getDeviceNames (bool wantInputNames) const + StringArray getDeviceNames (bool wantInputNames) const { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -260935,7 +260932,7 @@ public: private: bool hasScanned; - static const String getDefaultEndpoint (IMMDeviceEnumerator* const enumerator, const bool forCapture) + static String getDefaultEndpoint (IMMDeviceEnumerator* const enumerator, const bool forCapture) { String s; IMMDevice* dev = nullptr; @@ -261657,7 +261654,7 @@ Component* CameraDevice::createViewerComponent() return new DShowCameraDeviceInteral::DShowCaptureViewerComp (static_cast (internal)); } -const String CameraDevice::getFileExtension() +String CameraDevice::getFileExtension() { return ".wmv"; } @@ -261671,7 +261668,7 @@ void CameraDevice::startRecordingToFile (const File& file, int quality) isRecording = d->createFileCaptureFilter (file, quality); } -const Time CameraDevice::getTimeOfFirstRecordedFrame() const +Time CameraDevice::getTimeOfFirstRecordedFrame() const { DShowCameraDeviceInteral* const d = (DShowCameraDeviceInteral*) internal; return d->firstRecordedTime; @@ -261768,7 +261765,7 @@ namespace } } -const StringArray CameraDevice::getAvailableDevices() +StringArray CameraDevice::getAvailableDevices() { StringArray devs; String dummy; @@ -262521,7 +262518,7 @@ void juce_runSystemCommand (const String& command) (void) result; } -const String juce_getOutputFromCommand (const String& command) +String juce_getOutputFromCommand (const String& command) { // slight bodge here, as we just pipe the output into a temp file and read it... const File tempFile (File::getSpecialLocation (File::tempDirectory) @@ -263512,7 +263509,7 @@ private: } } - const String responseHeader (readResponse (socketHandle, timeOutTime)); + String responseHeader (readResponse (socketHandle, timeOutTime)); if (responseHeader.isNotEmpty()) { @@ -263549,7 +263546,7 @@ private: closeSocket(); } - static const String readResponse (const int socketHandle, const uint32 timeOutTime) + static String readResponse (const int socketHandle, const uint32 timeOutTime) { int bytesRead = 0, numConsecutiveLFs = 0; MemoryBlock buffer (1024, true); @@ -263683,7 +263680,7 @@ private: return true; } - static const String findHeaderItem (const StringArray& lines, const String& itemName) + static String findHeaderItem (const StringArray& lines, const String& itemName) { for (int i = 0; i < lines.size(); ++i) if (lines[i].startsWithIgnoreCase (itemName)) @@ -263726,7 +263723,7 @@ SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() return Linux; } -const String SystemStats::getOperatingSystemName() +String SystemStats::getOperatingSystemName() { return "Linux"; } @@ -263743,7 +263740,7 @@ bool SystemStats::isOperatingSystem64Bit() namespace LinuxStatsHelpers { - const String getCpuInfo (const char* const key) + String getCpuInfo (const char* const key) { StringArray lines; lines.addLines (File ("/proc/cpuinfo").loadFileAsString()); @@ -263756,7 +263753,7 @@ namespace LinuxStatsHelpers } } -const String SystemStats::getCpuVendor() +String SystemStats::getCpuVendor() { return LinuxStatsHelpers::getCpuInfo ("vendor_id"); } @@ -263781,7 +263778,7 @@ int SystemStats::getPageSize() return sysconf (_SC_PAGESIZE); } -const String SystemStats::getLogonName() +String SystemStats::getLogonName() { const char* user = getenv ("USER"); @@ -263795,12 +263792,12 @@ const String SystemStats::getLogonName() return CharPointer_UTF8 (user); } -const String SystemStats::getFullUserName() +String SystemStats::getFullUserName() { return getLogonName(); } -const String SystemStats::getComputerName() +String SystemStats::getComputerName() { char name [256] = { 0 }; if (gethostname (name, sizeof (name) - 1) == 0) @@ -264363,7 +264360,7 @@ private: return true; } - const Message::Ptr popNextMessage() + Message::Ptr popNextMessage() { const ScopedLock sl (lock); @@ -265115,7 +265112,7 @@ public: } }; -const Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) +Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) { return new FreetypeTypeface (font); } @@ -265130,8 +265127,8 @@ StringArray Font::findAllTypefaceNames() namespace LinuxFontHelpers { - const String pickBestFont (const StringArray& names, - const char* const* choicesString) + String pickBestFont (const StringArray& names, + const char* const* choicesString) { const StringArray choices (choicesString); @@ -265153,7 +265150,7 @@ namespace LinuxFontHelpers return names[0]; } - const String getDefaultSansSerifFontName() + String getDefaultSansSerifFontName() { StringArray allFonts; FreeTypeInterface::getInstance()->getSansSerifNames (allFonts); @@ -265162,7 +265159,7 @@ namespace LinuxFontHelpers return pickBestFont (allFonts, targets); } - const String getDefaultSerifFontName() + String getDefaultSerifFontName() { StringArray allFonts; FreeTypeInterface::getInstance()->getSerifNames (allFonts); @@ -265171,7 +265168,7 @@ namespace LinuxFontHelpers return pickBestFont (allFonts, targets); } - const String getDefaultMonospacedFontName() + String getDefaultMonospacedFontName() { StringArray allFonts; FreeTypeInterface::getInstance()->getMonospacedNames (allFonts); @@ -269227,8 +269224,8 @@ public: close(); } - const StringArray getOutputChannelNames() { return internal.channelNamesOut; } - const StringArray getInputChannelNames() { return internal.channelNamesIn; } + StringArray getOutputChannelNames() { return internal.channelNamesOut; } + StringArray getInputChannelNames() { return internal.channelNamesIn; } int getNumSampleRates() { return internal.sampleRates.size(); } double getSampleRate (int index) { return internal.sampleRates [index]; } @@ -269453,7 +269450,7 @@ public: outputNames.appendNumbersToDuplicates (false, true); } - const StringArray getDeviceNames (bool wantInputNames) const + StringArray getDeviceNames (bool wantInputNames) const { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -269522,7 +269519,7 @@ private: return (isInput || isOutput) && rates.size() > 0; } - /*static const String getHint (void* hint, const char* type) + /*static String getHint (void* hint, const char* type) { char* const n = snd_device_name_get_hint (hint, type); const String s ((const char*) n); @@ -269692,7 +269689,7 @@ public: } } - const StringArray getChannelNames (bool forInput) const + StringArray getChannelNames (bool forInput) const { StringArray names; const char** const ports = JUCE_NAMESPACE::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ @@ -269715,8 +269712,8 @@ public: return names; } - const StringArray getOutputChannelNames() { return getChannelNames (false); } - const StringArray getInputChannelNames() { return getChannelNames (true); } + StringArray getOutputChannelNames() { return getChannelNames (false); } + StringArray getInputChannelNames() { return getChannelNames (true); } int getNumSampleRates() { return client != 0 ? 1 : 0; } double getSampleRate (int index) { return client != 0 ? JUCE_NAMESPACE::jack_get_sample_rate (client) : 0; } int getNumBufferSizesAvailable() { return client != 0 ? 1 : 0; } @@ -270048,7 +270045,7 @@ public: } } - const StringArray getDeviceNames (bool wantInputNames) const + StringArray getDeviceNames (bool wantInputNames) const { jassert (hasScanned); // need to call scanForDevices() before doing this return wantInputNames ? inputNames : outputNames; @@ -270299,7 +270296,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiOutputDevice); }; -const StringArray MidiOutput::getDevices() +StringArray MidiOutput::getDevices() { StringArray devices; iterateMidiDevices (false, devices, -1); @@ -270459,7 +270456,7 @@ int MidiInput::getDefaultDeviceIndex() return 0; } -const StringArray MidiInput::getDevices() +StringArray MidiInput::getDevices() { StringArray devices; iterateMidiDevices (true, devices, -1); @@ -270501,7 +270498,7 @@ MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallba // (These are just stub functions if ALSA is unavailable...) -const StringArray MidiOutput::getDevices() { return StringArray(); } +StringArray MidiOutput::getDevices() { return StringArray(); } int MidiOutput::getDefaultDeviceIndex() { return 0; } MidiOutput* MidiOutput::openDevice (int) { return nullptr; } MidiOutput* MidiOutput::createNewDevice (const String&) { return nullptr; } @@ -270513,7 +270510,7 @@ MidiInput::~MidiInput() {} void MidiInput::start() {} void MidiInput::stop() {} int MidiInput::getDefaultDeviceIndex() { return 0; } -const StringArray MidiInput::getDevices() { return StringArray(); } +StringArray MidiInput::getDevices() { return StringArray(); } MidiInput* MidiInput::openDevice (int, MidiInputCallback*) { return nullptr; } MidiInput* MidiInput::createNewDevice (const String&, MidiInputCallback*) { return nullptr; } @@ -270533,7 +270530,7 @@ AudioCDReader::AudioCDReader() { } -const StringArray AudioCDReader::getAvailableCDNames() +StringArray AudioCDReader::getAvailableCDNames() { StringArray names; return names; @@ -270924,7 +270921,7 @@ private: namespace { - const String nsStringToJuce (NSString* s) + String nsStringToJuce (NSString* s) { return CharPointer_UTF8 ([s UTF8String]); } @@ -270935,7 +270932,7 @@ namespace } } -const String PlatformUtilities::cfStringToJuceString (CFStringRef cfString) +String PlatformUtilities::cfStringToJuceString (CFStringRef cfString) { if (cfString == 0) return String::empty; @@ -270955,7 +270952,7 @@ CFStringRef PlatformUtilities::juceStringToCFString (const String& s) return CFStringCreateWithCharacters (kCFAllocatorDefault, (const UniChar*) utf16.getAddress(), utf16.length()); } -const String PlatformUtilities::convertToPrecomposedUnicode (const String& s) +String PlatformUtilities::convertToPrecomposedUnicode (const String& s) { #if JUCE_IOS JUCE_AUTORELEASEPOOL @@ -271111,7 +271108,7 @@ SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() return MacOSX; } -const String SystemStats::getOperatingSystemName() +String SystemStats::getOperatingSystemName() { #if JUCE_IOS String s ("iOS "); @@ -271157,7 +271154,7 @@ int SystemStats::getMemorySizeInMegabytes() return (int) (mem / (1024 * 1024)); } -const String SystemStats::getCpuVendor() +String SystemStats::getCpuVendor() { #if JUCE_INTEL uint32 dummy = 0; @@ -271186,17 +271183,17 @@ int SystemStats::getCpuSpeedInMegaherz() return (int) (speedHz / 1000000); } -const String SystemStats::getLogonName() +String SystemStats::getLogonName() { return nsStringToJuce (NSUserName()); } -const String SystemStats::getFullUserName() +String SystemStats::getFullUserName() { return nsStringToJuce (NSFullUserName()); } -const String SystemStats::getComputerName() +String SystemStats::getComputerName() { char name [256] = { 0 }; if (gethostname (name, sizeof (name) - 1) == 0) @@ -272561,7 +272558,7 @@ void juce_runSystemCommand (const String& command) (void) result; } -const String juce_getOutputFromCommand (const String& command) +String juce_getOutputFromCommand (const String& command) { // slight bodge here, as we just pipe the output into a temp file and read it... const File tempFile (File::getSpecialLocation (File::tempDirectory) @@ -272881,7 +272878,7 @@ namespace FileHelpers } #if JUCE_IOS - const String getIOSSystemLocation (NSSearchPathDirectory type) + String getIOSSystemLocation (NSSearchPathDirectory type) { return nsStringToJuce ([NSSearchPathForDirectoriesInDomains (type, NSUserDomainMask, YES) objectAtIndex: 0]); @@ -273220,7 +273217,7 @@ bool PlatformUtilities::makeFSRefFromPath (FSRef* destFSRef, const String& path) return FSPathMakeRef (reinterpret_cast (path.toUTF8().getAddress()), destFSRef, 0) == noErr; } -const String PlatformUtilities::makePathFromFSRef (FSRef* file) +String PlatformUtilities::makePathFromFSRef (FSRef* file) { char path [2048] = { 0 }; @@ -274583,7 +274580,7 @@ private: #endif -const Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) +Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) { return new MacTypeface (font); } @@ -277861,7 +277858,7 @@ public: close(); } - const StringArray getOutputChannelNames() + StringArray getOutputChannelNames() { StringArray s; s.add ("Left"); @@ -277869,7 +277866,7 @@ public: return s; } - const StringArray getInputChannelNames() + StringArray getInputChannelNames() { StringArray s; if (audioInputIsAvailable) @@ -278339,7 +278336,7 @@ public: { } - const StringArray getDeviceNames (bool wantInputNames) const + StringArray getDeviceNames (bool wantInputNames) const { StringArray s; s.add ("iPhone Audio"); @@ -278406,7 +278403,7 @@ namespace CoreMidiHelpers #undef CHECK_ERROR #define CHECK_ERROR(a) CoreMidiHelpers::logError (a, __LINE__) - const String getEndpointName (MIDIEndpointRef endpoint, bool isExternal) + String getEndpointName (MIDIEndpointRef endpoint, bool isExternal) { String result; CFStringRef str = 0; @@ -278468,7 +278465,7 @@ namespace CoreMidiHelpers return result; } - const String getConnectedEndpointName (MIDIEndpointRef endpoint) + String getConnectedEndpointName (MIDIEndpointRef endpoint) { String result; @@ -278644,7 +278641,7 @@ namespace CoreMidiHelpers } } -const StringArray MidiOutput::getDevices() +StringArray MidiOutput::getDevices() { StringArray s; @@ -278765,7 +278762,7 @@ void MidiOutput::sendMessageNow (const MidiMessage& message) } } -const StringArray MidiInput::getDevices() +StringArray MidiInput::getDevices() { StringArray s; @@ -278910,9 +278907,9 @@ void MidiInput::stop() MidiOutput::~MidiOutput() {} void MidiOutput::sendMessageNow (const MidiMessage& message) {} -const StringArray MidiOutput::getDevices() { return StringArray(); } +StringArray MidiOutput::getDevices() { return StringArray(); } MidiOutput* MidiOutput::openDevice (int index) { return nullptr; } -const StringArray MidiInput::getDevices() { return StringArray(); } +StringArray MidiInput::getDevices() { return StringArray(); } MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) { return nullptr; } #endif @@ -279622,7 +279619,7 @@ private: #endif -const Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) +Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) { return new MacTypeface (font); } @@ -280687,7 +280684,7 @@ public: void toFront (bool makeActiveWindow); void toBehind (ComponentPeer* other); void setIcon (const Image& newIcon); - const StringArray getAvailableRenderingEngines(); + StringArray getAvailableRenderingEngines(); int getCurrentRenderingEngine() const; void setCurrentRenderingEngine (int index); @@ -282063,7 +282060,7 @@ void NSViewComponentPeer::drawRect (NSRect r) } } -const StringArray NSViewComponentPeer::getAvailableRenderingEngines() +StringArray NSViewComponentPeer::getAvailableRenderingEngines() { StringArray s (ComponentPeer::getAvailableRenderingEngines()); @@ -284191,7 +284188,7 @@ bool QuickTimeMovieComponent::isMovieOpen() const return movie != nil; } -const File QuickTimeMovieComponent::getCurrentMovieFile() const +File QuickTimeMovieComponent::getCurrentMovieFile() const { return movieFile; } @@ -284703,7 +284700,7 @@ public: bool openTray() { return [device->device isValid] && [device->device ejectMedia]; } - const Array getAvailableWriteSpeeds() const + Array getAvailableWriteSpeeds() const { Array results; @@ -284782,7 +284779,7 @@ namespace } } -const StringArray AudioCDBurner::findAvailableDevices() +StringArray AudioCDBurner::findAvailableDevices() { NSArray* names = findDiskBurnerDevices(); StringArray s; @@ -284823,7 +284820,7 @@ AudioCDBurner::DiskState AudioCDBurner::waitUntilStateChange (int timeOutMillise return newState; } -const Array AudioCDBurner::getAvailableWriteSpeeds() const +Array AudioCDBurner::getAvailableWriteSpeeds() const { return pimpl->getAvailableWriteSpeeds(); } @@ -284849,10 +284846,10 @@ bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamps) return false; } -const String AudioCDBurner::burn (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener* listener, - bool ejectDiscAfterwards, - bool performFakeBurnForTesting, - int writeSpeed) +String AudioCDBurner::burn (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener* listener, + bool ejectDiscAfterwards, + bool performFakeBurnForTesting, + int writeSpeed) { String error ("Couldn't open or write to the CD device"); @@ -284977,7 +284974,7 @@ namespace CDReaderHelpers }; } -const StringArray AudioCDReader::getAvailableCDNames() +StringArray AudioCDReader::getAvailableCDNames() { Array cds; CDReaderHelpers::findDevices (cds); @@ -286218,7 +286215,7 @@ public: fillInChannelInfo (false); } - const StringArray getSources (bool input) + StringArray getSources (bool input) { StringArray s; HeapBlock types; @@ -286304,10 +286301,10 @@ public: } } - const String reopen (const BigInteger& inputChannels, - const BigInteger& outputChannels, - double newSampleRate, - int bufferSizeSamples) + String reopen (const BigInteger& inputChannels, + const BigInteger& outputChannels, + double newSampleRate, + int bufferSizeSamples) { String error; JUCE_COREAUDIOLOG ("CoreAudio reopen"); @@ -286798,12 +286795,12 @@ public: AudioObjectRemovePropertyListener (kAudioObjectSystemObject, &pa, hardwareListenerProc, internal); } - const StringArray getOutputChannelNames() + StringArray getOutputChannelNames() { return internal->outChanNames; } - const StringArray getInputChannelNames() + StringArray getInputChannelNames() { if (internal->inputDevice != 0) return internal->inputDevice->inChanNames; @@ -287015,7 +287012,7 @@ public: outputDeviceNames.appendNumbersToDuplicates (false, true); } - const StringArray getDeviceNames (bool wantInputNames) const + StringArray getDeviceNames (bool wantInputNames) const { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -287166,7 +287163,7 @@ namespace CoreMidiHelpers #undef CHECK_ERROR #define CHECK_ERROR(a) CoreMidiHelpers::logError (a, __LINE__) - const String getEndpointName (MIDIEndpointRef endpoint, bool isExternal) + String getEndpointName (MIDIEndpointRef endpoint, bool isExternal) { String result; CFStringRef str = 0; @@ -287228,7 +287225,7 @@ namespace CoreMidiHelpers return result; } - const String getConnectedEndpointName (MIDIEndpointRef endpoint) + String getConnectedEndpointName (MIDIEndpointRef endpoint) { String result; @@ -287404,7 +287401,7 @@ namespace CoreMidiHelpers } } -const StringArray MidiOutput::getDevices() +StringArray MidiOutput::getDevices() { StringArray s; @@ -287525,7 +287522,7 @@ void MidiOutput::sendMessageNow (const MidiMessage& message) } } -const StringArray MidiInput::getDevices() +StringArray MidiInput::getDevices() { StringArray s; @@ -287670,9 +287667,9 @@ void MidiInput::stop() MidiOutput::~MidiOutput() {} void MidiOutput::sendMessageNow (const MidiMessage& message) {} -const StringArray MidiOutput::getDevices() { return StringArray(); } +StringArray MidiOutput::getDevices() { return StringArray(); } MidiOutput* MidiOutput::openDevice (int index) { return nullptr; } -const StringArray MidiInput::getDevices() { return StringArray(); } +StringArray MidiInput::getDevices() { return StringArray(); } MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) { return nullptr; } #endif @@ -287979,7 +287976,7 @@ Component* CameraDevice::createViewerComponent() return new QTCaptureViewerComp (this, static_cast (internal)); } -const String CameraDevice::getFileExtension() +String CameraDevice::getFileExtension() { return ".mov"; } @@ -288023,7 +288020,7 @@ void CameraDevice::startRecordingToFile (const File& file, int quality) isRecording = true; } -const Time CameraDevice::getTimeOfFirstRecordedFrame() const +Time CameraDevice::getTimeOfFirstRecordedFrame() const { QTCameraDeviceInteral* const d = static_cast (internal); if (d->callbackDelegate->firstPresentationTime != 0) @@ -288053,7 +288050,7 @@ void CameraDevice::removeListener (Listener* listenerToRemove) static_cast (internal)->removeListener (listenerToRemove); } -const StringArray CameraDevice::getAvailableDevices() +StringArray CameraDevice::getAvailableDevices() { JUCE_AUTORELEASEPOOL @@ -288704,7 +288701,7 @@ String SystemClipboard::getTextFromClipboard() namespace AndroidStatsHelpers { - const String getSystemProperty (const String& name) + String getSystemProperty (const String& name) { return juceString (LocalRef ((jstring) getEnv()->CallStaticObjectMethod (android.systemClass, android.getProperty, @@ -288717,7 +288714,7 @@ SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() return Android; } -const String SystemStats::getOperatingSystemName() +String SystemStats::getOperatingSystemName() { return "Android " + AndroidStatsHelpers::getSystemProperty ("os.version"); } @@ -288731,7 +288728,7 @@ bool SystemStats::isOperatingSystem64Bit() #endif } -const String SystemStats::getCpuVendor() +String SystemStats::getCpuVendor() { return AndroidStatsHelpers::getSystemProperty ("os.arch"); } @@ -288758,7 +288755,7 @@ int SystemStats::getPageSize() return sysconf (_SC_PAGESIZE); } -const String SystemStats::getLogonName() +String SystemStats::getLogonName() { const char* user = getenv ("USER"); @@ -288772,12 +288769,12 @@ const String SystemStats::getLogonName() return CharPointer_UTF8 (user); } -const String SystemStats::getFullUserName() +String SystemStats::getFullUserName() { return getLogonName(); } -const String SystemStats::getComputerName() +String SystemStats::getComputerName() { char name [256] = { 0 }; if (gethostname (name, sizeof (name) - 1) == 0) @@ -289450,7 +289447,7 @@ void juce_runSystemCommand (const String& command) (void) result; } -const String juce_getOutputFromCommand (const String& command) +String juce_getOutputFromCommand (const String& command) { // slight bodge here, as we just pipe the output into a temp file and read it... const File tempFile (File::getSpecialLocation (File::tempDirectory) @@ -290560,7 +290557,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AndroidTypeface); }; -const Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) +Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) { return new AndroidTypeface (font); } @@ -291718,7 +291715,7 @@ public: // TODO } - const StringArray getAvailableRenderingEngines() + StringArray getAvailableRenderingEngines() { StringArray s (ComponentPeer::getAvailableRenderingEngines()); s.add ("Android Canvas Renderer"); @@ -292217,7 +292214,7 @@ void OpenGLPixelFormat::getAvailablePixelFormats (Component* component, // compiled on its own). #if JUCE_INCLUDED_FILE -const StringArray MidiOutput::getDevices() +StringArray MidiOutput::getDevices() { StringArray devices; @@ -292265,7 +292262,7 @@ int MidiInput::getDefaultDeviceIndex() return 0; } -const StringArray MidiInput::getDevices() +StringArray MidiInput::getDevices() { StringArray devs; @@ -292337,7 +292334,7 @@ public: close(); } - const StringArray getOutputChannelNames() + StringArray getOutputChannelNames() { StringArray s; s.add ("Left"); @@ -292345,7 +292342,7 @@ public: return s; } - const StringArray getInputChannelNames() + StringArray getInputChannelNames() { StringArray s; @@ -292607,7 +292604,7 @@ public: int getIndexOfDevice (AudioIODevice* device, bool asInput) const { return device != nullptr ? 0 : -1; } bool hasSeparateInputsAndOutputs() const { return false; } - const StringArray getDeviceNames (bool wantInputNames) const + StringArray getDeviceNames (bool wantInputNames) const { StringArray s; s.add ("Android Audio"); @@ -292689,7 +292686,7 @@ Component* CameraDevice::createViewerComponent() return nullptr; } -const String CameraDevice::getFileExtension() +String CameraDevice::getFileExtension() { return ".m4a"; // TODO correct? } @@ -292699,7 +292696,7 @@ void CameraDevice::startRecordingToFile (const File& file, int quality) // TODO } -const Time CameraDevice::getTimeOfFirstRecordedFrame() const +Time CameraDevice::getTimeOfFirstRecordedFrame() const { // TODO return Time(); @@ -292720,7 +292717,7 @@ void CameraDevice::removeListener (Listener* listenerToRemove) // TODO } -const StringArray CameraDevice::getAvailableDevices() +StringArray CameraDevice::getAvailableDevices() { StringArray devs; diff --git a/juce_amalgamated.h b/juce_amalgamated.h index 026204a810..1a8daf0f7e 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 101 +#define JUCE_BUILDNUMBER 102 /** Current Juce version number. @@ -9492,7 +9492,7 @@ public: This returns a void if no such property exists. */ - virtual const var getProperty (const Identifier& propertyName) const; + virtual var getProperty (const Identifier& propertyName) const; /** Sets a named property. */ virtual void setProperty (const Identifier& propertyName, const var& newValue); @@ -9516,9 +9516,9 @@ public: This method is virtual to allow more dynamic invocation to used for objects where the methods may not already be set as properies. */ - virtual const var invokeMethod (const Identifier& methodName, - const var* parameters, - int numParameters); + virtual var invokeMethod (const Identifier& methodName, + const var* parameters, + int numParameters); /** Sets up a method. @@ -12054,7 +12054,7 @@ public: /** Attempts to parse the contents of the block as a zero-terminated string of 8-bit characters in the system's default encoding. */ - const String toString() const; + String toString() const; /** Parses a string of hexadecimal numbers and writes this data into the memory block. @@ -12081,7 +12081,7 @@ public: @see fromBase64Encoding */ - const String toBase64Encoding() const; + String toBase64Encoding() const; /** Takes a string of encoded characters and turns it into binary data. @@ -12516,21 +12516,21 @@ public: @returns the time, or an invalid time if the file doesn't exist. @see setLastModificationTime, getLastAccessTime, getCreationTime */ - const Time getLastModificationTime() const; + Time getLastModificationTime() const; /** Returns the last time this file was accessed. @returns the time, or an invalid time if the file doesn't exist. @see setLastAccessTime, getLastModificationTime, getCreationTime */ - const Time getLastAccessTime() const; + Time getLastAccessTime() const; /** Returns the time that this file was created. @returns the time, or an invalid time if the file doesn't exist. @see getLastModificationTime, getLastAccessTime */ - const Time getCreationTime() const; + Time getCreationTime() const; /** Changes the modification time for this file. @@ -16478,7 +16478,7 @@ public: virtual ~ValueSource(); /** Returns the current value of this object. */ - virtual const var getValue() const = 0; + virtual var getValue() const = 0; /** Changes the current value. This must also trigger a change message if the value actually changes. @@ -17382,7 +17382,7 @@ private: void sendChildOrderChangedMessage(); void sendParentChangeMessage(); const var& getProperty (const Identifier& name) const; - const var getProperty (const Identifier& name, const var& defaultReturnValue) const; + var getProperty (const Identifier& name, const var& defaultReturnValue) const; void setProperty (const Identifier& name, const var& newValue, UndoManager*); bool hasProperty (const Identifier& name) const; void removeProperty (const Identifier& name, UndoManager*); @@ -17755,7 +17755,7 @@ public: #if JUCE_MAC || JUCE_IOS || DOXYGEN /** MAC ONLY - Turns a Core CF String into a juce one. */ - static const String cfStringToJuceString (CFStringRef cfString); + static String cfStringToJuceString (CFStringRef cfString); /** MAC ONLY - Turns a juce string into a Core CF one. */ static CFStringRef juceStringToCFString (const String& s); @@ -17764,12 +17764,12 @@ public: static bool makeFSRefFromPath (FSRef* destFSRef, const String& path); /** MAC ONLY - Turns an FSRef into a juce string path. */ - static const String makePathFromFSRef (FSRef* file); + static String makePathFromFSRef (FSRef* file); /** MAC ONLY - Converts any decomposed unicode characters in a string into their precomposed equivalents. */ - static const String convertToPrecomposedUnicode (const String& s); + static String convertToPrecomposedUnicode (const String& s); /** MAC ONLY - Gets the type of a file from the file's resources. */ static OSType getTypeOfFile (const String& filename); @@ -17795,8 +17795,8 @@ public: The path is a string for the entire path of a value in the registry, e.g. "HKEY_CURRENT_USER\Software\foo\bar" */ - static const String getRegistryValue (const String& regValuePath, - const String& defaultValue = String::empty); + static String getRegistryValue (const String& regValuePath, + const String& defaultValue = String::empty); /** WIN32 ONLY - Sets a registry value as a string. @@ -17855,7 +17855,7 @@ public: This is needed to avoid unicode problems with the argc type params. */ - static const String JUCE_CALLTYPE getCurrentCommandLineParams(); + static String JUCE_CALLTYPE getCurrentCommandLineParams(); #endif /** Clears the floating point unit's flags. @@ -18316,7 +18316,7 @@ public: See also the JUCE_VERSION, JUCE_MAJOR_VERSION and JUCE_MINOR_VERSION macros. */ - static const String getJUCEVersion(); + static String getJUCEVersion(); /** The set of possible results of the getOperatingSystemType() method. */ @@ -18355,7 +18355,7 @@ public: @returns a string describing the OS type. @see getOperatingSystemType */ - static const String getOperatingSystemName(); + static String getOperatingSystemName(); /** Returns true if the OS is 64-bit, or false for a 32-bit OS. */ @@ -18364,16 +18364,16 @@ public: /** Returns the current user's name, if available. @see getFullUserName() */ - static const String getLogonName(); + static String getLogonName(); /** Returns the current user's full name, if available. On some OSes, this may just return the same value as getLogonName(). @see getLogonName() */ - static const String getFullUserName(); + static String getFullUserName(); /** Returns the host-name of the computer. */ - static const String getComputerName(); + static String getComputerName(); // CPU and memory information.. @@ -18388,7 +18388,7 @@ public: Might not be known on some systems. */ - static const String getCpuVendor(); + static String getCpuVendor(); /** Checks whether Intel MMX instructions are available. */ static bool hasMMX() noexcept { return getCPUFlags().hasMMX; } @@ -20137,7 +20137,7 @@ public: const uint8* getBytes() const noexcept { return asBytes; } /** Returns a dash-separated string in the form "11-22-33-44-55-66" */ - const String toString() const; + String toString() const; /** Returns the address in the lower 6 bytes of an int64. @@ -21407,7 +21407,7 @@ public: virtual ~Scope(); /** Returns some kind of globally unique ID that identifies this scope. */ - virtual const String getScopeUID() const; + virtual String getScopeUID() const; /** Returns the value of a symbol. If the symbol is unknown, this can throw an Expression::EvaluationError exception. @@ -21415,7 +21415,7 @@ public: one, e.g. for "foo.bar", symbol = "foo" and member = "bar". @throws Expression::EvaluationError */ - virtual const Expression getSymbolValue (const String& symbol) const; + virtual Expression getSymbolValue (const String& symbol) const; /** Executes a named function. If the function name is unknown, this can throw an Expression::EvaluationError exception. @@ -22146,7 +22146,7 @@ public: The country codes are supposed to be 2-character ISO complient codes. */ - const StringArray getCountryCodes() const { return countryCodes; } + const StringArray& getCountryCodes() const { return countryCodes; } /** Indicates whether to use a case-insensitive search when looking up a string. This defaults to true. @@ -25312,7 +25312,7 @@ public: const String& getName() const noexcept { return name; } /** Creates a new system typeface. */ - static const Ptr createSystemTypefaceFor (const Font& font); + static Ptr createSystemTypefaceFor (const Font& font); /** Destructor. */ virtual ~Typeface(); @@ -25374,7 +25374,7 @@ protected: explicit Typeface (const String& name) noexcept; - static const Ptr getFallbackTypeface(); + static Ptr getFallbackTypeface(); private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Typeface); @@ -33950,9 +33950,8 @@ public: */ int getApplicationReturnValue() const noexcept { return appReturnValue; } - /** Returns the application's command line params. - */ - const String getCommandLineParameters() const noexcept { return commandLineParameters; } + /** Returns the application's command line parameters. */ + const String& getCommandLineParameters() const noexcept { return commandLineParameters; } /** Returns true if this executable is running as an app (as opposed to being a plugin or other kind of shared library. */ @@ -34763,7 +34762,7 @@ public: An empty string is returned if no command with this ID has been registered. @see getDescriptionOfCommand */ - const String getNameOfCommand (CommandID commandID) const noexcept; + String getNameOfCommand (CommandID commandID) const noexcept; /** Returns the description field for a command. @@ -34772,7 +34771,7 @@ public: @see getNameOfCommand */ - const String getDescriptionOfCommand (CommandID commandID) const noexcept; + String getDescriptionOfCommand (CommandID commandID) const noexcept; /** Returns the list of categories. @@ -34787,7 +34786,7 @@ public: @see getCommandCategories() */ - const Array getCommandsInCategory (const String& categoryName) const; + Array getCommandsInCategory (const String& categoryName) const; /** Returns the manager's internal set of key mappings. @@ -35938,7 +35937,7 @@ public: E.g. "AIFF" */ - const String getFormatName() const noexcept { return formatName; } + const String& getFormatName() const noexcept { return formatName; } /** Reads samples from the stream. @@ -36729,7 +36728,7 @@ public: E.g. "AIFF file" */ - const String getFormatName() const noexcept { return formatName; } + const String& getFormatName() const noexcept { return formatName; } /** Writes a set of samples to the audio stream. @@ -36839,8 +36838,9 @@ public: */ void setThumbnailToUpdate (AudioThumbnail* thumbnailToUpdate); - /** @internal */ + #ifndef DOXYGEN class Buffer; // (only public for VC6 compatibility) + #endif private: friend class ScopedPointer; @@ -36961,7 +36961,7 @@ public: When calling createWriterFor(), an index from this array is passed in to tell the format which option is required. */ - virtual const StringArray getQualityOptions(); + virtual StringArray getQualityOptions(); /** Tries to create an object that can read from a stream containing audio data in this format. @@ -37102,7 +37102,7 @@ public: Use openDevice() to open one of the items from this list. */ - static const StringArray findAvailableDevices(); + static StringArray findAvailableDevices(); /** Tries to open one of the optical drives. @@ -37149,7 +37149,7 @@ public: Note that if there's no media present in the drive, this value may be unavailable! @see setWriteSpeed, getWriteSpeed */ - const Array getAvailableWriteSpeeds() const; + Array getAvailableWriteSpeeds() const; /** Tries to enable or disable buffer underrun safety on devices that support it. @returns true if it's now enabled. If the device doesn't support it, this @@ -37198,10 +37198,10 @@ public: @param writeSpeed one of the write speeds from getAvailableWriteSpeeds(), or 0 or less to mean the fastest speed. */ - const String burn (BurnProgressListener* listener, - bool ejectDiscAfterwards, - bool performFakeBurnForTesting, - int writeSpeed); + String burn (BurnProgressListener* listener, + bool ejectDiscAfterwards, + bool performFakeBurnForTesting, + int writeSpeed); /** If a burn operation is currently in progress, this tells it to stop as soon as possible. @@ -37262,7 +37262,7 @@ public: @see createReaderForCD */ - static const StringArray getAvailableCDNames(); + static StringArray getAvailableCDNames(); /** Tries to create an AudioFormatReader that can read from an Audio CD. @@ -37477,7 +37477,7 @@ public: E.g. if might return "*.wav;*.aiff" if it just knows about wavs and aiffs. */ - const String getWildcardForAllFormats() const; + String getWildcardForAllFormats() const; /** Searches through the known formats to try to create a suitable reader for this file. @@ -37889,7 +37889,7 @@ public: bool canDoStereo(); bool canDoMono(); bool isCompressed(); - const StringArray getQualityOptions(); + StringArray getQualityOptions(); AudioFormatReader* createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails); @@ -37935,12 +37935,12 @@ public: OggVorbisAudioFormat(); ~OggVorbisAudioFormat(); - const Array getPossibleSampleRates(); - const Array getPossibleBitDepths(); + const Array getPossibleSampleRates(); + const Array getPossibleBitDepths(); bool canDoStereo(); bool canDoMono(); bool isCompressed(); - const StringArray getQualityOptions(); + StringArray getQualityOptions(); /** Tries to estimate the quality level of an ogg file based on its size. @@ -38417,12 +38417,12 @@ public: /** Returns the names of all the available output channels on this device. To find out which of these are currently in use, call getActiveOutputChannels(). */ - virtual const StringArray getOutputChannelNames() = 0; + virtual StringArray getOutputChannelNames() = 0; /** Returns the names of all the available input channels on this device. To find out which of these are currently in use, call getActiveInputChannels(). */ - virtual const StringArray getInputChannelNames() = 0; + virtual StringArray getInputChannelNames() = 0; /** Returns the number of sample-rates this device supports. @@ -39854,7 +39854,7 @@ public: into inputs and outputs, this indicates whether to use the input or output name to refer to a pair of devices. */ - virtual const StringArray getDeviceNames (bool wantInputNames = false) const = 0; + virtual StringArray getDeviceNames (bool wantInputNames = false) const = 0; /** Returns the name of the default device. @@ -40882,7 +40882,7 @@ public: @see getDefaultDeviceIndex, openDevice */ - static const StringArray getDevices(); + static StringArray getDevices(); /** Returns the index of the default midi input device to use. @@ -40905,7 +40905,7 @@ public: static MidiInput* openDevice (int deviceIndex, MidiInputCallback* callback); -#if JUCE_LINUX || JUCE_MAC || DOXYGEN + #if JUCE_LINUX || JUCE_MAC || DOXYGEN /** This will try to create a new midi input device (Not available on Windows). This will attempt to create a new midi input device with the specified name, @@ -40918,19 +40918,18 @@ public: */ static MidiInput* createNewDevice (const String& deviceName, MidiInputCallback* callback); -#endif + #endif /** Destructor. */ virtual ~MidiInput(); - /** Returns the name of this device. - */ - virtual const String getName() const noexcept { return name; } + /** Returns the name of this device. */ + const String& getName() const noexcept { return name; } /** Allows you to set a custom name for the device, in case you don't like the name it was given when created. */ - virtual void setName (const String& newName) noexcept { name = newName; } + void setName (const String& newName) noexcept { name = newName; } /** Starts the device running. @@ -41198,7 +41197,7 @@ public: @see getDefaultDeviceIndex, openDevice */ - static const StringArray getDevices(); + static StringArray getDevices(); /** Returns the index of the default midi output device to use. @@ -41455,12 +41454,12 @@ public: @returns an error message if anything went wrong, or an empty string if it worked ok. */ - const String initialise (int numInputChannelsNeeded, - int numOutputChannelsNeeded, - const XmlElement* savedState, - bool selectDefaultDeviceOnFailure, - const String& preferredDefaultDeviceName = String::empty, - const AudioDeviceSetup* preferredSetupOptions = 0); + String initialise (int numInputChannelsNeeded, + int numOutputChannelsNeeded, + const XmlElement* savedState, + bool selectDefaultDeviceOnFailure, + const String& preferredDefaultDeviceName = String::empty, + const AudioDeviceSetup* preferredSetupOptions = 0); /** Returns some XML representing the current state of the manager. @@ -41497,8 +41496,8 @@ public: @see getAudioDeviceSetup */ - const String setAudioDeviceSetup (const AudioDeviceSetup& newSetup, - bool treatAsChosenDevice); + String setAudioDeviceSetup (const AudioDeviceSetup& newSetup, + bool treatAsChosenDevice); /** Returns the currently-active audio device. */ AudioIODevice* getCurrentAudioDevice() const noexcept { return currentAudioDevice; } @@ -41506,7 +41505,7 @@ public: /** Returns the type of audio device currently in use. @see setCurrentAudioDeviceType */ - const String getCurrentAudioDeviceType() const { return currentDeviceType; } + String getCurrentAudioDeviceType() const { return currentDeviceType; } /** Returns the currently active audio device type object. Don't keep a copy of this pointer - it's owned by the device manager and could @@ -41632,7 +41631,7 @@ public: @see setDefaultMidiOutput, getDefaultMidiOutput */ - const String getDefaultMidiOutputName() const { return defaultMidiOutputName; } + String getDefaultMidiOutputName() const { return defaultMidiOutputName; } /** Returns the current default midi output device. @@ -41750,8 +41749,8 @@ private: void audioDeviceStoppedInt(); void handleIncomingMidiMessageInt (MidiInput*, const MidiMessage&); - const String restartDevice (int blockSizeToUse, double sampleRateToUse, - const BigInteger& ins, const BigInteger& outs); + String restartDevice (int blockSizeToUse, double sampleRateToUse, + const BigInteger& ins, const BigInteger& outs); void stopDevice(); void updateXml(); @@ -41831,9 +41830,9 @@ public: be "-INF dB". */ template - static const String toString (const Type decibels, - const int decimalPlaces = 2, - const Type minusInfinityDb = (Type) defaultMinusInfinitydB) + static String toString (const Type decibels, + const int decimalPlaces = 2, + const Type minusInfinityDb = (Type) defaultMinusInfinitydB) { String s; @@ -43442,7 +43441,7 @@ public: plugin's file location, so can be used to store a plugin ID for use across different machines. */ - const String createIdentifierString() const; + String createIdentifierString() const; /** Creates an XML object containing these details. @@ -43526,7 +43525,7 @@ public: E.g. "VST", "AudioUnit", etc. */ - virtual const String getName() const = 0; + virtual String getName() const = 0; /** This tries to create descriptions for all the plugin types available in a binary module file. @@ -43556,7 +43555,7 @@ public: /** Returns a readable version of the name of the plugin that this identifier refers to. */ - virtual const String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) = 0; + virtual String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) = 0; /** Checks whether this plugin could possibly be loaded. @@ -43570,15 +43569,15 @@ public: The path might be ignored, e.g. by AUs, which are found by the OS rather than manually. */ - virtual const StringArray searchPathsForPlugins (const FileSearchPath& directoriesToSearch, - bool recursive) = 0; + virtual StringArray searchPathsForPlugins (const FileSearchPath& directoriesToSearch, + bool recursive) = 0; /** Returns the typical places to look for this kind of plugin. Note that if this returns no paths, it means that the format can't be scanned-for (i.e. it's an internal format that doesn't live in files) */ - virtual const FileSearchPath getDefaultLocationsToSearch() = 0; + virtual FileSearchPath getDefaultLocationsToSearch() = 0; protected: @@ -43603,14 +43602,14 @@ public: AudioUnitPluginFormat(); ~AudioUnitPluginFormat(); - const String getName() const { return "AudioUnit"; } + String getName() const { return "AudioUnit"; } void findAllTypesForFile (OwnedArray & results, const String& fileOrIdentifier); AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); bool fileMightContainThisPluginType (const String& fileOrIdentifier); - const String getNameOfPluginFromIdentifier (const String& fileOrIdentifier); - const StringArray searchPathsForPlugins (const FileSearchPath& directoriesToSearch, bool recursive); + String getNameOfPluginFromIdentifier (const String& fileOrIdentifier); + StringArray searchPathsForPlugins (const FileSearchPath& directoriesToSearch, bool recursive); bool doesPluginStillExist (const PluginDescription& desc); - const FileSearchPath getDefaultLocationsToSearch(); + FileSearchPath getDefaultLocationsToSearch(); private: @@ -43645,12 +43644,12 @@ public: DirectXPluginFormat(); ~DirectXPluginFormat(); - const String getName() const { return "DirectX"; } + String getName() const { return "DirectX"; } void findAllTypesForFile (OwnedArray & results, const String& fileOrIdentifier); AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); bool fileMightContainThisPluginType (const String& fileOrIdentifier); - const String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) { return fileOrIdentifier; } - const FileSearchPath getDefaultLocationsToSearch(); + String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) { return fileOrIdentifier; } + FileSearchPath getDefaultLocationsToSearch(); private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectXPluginFormat); @@ -43684,12 +43683,12 @@ public: LADSPAPluginFormat(); ~LADSPAPluginFormat(); - const String getName() const { return "LADSPA"; } + String getName() const { return "LADSPA"; } void findAllTypesForFile (OwnedArray & results, const String& fileOrIdentifier); AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); bool fileMightContainThisPluginType (const String& fileOrIdentifier); - const String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) { return fileOrIdentifier; } - const FileSearchPath getDefaultLocationsToSearch(); + String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) { return fileOrIdentifier; } + FileSearchPath getDefaultLocationsToSearch(); private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LADSPAPluginFormat); @@ -43887,14 +43886,14 @@ public: VSTPluginFormat(); ~VSTPluginFormat(); - const String getName() const { return "VST"; } + String getName() const { return "VST"; } void findAllTypesForFile (OwnedArray & results, const String& fileOrIdentifier); AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); bool fileMightContainThisPluginType (const String& fileOrIdentifier); - const String getNameOfPluginFromIdentifier (const String& fileOrIdentifier); - const StringArray searchPathsForPlugins (const FileSearchPath& directoriesToSearch, bool recursive); + String getNameOfPluginFromIdentifier (const String& fileOrIdentifier); + StringArray searchPathsForPlugins (const FileSearchPath& directoriesToSearch, bool recursive); bool doesPluginStillExist (const PluginDescription& desc); - const FileSearchPath getDefaultLocationsToSearch(); + FileSearchPath getDefaultLocationsToSearch(); private: @@ -44910,7 +44909,7 @@ public: @see setButtonText */ - const String getButtonText() const { return text; } + const String& getButtonText() const { return text; } /** Returns true if the button is currently being held down by the mouse. @@ -47384,13 +47383,13 @@ public: Returns a value less than 0 if no note is playing. */ - int getCurrentlyPlayingNote() const { return currentlyPlayingNote; } + int getCurrentlyPlayingNote() const { return currentlyPlayingNote; } /** Returns the sound that this voice is currently playing. Returns 0 if it's not playing. */ - const SynthesiserSound::Ptr getCurrentlyPlayingSound() const { return currentlyPlayingSound; } + SynthesiserSound::Ptr getCurrentlyPlayingSound() const { return currentlyPlayingSound; } /** Must return true if this voice object is capable of playing the given sound. @@ -48079,7 +48078,7 @@ public: This will return an empty string if the other machine isn't known for some reason. */ - const String getConnectedHostName() const; + String getConnectedHostName() const; /** Tries to send a message to the other end of this connection. @@ -49070,10 +49069,10 @@ public: ValueTree& getState() noexcept { return state; } int getNumMarkers() const; - const ValueTree getMarkerState (int index) const; - const ValueTree getMarkerState (const String& name) const; + ValueTree getMarkerState (int index) const; + ValueTree getMarkerState (const String& name) const; bool containsMarker (const ValueTree& state) const; - const MarkerList::Marker getMarker (const ValueTree& state) const; + MarkerList::Marker getMarker (const ValueTree& state) const; void setMarker (const MarkerList::Marker& marker, UndoManager* undoManager); void removeMarker (const ValueTree& state, UndoManager* undoManager); @@ -49127,9 +49126,9 @@ public: public: ComponentScope (Component& component_); - const Expression getSymbolValue (const String& symbol) const; + Expression getSymbolValue (const String& symbol) const; void visitRelativeScope (const String& scopeName, Visitor& visitor) const; - const String getScopeUID() const; + String getScopeUID() const; protected: Component& component; @@ -49326,12 +49325,12 @@ public: The image that is returned will be owned by the caller, but it may come from the ImageCache. */ - virtual const Image getImageForIdentifier (const var& imageIdentifier) = 0; + virtual Image getImageForIdentifier (const var& imageIdentifier) = 0; /** Returns an identifier to be used to refer to a given image. This is used when a reference to an image is stored in a ValueTree. */ - virtual const var getIdentifierForImage (const Image& image) = 0; + virtual var getIdentifierForImage (const Image& image) = 0; }; /** Gives the builder an ImageProvider object that the type handlers can use when @@ -49517,13 +49516,13 @@ public: If there are any images used in this drawable, you'll need to provide a valid ImageProvider object that can be used to create storable representations of them. */ - virtual const ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const = 0; + virtual ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const = 0; /** Returns the area that this drawble covers. The result is expressed in this drawable's own coordinate space, and does not take into account any transforms that may be applied to the component. */ - virtual const Rectangle getDrawableBounds() const = 0; + virtual Rectangle getDrawableBounds() const = 0; /** Internal class used to manage ValueTrees that represent Drawables. */ class ValueTreeWrapperBase @@ -49533,7 +49532,7 @@ public: ValueTree& getState() noexcept { return state; } - const String getID() const; + String getID() const; void setID (const String& newID); ValueTree state; @@ -50350,7 +50349,7 @@ public: @see startDragging */ - const String getCurrentDragDescription() const; + String getCurrentDragDescription() const; /** Utility to find the DragAndDropContainer for a given Component. @@ -50648,7 +50647,7 @@ public: @see restoreFromString */ - const String toString() const; + String toString() const; /** Restores a set of items that was previously stored in a string by the toString() method. @@ -51096,7 +51095,7 @@ public: /** Returns the line from the document that this position is within. @see getCharacter, getLineNumber */ - const String getLineText() const; + String getLineText() const; private: CodeDocument* owner; @@ -51105,13 +51104,13 @@ public: }; /** Returns the full text of the document. */ - const String getAllContent() const; + String getAllContent() const; /** Returns a section of the document's text. */ - const String getTextBetween (const Position& start, const Position& end) const; + String getTextBetween (const Position& start, const Position& end) const; /** Returns a line from the document. */ - const String getLine (int lineIndex) const noexcept; + String getLine (int lineIndex) const noexcept; /** Returns the number of characters in the document. */ int getNumCharacters() const noexcept; @@ -51153,7 +51152,7 @@ public: This will be either "\n", "\r\n", or (rarely) "\r". @see setNewLineCharacters */ - const String getNewLineCharacters() const noexcept { return newLineChars; } + String getNewLineCharacters() const noexcept { return newLineChars; } /** Sets the new-line characters that the document should use. The string must be either "\n", "\r\n", or (rarely) "\r". @@ -51462,7 +51461,7 @@ public: The index in this list must match the token type numbers that are returned by readNextToken(). */ - virtual const StringArray getTokenTypes() = 0; + virtual StringArray getTokenTypes() = 0; /** Returns a suggested syntax highlighting colour for a specified token type. @@ -51787,7 +51786,7 @@ public: }; int readNextToken (CodeDocument::Iterator& source); - const StringArray getTokenTypes(); + StringArray getTokenTypes(); const Colour getDefaultColour (int tokenType); /** This is a handy method for checking whether a string is a c++ reserved keyword. */ @@ -52518,7 +52517,7 @@ public: the user has finished typing and pressed the return key. */ - const String getText (bool returnActiveEditorContents = false) const; + String getText (bool returnActiveEditorContents = false) const; /** Returns the text content as a Value object. You can call Value::referTo() on this object to make the label read and control @@ -53950,7 +53949,7 @@ public: void setTextValueSuffix (const String& suffix); /** Returns the suffix that was set by setTextValueSuffix(). */ - const String getTextValueSuffix() const; + String getTextValueSuffix() const; /** Allows a user-defined mapping of distance along the slider to its value. @@ -54250,7 +54249,7 @@ public: /** Returns the name for a column. @see setColumnName */ - const String getColumnName (int columnId) const; + String getColumnName (int columnId) const; /** Changes the name of a column. */ void setColumnName (int columnId, const String& newName); @@ -54396,7 +54395,7 @@ public: @see restoreFromString */ - const String toString() const; + String toString() const; /** Restores the state of the table, based on a string previously created with toString(). @@ -59768,7 +59767,7 @@ public: void setText (const String& newText); /** Returns the currently displayed text label. */ - const String getText() const; + String getText() const; /** Sets the positioning of the text label. @@ -59994,7 +59993,7 @@ public: This could be an empty string if none are selected. */ - const String getCurrentTabName() const; + String getCurrentTabName() const; /** Returns the index of the currently selected tab. @@ -60230,7 +60229,7 @@ public: @see addTab, TabbedButtonBar::getCurrentTabName() */ - const String getCurrentTabName() const; + String getCurrentTabName() const; /** Returns the current component that's filling the panel. @@ -62917,10 +62916,10 @@ public: int getNumberOfMultipleClicks() const noexcept; /** Returns the time at which the last mouse-down occurred. */ - const Time getLastMouseDownTime() const noexcept; + Time getLastMouseDownTime() const noexcept; /** Returns the screen position at which the last mouse-down occurred. */ - const Point getLastMouseDownPosition() const noexcept; + Point getLastMouseDownPosition() const noexcept; /** Returns true if this mouse is currently down, and if it has been dragged more than a couple of pixels from the place it was pressed. @@ -63106,7 +63105,7 @@ public: public: ElementBase (ElementType type); virtual ~ElementBase() {} - virtual const ValueTree createTree() const = 0; + virtual ValueTree createTree() const = 0; virtual void addToPath (Path& path, Expression::Scope*) const = 0; virtual RelativePoint* getControlPoints (int& numPoints) = 0; virtual ElementBase* clone() const = 0; @@ -63122,7 +63121,7 @@ public: { public: StartSubPath (const RelativePoint& pos); - const ValueTree createTree() const; + ValueTree createTree() const; void addToPath (Path& path, Expression::Scope*) const; RelativePoint* getControlPoints (int& numPoints); ElementBase* clone() const; @@ -63137,7 +63136,7 @@ public: { public: CloseSubPath(); - const ValueTree createTree() const; + ValueTree createTree() const; void addToPath (Path& path, Expression::Scope*) const; RelativePoint* getControlPoints (int& numPoints); ElementBase* clone() const; @@ -63150,7 +63149,7 @@ public: { public: LineTo (const RelativePoint& endPoint); - const ValueTree createTree() const; + ValueTree createTree() const; void addToPath (Path& path, Expression::Scope*) const; RelativePoint* getControlPoints (int& numPoints); ElementBase* clone() const; @@ -63165,7 +63164,7 @@ public: { public: QuadraticTo (const RelativePoint& controlPoint, const RelativePoint& endPoint); - const ValueTree createTree() const; + ValueTree createTree() const; void addToPath (Path& path, Expression::Scope*) const; RelativePoint* getControlPoints (int& numPoints); ElementBase* clone() const; @@ -63180,7 +63179,7 @@ public: { public: CubicTo (const RelativePoint& controlPoint1, const RelativePoint& controlPoint2, const RelativePoint& endPoint); - const ValueTree createTree() const; + ValueTree createTree() const; void addToPath (Path& path, Expression::Scope*) const; RelativePoint* getControlPoints (int& numPoints); ElementBase* clone() const; @@ -63278,7 +63277,7 @@ public: the string syntax used by the coordinates, see the RelativeCoordinate constructor notes. The string that is returned can be passed to the RelativeRectangle constructor to recreate the rectangle. */ - const String toString() const; + String toString() const; /** Renames a symbol if it is used by any of the coordinates. This calls Expression::withRenamedSymbol() on the rectangle's coordinates. @@ -64363,7 +64362,7 @@ public: /** Returns the file path or URL from which the video file was loaded. If there isn't one, this returns an empty string. */ - const File getCurrentMoviePath() const; + File getCurrentMoviePath() const; /** Returns true if there's currently a video open. */ bool isMovieOpen() const; @@ -65526,7 +65525,7 @@ public: If there isn't one, this returns File::nonexistent */ - const File getCurrentMovieFile() const; + File getCurrentMovieFile() const; /** Returns true if there's currently a movie open. */ bool isMovieOpen() const; @@ -66224,7 +66223,7 @@ public: */ static bool isValidPeer (const ComponentPeer* peer) noexcept; - virtual const StringArray getAvailableRenderingEngines(); + virtual StringArray getAvailableRenderingEngines(); virtual int getCurrentRenderingEngine() const; virtual void setCurrentRenderingEngine (int index); @@ -67462,7 +67461,7 @@ public: "bottom", but this method is a shortcut that returns them all at once. @see contentLeftMarkerName, contentRightMarkerName, contentTopMarkerName, contentBottomMarkerName */ - const RelativeRectangle getContentArea() const; + RelativeRectangle getContentArea() const; /** Changes the main content area. The content area is actually defined by the markers named "left", "right", "top" and @@ -67490,11 +67489,11 @@ public: /** @internal */ void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); /** @internal */ - const ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; + ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; /** @internal */ static const Identifier valueTreeType; /** @internal */ - const Rectangle getDrawableBounds() const; + Rectangle getDrawableBounds() const; /** @internal */ void childBoundsChanged (Component*); /** @internal */ @@ -67513,11 +67512,11 @@ public: ValueTree getChildList() const; ValueTree getChildListCreating (UndoManager* undoManager); - const RelativeParallelogram getBoundingBox() const; + RelativeParallelogram getBoundingBox() const; void setBoundingBox (const RelativeParallelogram& newBounds, UndoManager* undoManager); void resetBoundingBoxToContentArea (UndoManager* undoManager); - const RelativeRectangle getContentArea() const; + RelativeRectangle getContentArea() const; void setContentArea (const RelativeRectangle& newArea, UndoManager* undoManager); MarkerList::ValueTreeWrapper getMarkerList (bool xAxis) const; @@ -67576,7 +67575,7 @@ public: void setImage (const Image& imageToUse); /** Returns the current image. */ - const Image getImage() const { return image; } + const Image& getImage() const noexcept { return image; } /** Sets the opacity to use when drawing the image. */ void setOpacity (float newOpacity); @@ -67614,11 +67613,11 @@ public: /** @internal */ Drawable* createCopy() const; /** @internal */ - const Rectangle getDrawableBounds() const; + Rectangle getDrawableBounds() const; /** @internal */ void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); /** @internal */ - const ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; + ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; /** @internal */ static const Identifier valueTreeType; @@ -67628,7 +67627,7 @@ public: public: ValueTreeWrapper (const ValueTree& state); - const var getImageIdentifier() const; + var getImageIdentifier() const; void setImageIdentifier (const var& newIdentifier, UndoManager* undoManager); Value getImageIdentifierValue (UndoManager* undoManager); @@ -67640,7 +67639,7 @@ public: void setOverlayColour (const Colour& newColour, UndoManager* undoManager); Value getOverlayColourValue (UndoManager* undoManager); - const RelativeParallelogram getBoundingBox() const; + RelativeParallelogram getBoundingBox() const; void setBoundingBox (const RelativeParallelogram& newBounds, UndoManager* undoManager); static const Identifier opacity, overlay, image, topLeft, topRight, bottomLeft; @@ -67777,11 +67776,11 @@ public: FillAndStrokeState (const ValueTree& state); ValueTree getFillState (const Identifier& fillOrStrokeType); - const RelativeFillType getFill (const Identifier& fillOrStrokeType, ComponentBuilder::ImageProvider*) const; + RelativeFillType getFill (const Identifier& fillOrStrokeType, ComponentBuilder::ImageProvider*) const; void setFill (const Identifier& fillOrStrokeType, const RelativeFillType& newFill, ComponentBuilder::ImageProvider*, UndoManager*); - const PathStrokeType getStrokeType() const; + PathStrokeType getStrokeType() const; void setStrokeType (const PathStrokeType& newStrokeType, UndoManager*); static const Identifier type, colour, colours, fill, stroke, path, jointStyle, capStyle, strokeWidth, @@ -67789,7 +67788,7 @@ public: }; /** @internal */ - const Rectangle getDrawableBounds() const; + Rectangle getDrawableBounds() const; /** @internal */ void paint (Graphics& g); /** @internal */ @@ -67866,7 +67865,7 @@ public: /** @internal */ void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); /** @internal */ - const ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; + ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; /** @internal */ static const Identifier valueTreeType; @@ -67888,17 +67887,17 @@ public: const Identifier getType() const noexcept { return state.getType(); } int getNumControlPoints() const noexcept; - const RelativePoint getControlPoint (int index) const; + RelativePoint getControlPoint (int index) const; Value getControlPointValue (int index, UndoManager*) const; - const RelativePoint getStartPoint() const; - const RelativePoint getEndPoint() const; + RelativePoint getStartPoint() const; + RelativePoint getEndPoint() const; void setControlPoint (int index, const RelativePoint& point, UndoManager*); float getLength (Expression::Scope*) const; ValueTreeWrapper getParent() const; Element getPreviousElement() const; - const String getModeOfEndPoint() const; + String getModeOfEndPoint() const; void setModeOfEndPoint (const String& newMode, UndoManager*); void convertToLine (UndoManager*); @@ -67973,7 +67972,7 @@ public: const RelativeParallelogram& getRectangle() const noexcept { return bounds; } /** Returns the corner size to be used. */ - const RelativePoint getCornerSize() const { return cornerSize; } + const RelativePoint& getCornerSize() const noexcept { return cornerSize; } /** Sets a new corner size for the rectangle */ void setCornerSize (const RelativePoint& newSize); @@ -67983,7 +67982,7 @@ public: /** @internal */ void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); /** @internal */ - const ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; + ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; /** @internal */ static const Identifier valueTreeType; @@ -67993,11 +67992,11 @@ public: public: ValueTreeWrapper (const ValueTree& state); - const RelativeParallelogram getRectangle() const; + RelativeParallelogram getRectangle() const; void setRectangle (const RelativeParallelogram& newBounds, UndoManager*); void setCornerSize (const RelativePoint& cornerSize, UndoManager*); - const RelativePoint getCornerSize() const; + RelativePoint getCornerSize() const; Value getCornerSizeValue (UndoManager*) const; static const Identifier topLeft, topRight, bottomLeft, cornerSize; @@ -68091,11 +68090,11 @@ public: /** @internal */ void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); /** @internal */ - const ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; + ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; /** @internal */ static const Identifier valueTreeType; /** @internal */ - const Rectangle getDrawableBounds() const; + Rectangle getDrawableBounds() const; /** Internally-used class for wrapping a DrawableText's state into a ValueTree. */ class ValueTreeWrapper : public Drawable::ValueTreeWrapperBase @@ -68485,7 +68484,7 @@ public: You can open one of these devices by calling openDevice(). */ - static const StringArray getAvailableDevices(); + static StringArray getAvailableDevices(); /** Opens a camera device. @@ -68533,12 +68532,12 @@ public: This may be platform-specific, e.g. ".mov" or ".avi". */ - static const String getFileExtension(); + static String getFileExtension(); /** After calling stopRecording(), this method can be called to return the timestamp of the first frame that was written to the file. */ - const Time getTimeOfFirstRecordedFrame() const; + Time getTimeOfFirstRecordedFrame() const; /** Receives callbacks with images from a CameraDevice. diff --git a/src/core/juce_StandardHeader.h b/src/core/juce_StandardHeader.h index 65aee36a42..a501ada35a 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 101 +#define JUCE_BUILDNUMBER 102 /** Current Juce version number. diff --git a/src/gui/graphics/fonts/juce_Font.cpp b/src/gui/graphics/fonts/juce_Font.cpp index 807523c79c..a209167ef5 100644 --- a/src/gui/graphics/fonts/juce_Font.cpp +++ b/src/gui/graphics/fonts/juce_Font.cpp @@ -160,7 +160,8 @@ Font::SharedFontInternal::SharedFontInternal (const float height_, const int sty kerning (0), ascent (0), styleFlags (styleFlags_), - typeface (TypefaceCache::getInstance()->getDefaultTypeface()) + typeface ((styleFlags_ & (Font::bold | Font::italic)) == 0 + ? TypefaceCache::getInstance()->getDefaultTypeface() : nullptr) { } @@ -171,7 +172,7 @@ Font::SharedFontInternal::SharedFontInternal (const String& typefaceName_, const kerning (0), ascent (0), styleFlags (styleFlags_), - typeface (0) + typeface (nullptr) { } diff --git a/src/native/mac/juce_mac_QuickTimeMovieComponent.mm b/src/native/mac/juce_mac_QuickTimeMovieComponent.mm index 118b12b011..37c90b1976 100644 --- a/src/native/mac/juce_mac_QuickTimeMovieComponent.mm +++ b/src/native/mac/juce_mac_QuickTimeMovieComponent.mm @@ -209,7 +209,7 @@ bool QuickTimeMovieComponent::isMovieOpen() const return movie != nil; } -const File QuickTimeMovieComponent::getCurrentMovieFile() const +File QuickTimeMovieComponent::getCurrentMovieFile() const { return movieFile; } diff --git a/src/native/windows/juce_win32_NativeIncludes.h b/src/native/windows/juce_win32_NativeIncludes.h index 30fe9ea2ac..681f91773c 100644 --- a/src/native/windows/juce_win32_NativeIncludes.h +++ b/src/native/windows/juce_win32_NativeIncludes.h @@ -127,7 +127,7 @@ #endif //============================================================================== -#if JUCE_USE_CAMERA && JUCE_BUILD_NATIVE +#if (JUCE_USE_CAMERA || JUCE_DIRECTSHOW) && JUCE_BUILD_NATIVE /* If you're using the camera classes, you'll need access to a few DirectShow headers. @@ -150,6 +150,10 @@ #include #endif +#if JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE + #include +#endif + //============================================================================== #if JUCE_WASAPI && JUCE_BUILD_NATIVE #include @@ -183,14 +187,6 @@ #import #endif -#if JUCE_DIRECTSHOW && JUCE_BUILD_NATIVE - #include -#endif - -#if JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE - #include -#endif - //============================================================================== #if JUCE_MSVC #pragma warning (pop) diff --git a/src/native/windows/juce_win32_QuickTimeMovieComponent.cpp b/src/native/windows/juce_win32_QuickTimeMovieComponent.cpp index 5624e23725..53bb7a38ea 100644 --- a/src/native/windows/juce_win32_QuickTimeMovieComponent.cpp +++ b/src/native/windows/juce_win32_QuickTimeMovieComponent.cpp @@ -177,7 +177,7 @@ void QuickTimeMovieComponent::closeMovie() pimpl->clearHandle(); } -const File QuickTimeMovieComponent::getCurrentMovieFile() const +File QuickTimeMovieComponent::getCurrentMovieFile() const { return movieFile; }