| @@ -42,7 +42,7 @@ public: | |||||
| } | } | ||||
| void valueChanged (Value&) { sendChangeMessage (true); } | void valueChanged (Value&) { sendChangeMessage (true); } | ||||
| const var getValue() const { return (Type) sourceValue.getValue(); } | |||||
| var getValue() const { return (Type) sourceValue.getValue(); } | |||||
| void setValue (const var& newValue) | void setValue (const var& newValue) | ||||
| { | { | ||||
| @@ -55,13 +55,13 @@ public: | |||||
| void getAllTypes (OwnedArray <PluginDescription>& results); | void getAllTypes (OwnedArray <PluginDescription>& results); | ||||
| //============================================================================== | //============================================================================== | ||||
| const String getName() const { return "Internal"; } | |||||
| String getName() const { return "Internal"; } | |||||
| bool fileMightContainThisPluginType (const String&) { return false; } | bool fileMightContainThisPluginType (const String&) { return false; } | ||||
| const FileSearchPath getDefaultLocationsToSearch() { return FileSearchPath(); } | |||||
| FileSearchPath getDefaultLocationsToSearch() { return FileSearchPath(); } | |||||
| void findAllTypesForFile (OwnedArray <PluginDescription>&, const String&) {} | void findAllTypesForFile (OwnedArray <PluginDescription>&, const String&) {} | ||||
| bool doesPluginStillExist (const PluginDescription&) { return true; } | bool doesPluginStillExist (const PluginDescription&) { return true; } | ||||
| const String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) { return fileOrIdentifier; } | |||||
| const StringArray searchPathsForPlugins (const FileSearchPath&, bool) { return StringArray(); } | |||||
| String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) { return fileOrIdentifier; } | |||||
| StringArray searchPathsForPlugins (const FileSearchPath&, bool) { return StringArray(); } | |||||
| AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); | AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); | ||||
| private: | private: | ||||
| @@ -239,9 +239,8 @@ public: | |||||
| */ | */ | ||||
| int getApplicationReturnValue() const noexcept { return appReturnValue; } | 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 | /** Returns true if this executable is running as an app (as opposed to being a plugin | ||||
| or other kind of shared library. */ | or other kind of shared library. */ | ||||
| @@ -139,14 +139,14 @@ const ApplicationCommandInfo* ApplicationCommandManager::getCommandForID (const | |||||
| return nullptr; | 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); | const ApplicationCommandInfo* const ci = getCommandForID (commandID); | ||||
| return ci != nullptr ? ci->shortName : String::empty; | 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); | const ApplicationCommandInfo* const ci = getCommandForID (commandID); | ||||
| @@ -164,7 +164,7 @@ StringArray ApplicationCommandManager::getCommandCategories() const | |||||
| return s; | return s; | ||||
| } | } | ||||
| const Array <CommandID> ApplicationCommandManager::getCommandsInCategory (const String& categoryName) const | |||||
| Array<CommandID> ApplicationCommandManager::getCommandsInCategory (const String& categoryName) const | |||||
| { | { | ||||
| Array <CommandID> results; | Array <CommandID> results; | ||||
| @@ -176,7 +176,7 @@ public: | |||||
| An empty string is returned if no command with this ID has been registered. | An empty string is returned if no command with this ID has been registered. | ||||
| @see getDescriptionOfCommand | @see getDescriptionOfCommand | ||||
| */ | */ | ||||
| const String getNameOfCommand (CommandID commandID) const noexcept; | |||||
| String getNameOfCommand (CommandID commandID) const noexcept; | |||||
| /** Returns the description field for a command. | /** Returns the description field for a command. | ||||
| @@ -185,7 +185,7 @@ public: | |||||
| @see getNameOfCommand | @see getNameOfCommand | ||||
| */ | */ | ||||
| const String getDescriptionOfCommand (CommandID commandID) const noexcept; | |||||
| String getDescriptionOfCommand (CommandID commandID) const noexcept; | |||||
| /** Returns the list of categories. | /** Returns the list of categories. | ||||
| @@ -200,7 +200,7 @@ public: | |||||
| @see getCommandCategories() | @see getCommandCategories() | ||||
| */ | */ | ||||
| const Array <CommandID> getCommandsInCategory (const String& categoryName) const; | |||||
| Array<CommandID> getCommandsInCategory (const String& categoryName) const; | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Returns the manager's internal set of key mappings. | /** Returns the manager's internal set of key mappings. | ||||
| @@ -43,7 +43,7 @@ public: | |||||
| Use openDevice() to open one of the items from this list. | 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. | /** Tries to open one of the optical drives. | ||||
| @@ -92,7 +92,7 @@ public: | |||||
| Note that if there's no media present in the drive, this value may be unavailable! | Note that if there's no media present in the drive, this value may be unavailable! | ||||
| @see setWriteSpeed, getWriteSpeed | @see setWriteSpeed, getWriteSpeed | ||||
| */ | */ | ||||
| const Array<int> getAvailableWriteSpeeds() const; | |||||
| Array<int> getAvailableWriteSpeeds() const; | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Tries to enable or disable buffer underrun safety on devices that support it. | /** Tries to enable or disable buffer underrun safety on devices that support it. | ||||
| @@ -144,10 +144,10 @@ public: | |||||
| @param writeSpeed one of the write speeds from getAvailableWriteSpeeds(), or | @param writeSpeed one of the write speeds from getAvailableWriteSpeeds(), or | ||||
| 0 or less to mean the fastest speed. | 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 | /** If a burn operation is currently in progress, this tells it to stop | ||||
| as soon as possible. | as soon as possible. | ||||
| @@ -59,7 +59,7 @@ public: | |||||
| @see createReaderForCD | @see createReaderForCD | ||||
| */ | */ | ||||
| static const StringArray getAvailableCDNames(); | |||||
| static StringArray getAvailableCDNames(); | |||||
| /** Tries to create an AudioFormatReader that can read from an Audio CD. | /** Tries to create an AudioFormatReader that can read from an Audio CD. | ||||
| @@ -54,7 +54,7 @@ bool AudioFormat::canHandleFile (const File& f) | |||||
| const String& AudioFormat::getFormatName() const { return formatName; } | const String& AudioFormat::getFormatName() const { return formatName; } | ||||
| const StringArray& AudioFormat::getFileExtensions() const { return fileExtensions; } | const StringArray& AudioFormat::getFileExtensions() const { return fileExtensions; } | ||||
| bool AudioFormat::isCompressed() { return false; } | bool AudioFormat::isCompressed() { return false; } | ||||
| const StringArray AudioFormat::getQualityOptions() { return StringArray(); } | |||||
| StringArray AudioFormat::getQualityOptions() { return StringArray(); } | |||||
| END_JUCE_NAMESPACE | END_JUCE_NAMESPACE | ||||
| @@ -93,7 +93,7 @@ public: | |||||
| When calling createWriterFor(), an index from this array is passed in to | When calling createWriterFor(), an index from this array is passed in to | ||||
| tell the format which option is required. | 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 | /** Tries to create an object that can read from a stream containing audio | ||||
| @@ -123,7 +123,7 @@ AudioFormat* AudioFormatManager::findFormatForFileExtension (const String& fileE | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| const String AudioFormatManager::getWildcardForAllFormats() const | |||||
| String AudioFormatManager::getWildcardForAllFormats() const | |||||
| { | { | ||||
| StringArray allExtensions; | StringArray allExtensions; | ||||
| @@ -106,7 +106,7 @@ public: | |||||
| E.g. if might return "*.wav;*.aiff" if it just knows about wavs and aiffs. | 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 | /** Searches through the known formats to try to create a suitable reader for | ||||
| @@ -66,7 +66,7 @@ public: | |||||
| E.g. "AIFF" | E.g. "AIFF" | ||||
| */ | */ | ||||
| const String getFormatName() const noexcept { return formatName; } | |||||
| const String& getFormatName() const noexcept { return formatName; } | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Reads samples from the stream. | /** Reads samples from the stream. | ||||
| @@ -77,7 +77,7 @@ public: | |||||
| E.g. "AIFF file" | 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. | /** Writes a set of samples to the audio stream. | ||||
| @@ -192,8 +192,9 @@ public: | |||||
| */ | */ | ||||
| void setThumbnailToUpdate (AudioThumbnail* thumbnailToUpdate); | void setThumbnailToUpdate (AudioThumbnail* thumbnailToUpdate); | ||||
| /** @internal */ | |||||
| #ifndef DOXYGEN | |||||
| class Buffer; // (only public for VC6 compatibility) | class Buffer; // (only public for VC6 compatibility) | ||||
| #endif | |||||
| private: | private: | ||||
| friend class ScopedPointer<Buffer>; | friend class ScopedPointer<Buffer>; | ||||
| @@ -536,7 +536,7 @@ AudioFormatWriter* FlacAudioFormat::createWriterFor (OutputStream* out, | |||||
| return nullptr; | 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 }; | const char* options[] = { "0 (Fastest)", "1", "2", "3", "4", "5 (Default)","6", "7", "8 (Highest quality)", 0 }; | ||||
| return StringArray (options); | return StringArray (options); | ||||
| @@ -54,7 +54,7 @@ public: | |||||
| bool canDoStereo(); | bool canDoStereo(); | ||||
| bool canDoMono(); | bool canDoMono(); | ||||
| bool isCompressed(); | bool isCompressed(); | ||||
| const StringArray getQualityOptions(); | |||||
| StringArray getQualityOptions(); | |||||
| //============================================================================== | //============================================================================== | ||||
| AudioFormatReader* createReaderFor (InputStream* sourceStream, | AudioFormatReader* createReaderFor (InputStream* sourceStream, | ||||
| @@ -453,7 +453,7 @@ AudioFormatWriter* OggVorbisAudioFormat::createWriterFor (OutputStream* out, | |||||
| return w->ok ? w.release() : nullptr; | 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", | 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 }; | "192 kbps", "224 kbps", "256 kbps", "320 kbps", "500 kbps", 0 }; | ||||
| @@ -49,12 +49,12 @@ public: | |||||
| ~OggVorbisAudioFormat(); | ~OggVorbisAudioFormat(); | ||||
| //============================================================================== | //============================================================================== | ||||
| const Array <int> getPossibleSampleRates(); | |||||
| const Array <int> getPossibleBitDepths(); | |||||
| const Array<int> getPossibleSampleRates(); | |||||
| const Array<int> getPossibleBitDepths(); | |||||
| bool canDoStereo(); | bool canDoStereo(); | ||||
| bool canDoMono(); | bool canDoMono(); | ||||
| bool isCompressed(); | bool isCompressed(); | ||||
| const StringArray getQualityOptions(); | |||||
| StringArray getQualityOptions(); | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Tries to estimate the quality level of an ogg file based on its size. | /** Tries to estimate the quality level of an ogg file based on its size. | ||||
| @@ -114,12 +114,12 @@ void AudioDeviceManager::createAudioDeviceTypes (OwnedArray <AudioIODeviceType>& | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| 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(); | scanDevicesIfNeeded(); | ||||
| @@ -322,8 +322,8 @@ AudioIODeviceType* AudioDeviceManager::getCurrentDeviceTypeObject() const | |||||
| return availableDeviceTypes[0]; | 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 | jassert (&newSetup != ¤tSetup); // this will have no effect | ||||
| @@ -191,12 +191,12 @@ public: | |||||
| @returns an error message if anything went wrong, or an empty string if it worked ok. | @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. | /** Returns some XML representing the current state of the manager. | ||||
| @@ -234,8 +234,8 @@ public: | |||||
| @see getAudioDeviceSetup | @see getAudioDeviceSetup | ||||
| */ | */ | ||||
| const String setAudioDeviceSetup (const AudioDeviceSetup& newSetup, | |||||
| bool treatAsChosenDevice); | |||||
| String setAudioDeviceSetup (const AudioDeviceSetup& newSetup, | |||||
| bool treatAsChosenDevice); | |||||
| /** Returns the currently-active audio device. */ | /** Returns the currently-active audio device. */ | ||||
| @@ -244,7 +244,7 @@ public: | |||||
| /** Returns the type of audio device currently in use. | /** Returns the type of audio device currently in use. | ||||
| @see setCurrentAudioDeviceType | @see setCurrentAudioDeviceType | ||||
| */ | */ | ||||
| const String getCurrentAudioDeviceType() const { return currentDeviceType; } | |||||
| String getCurrentAudioDeviceType() const { return currentDeviceType; } | |||||
| /** Returns the currently active audio device type object. | /** 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 | Don't keep a copy of this pointer - it's owned by the device manager and could | ||||
| @@ -375,7 +375,7 @@ public: | |||||
| @see setDefaultMidiOutput, getDefaultMidiOutput | @see setDefaultMidiOutput, getDefaultMidiOutput | ||||
| */ | */ | ||||
| const String getDefaultMidiOutputName() const { return defaultMidiOutputName; } | |||||
| String getDefaultMidiOutputName() const { return defaultMidiOutputName; } | |||||
| /** Returns the current default midi output device. | /** Returns the current default midi output device. | ||||
| @@ -496,8 +496,8 @@ private: | |||||
| void audioDeviceStoppedInt(); | void audioDeviceStoppedInt(); | ||||
| void handleIncomingMidiMessageInt (MidiInput*, const MidiMessage&); | 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 stopDevice(); | ||||
| void updateXml(); | void updateXml(); | ||||
| @@ -152,12 +152,12 @@ public: | |||||
| /** Returns the names of all the available output channels on this device. | /** Returns the names of all the available output channels on this device. | ||||
| To find out which of these are currently in use, call getActiveOutputChannels(). | 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. | /** Returns the names of all the available input channels on this device. | ||||
| To find out which of these are currently in use, call getActiveInputChannels(). | 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. | /** Returns the number of sample-rates this device supports. | ||||
| @@ -89,7 +89,7 @@ public: | |||||
| into inputs and outputs, this indicates whether to use | into inputs and outputs, this indicates whether to use | ||||
| the input or output name to refer to a pair of devices. | 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. | /** Returns the name of the default device. | ||||
| @@ -67,9 +67,9 @@ public: | |||||
| be "-INF dB". | be "-INF dB". | ||||
| */ | */ | ||||
| template <typename Type> | template <typename Type> | ||||
| 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; | String s; | ||||
| @@ -102,7 +102,7 @@ public: | |||||
| @see getDefaultDeviceIndex, openDevice | @see getDefaultDeviceIndex, openDevice | ||||
| */ | */ | ||||
| static const StringArray getDevices(); | |||||
| static StringArray getDevices(); | |||||
| /** Returns the index of the default midi input device to use. | /** Returns the index of the default midi input device to use. | ||||
| @@ -125,7 +125,7 @@ public: | |||||
| static MidiInput* openDevice (int deviceIndex, | static MidiInput* openDevice (int deviceIndex, | ||||
| MidiInputCallback* callback); | 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 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, | This will attempt to create a new midi input device with the specified name, | ||||
| @@ -138,20 +138,19 @@ public: | |||||
| */ | */ | ||||
| static MidiInput* createNewDevice (const String& deviceName, | static MidiInput* createNewDevice (const String& deviceName, | ||||
| MidiInputCallback* callback); | MidiInputCallback* callback); | ||||
| #endif | |||||
| #endif | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Destructor. */ | /** Destructor. */ | ||||
| virtual ~MidiInput(); | 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 | /** Allows you to set a custom name for the device, in case you don't like the name | ||||
| it was given when created. | 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. | /** Starts the device running. | ||||
| @@ -52,7 +52,7 @@ public: | |||||
| @see getDefaultDeviceIndex, openDevice | @see getDefaultDeviceIndex, openDevice | ||||
| */ | */ | ||||
| static const StringArray getDevices(); | |||||
| static StringArray getDevices(); | |||||
| /** Returns the index of the default midi output device to use. | /** Returns the index of the default midi output device to use. | ||||
| @@ -949,7 +949,7 @@ private: | |||||
| return new JucePlugInProcess(); | return new JucePlugInProcess(); | ||||
| } | } | ||||
| static const String createRTASName() | |||||
| static String createRTASName() | |||||
| { | { | ||||
| return String (JucePlugin_Name) + "\n" | return String (JucePlugin_Name) + "\n" | ||||
| + String (JucePlugin_Name).substring (0, 4); | + String (JucePlugin_Name).substring (0, 4); | ||||
| @@ -42,14 +42,14 @@ public: | |||||
| ~AudioUnitPluginFormat(); | ~AudioUnitPluginFormat(); | ||||
| //============================================================================== | //============================================================================== | ||||
| const String getName() const { return "AudioUnit"; } | |||||
| String getName() const { return "AudioUnit"; } | |||||
| void findAllTypesForFile (OwnedArray <PluginDescription>& results, const String& fileOrIdentifier); | void findAllTypesForFile (OwnedArray <PluginDescription>& results, const String& fileOrIdentifier); | ||||
| AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); | AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); | ||||
| bool fileMightContainThisPluginType (const String& fileOrIdentifier); | 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); | bool doesPluginStillExist (const PluginDescription& desc); | ||||
| const FileSearchPath getDefaultLocationsToSearch(); | |||||
| FileSearchPath getDefaultLocationsToSearch(); | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -1493,7 +1493,7 @@ AudioPluginInstance* AudioUnitPluginFormat::createInstanceFromDescription (const | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| const StringArray AudioUnitPluginFormat::searchPathsForPlugins (const FileSearchPath& /*directoriesToSearch*/, | |||||
| StringArray AudioUnitPluginFormat::searchPathsForPlugins (const FileSearchPath& /*directoriesToSearch*/, | |||||
| const bool /*recursive*/) | const bool /*recursive*/) | ||||
| { | { | ||||
| StringArray result; | StringArray result; | ||||
| @@ -1538,7 +1538,7 @@ bool AudioUnitPluginFormat::fileMightContainThisPluginType (const String& fileOr | |||||
| && f.isDirectory(); | && f.isDirectory(); | ||||
| } | } | ||||
| const String AudioUnitPluginFormat::getNameOfPluginFromIdentifier (const String& fileOrIdentifier) | |||||
| String AudioUnitPluginFormat::getNameOfPluginFromIdentifier (const String& fileOrIdentifier) | |||||
| { | { | ||||
| ComponentDescription desc; | ComponentDescription desc; | ||||
| String name, version, manufacturer; | String name, version, manufacturer; | ||||
| @@ -1558,7 +1558,7 @@ bool AudioUnitPluginFormat::doesPluginStillExist (const PluginDescription& desc) | |||||
| return File (desc.fileOrIdentifier).exists(); | return File (desc.fileOrIdentifier).exists(); | ||||
| } | } | ||||
| const FileSearchPath AudioUnitPluginFormat::getDefaultLocationsToSearch() | |||||
| FileSearchPath AudioUnitPluginFormat::getDefaultLocationsToSearch() | |||||
| { | { | ||||
| return FileSearchPath ("/(Default AudioUnit locations)"); | return FileSearchPath ("/(Default AudioUnit locations)"); | ||||
| } | } | ||||
| @@ -46,12 +46,12 @@ public: | |||||
| ~DirectXPluginFormat(); | ~DirectXPluginFormat(); | ||||
| //============================================================================== | //============================================================================== | ||||
| const String getName() const { return "DirectX"; } | |||||
| String getName() const { return "DirectX"; } | |||||
| void findAllTypesForFile (OwnedArray <PluginDescription>& results, const String& fileOrIdentifier); | void findAllTypesForFile (OwnedArray <PluginDescription>& results, const String& fileOrIdentifier); | ||||
| AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); | AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); | ||||
| bool fileMightContainThisPluginType (const String& fileOrIdentifier); | 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: | private: | ||||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectXPluginFormat); | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectXPluginFormat); | ||||
| @@ -46,12 +46,12 @@ public: | |||||
| ~LADSPAPluginFormat(); | ~LADSPAPluginFormat(); | ||||
| //============================================================================== | //============================================================================== | ||||
| const String getName() const { return "LADSPA"; } | |||||
| String getName() const { return "LADSPA"; } | |||||
| void findAllTypesForFile (OwnedArray <PluginDescription>& results, const String& fileOrIdentifier); | void findAllTypesForFile (OwnedArray <PluginDescription>& results, const String& fileOrIdentifier); | ||||
| AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); | AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); | ||||
| bool fileMightContainThisPluginType (const String& fileOrIdentifier); | 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: | private: | ||||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LADSPAPluginFormat); | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LADSPAPluginFormat); | ||||
| @@ -2877,7 +2877,7 @@ bool VSTPluginFormat::fileMightContainThisPluginType (const String& fileOrIdenti | |||||
| #endif | #endif | ||||
| } | } | ||||
| const String VSTPluginFormat::getNameOfPluginFromIdentifier (const String& fileOrIdentifier) | |||||
| String VSTPluginFormat::getNameOfPluginFromIdentifier (const String& fileOrIdentifier) | |||||
| { | { | ||||
| return fileOrIdentifier; | return fileOrIdentifier; | ||||
| } | } | ||||
| @@ -2887,7 +2887,7 @@ bool VSTPluginFormat::doesPluginStillExist (const PluginDescription& desc) | |||||
| return File (desc.fileOrIdentifier).exists(); | 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; | StringArray results; | ||||
| @@ -2919,7 +2919,7 @@ void VSTPluginFormat::recursiveFileSearch (StringArray& results, const File& dir | |||||
| } | } | ||||
| } | } | ||||
| const FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() | |||||
| FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() | |||||
| { | { | ||||
| #if JUCE_MAC | #if JUCE_MAC | ||||
| return FileSearchPath ("~/Library/Audio/Plug-Ins/VST;/Library/Audio/Plug-Ins/VST"); | return FileSearchPath ("~/Library/Audio/Plug-Ins/VST;/Library/Audio/Plug-Ins/VST"); | ||||
| @@ -43,14 +43,14 @@ public: | |||||
| ~VSTPluginFormat(); | ~VSTPluginFormat(); | ||||
| //============================================================================== | //============================================================================== | ||||
| const String getName() const { return "VST"; } | |||||
| String getName() const { return "VST"; } | |||||
| void findAllTypesForFile (OwnedArray <PluginDescription>& results, const String& fileOrIdentifier); | void findAllTypesForFile (OwnedArray <PluginDescription>& results, const String& fileOrIdentifier); | ||||
| AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); | AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc); | ||||
| bool fileMightContainThisPluginType (const String& fileOrIdentifier); | 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); | bool doesPluginStillExist (const PluginDescription& desc); | ||||
| const FileSearchPath getDefaultLocationsToSearch(); | |||||
| FileSearchPath getDefaultLocationsToSearch(); | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -50,7 +50,7 @@ public: | |||||
| E.g. "VST", "AudioUnit", etc. | 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 | /** This tries to create descriptions for all the plugin types available in | ||||
| a binary module file. | a binary module file. | ||||
| @@ -80,7 +80,7 @@ public: | |||||
| /** Returns a readable version of the name of the plugin that this identifier refers to. | /** 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. | /** Checks whether this plugin could possibly be loaded. | ||||
| @@ -94,15 +94,15 @@ public: | |||||
| The path might be ignored, e.g. by AUs, which are found by the OS rather | The path might be ignored, e.g. by AUs, which are found by the OS rather | ||||
| than manually. | 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. | /** 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 | 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) | (i.e. it's an internal format that doesn't live in files) | ||||
| */ | */ | ||||
| virtual const FileSearchPath getDefaultLocationsToSearch() = 0; | |||||
| virtual FileSearchPath getDefaultLocationsToSearch() = 0; | |||||
| protected: | protected: | ||||
| @@ -95,7 +95,7 @@ void KnownPluginList::removeType (const int index) | |||||
| namespace | namespace | ||||
| { | { | ||||
| const Time getPluginFileModTime (const String& fileOrIdentifier) | |||||
| Time getPluginFileModTime (const String& fileOrIdentifier) | |||||
| { | { | ||||
| if (fileOrIdentifier.startsWithChar ('/') || fileOrIdentifier[1] == ':') | if (fileOrIdentifier.startsWithChar ('/') || fileOrIdentifier[1] == ':') | ||||
| return File (fileOrIdentifier).getLastModificationTime(); | return File (fileOrIdentifier).getLastModificationTime(); | ||||
| @@ -84,7 +84,7 @@ bool PluginDescription::isDuplicateOf (const PluginDescription& other) const | |||||
| && uid == other.uid; | && uid == other.uid; | ||||
| } | } | ||||
| const String PluginDescription::createIdentifierString() const | |||||
| String PluginDescription::createIdentifierString() const | |||||
| { | { | ||||
| return pluginFormatName | return pluginFormatName | ||||
| + "-" + name | + "-" + name | ||||
| @@ -120,7 +120,7 @@ public: | |||||
| plugin's file location, so can be used to store a plugin ID for use | plugin's file location, so can be used to store a plugin ID for use | ||||
| across different machines. | across different machines. | ||||
| */ | */ | ||||
| const String createIdentifierString() const; | |||||
| String createIdentifierString() const; | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Creates an XML object containing these details. | /** Creates an XML object containing these details. | ||||
| @@ -108,13 +108,13 @@ public: | |||||
| Returns a value less than 0 if no note is playing. | 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 the sound that this voice is currently playing. | ||||
| Returns 0 if it's not 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. | /** Must return true if this voice object is capable of playing the given sound. | ||||
| @@ -45,7 +45,7 @@ bool DynamicObject::hasProperty (const Identifier& propertyName) const | |||||
| return v != nullptr && ! v->isMethod(); | return v != nullptr && ! v->isMethod(); | ||||
| } | } | ||||
| const var DynamicObject::getProperty (const Identifier& propertyName) const | |||||
| var DynamicObject::getProperty (const Identifier& propertyName) const | |||||
| { | { | ||||
| return properties [propertyName]; | return properties [propertyName]; | ||||
| } | } | ||||
| @@ -65,9 +65,9 @@ bool DynamicObject::hasMethod (const Identifier& methodName) const | |||||
| return getProperty (methodName).isMethod(); | 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); | return properties [methodName].invokeMethod (this, parameters, numParameters); | ||||
| } | } | ||||
| @@ -60,7 +60,7 @@ public: | |||||
| This returns a void if no such property exists. | 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. */ | /** Sets a named property. */ | ||||
| virtual void setProperty (const Identifier& propertyName, const var& newValue); | virtual void setProperty (const Identifier& propertyName, const var& newValue); | ||||
| @@ -85,9 +85,9 @@ public: | |||||
| This method is virtual to allow more dynamic invocation to used for objects | This method is virtual to allow more dynamic invocation to used for objects | ||||
| where the methods may not already be set as properies. | 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. | /** Sets up a method. | ||||
| @@ -77,7 +77,7 @@ public: | |||||
| { | { | ||||
| } | } | ||||
| const var getValue() const | |||||
| var getValue() const | |||||
| { | { | ||||
| return value; | return value; | ||||
| } | } | ||||
| @@ -178,7 +178,7 @@ public: | |||||
| virtual ~ValueSource(); | virtual ~ValueSource(); | ||||
| /** Returns the current value of this object. */ | /** Returns the current value of this object. */ | ||||
| virtual const var getValue() const = 0; | |||||
| virtual var getValue() const = 0; | |||||
| /** Changes the current value. | /** Changes the current value. | ||||
| This must also trigger a change message if the value actually changes. | This must also trigger a change message if the value actually changes. | ||||
| @@ -326,7 +326,7 @@ const var& ValueTree::SharedObject::getProperty (const Identifier& name) const | |||||
| return properties [name]; | 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); | return properties.getWithDefault (name, defaultReturnValue); | ||||
| } | } | ||||
| @@ -733,7 +733,7 @@ public: | |||||
| tree.removeListener (this); | tree.removeListener (this); | ||||
| } | } | ||||
| const var getValue() const | |||||
| var getValue() const | |||||
| { | { | ||||
| return tree [property]; | return tree [property]; | ||||
| } | } | ||||
| @@ -493,7 +493,7 @@ private: | |||||
| void sendChildOrderChangedMessage(); | void sendChildOrderChangedMessage(); | ||||
| void sendParentChangeMessage(); | void sendParentChangeMessage(); | ||||
| const var& getProperty (const Identifier& name) const; | 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*); | void setProperty (const Identifier& name, const var& newValue, UndoManager*); | ||||
| bool hasProperty (const Identifier& name) const; | bool hasProperty (const Identifier& name) const; | ||||
| void removeProperty (const Identifier& name, UndoManager*); | void removeProperty (const Identifier& name, UndoManager*); | ||||
| @@ -55,7 +55,7 @@ public: | |||||
| #if JUCE_MAC || JUCE_IOS || DOXYGEN | #if JUCE_MAC || JUCE_IOS || DOXYGEN | ||||
| //============================================================================== | //============================================================================== | ||||
| /** MAC ONLY - Turns a Core CF String into a juce one. */ | /** 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. */ | /** MAC ONLY - Turns a juce string into a Core CF one. */ | ||||
| static CFStringRef juceStringToCFString (const String& s); | static CFStringRef juceStringToCFString (const String& s); | ||||
| @@ -64,12 +64,12 @@ public: | |||||
| static bool makeFSRefFromPath (FSRef* destFSRef, const String& path); | static bool makeFSRefFromPath (FSRef* destFSRef, const String& path); | ||||
| /** MAC ONLY - Turns an FSRef into a juce 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 | /** MAC ONLY - Converts any decomposed unicode characters in a string into | ||||
| their precomposed equivalents. | 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. */ | /** MAC ONLY - Gets the type of a file from the file's resources. */ | ||||
| static OSType getTypeOfFile (const String& filename); | static OSType getTypeOfFile (const String& filename); | ||||
| @@ -96,8 +96,8 @@ public: | |||||
| The path is a string for the entire path of a value in the registry, | The path is a string for the entire path of a value in the registry, | ||||
| e.g. "HKEY_CURRENT_USER\Software\foo\bar" | 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. | /** WIN32 ONLY - Sets a registry value as a string. | ||||
| @@ -156,7 +156,7 @@ public: | |||||
| This is needed to avoid unicode problems with the argc type params. | This is needed to avoid unicode problems with the argc type params. | ||||
| */ | */ | ||||
| static const String JUCE_CALLTYPE getCurrentCommandLineParams(); | |||||
| static String JUCE_CALLTYPE getCurrentCommandLineParams(); | |||||
| #endif | #endif | ||||
| /** Clears the floating point unit's flags. | /** Clears the floating point unit's flags. | ||||
| @@ -40,7 +40,7 @@ const SystemStats::CPUFlags& SystemStats::getCPUFlags() | |||||
| return cpuFlags; | 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 | // 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! | // on all platforms. Let me know if any of these assertions fail on your system! | ||||
| @@ -41,7 +41,7 @@ public: | |||||
| See also the JUCE_VERSION, JUCE_MAJOR_VERSION and JUCE_MINOR_VERSION macros. | 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. | /** The set of possible results of the getOperatingSystemType() method. | ||||
| @@ -81,7 +81,7 @@ public: | |||||
| @returns a string describing the OS type. | @returns a string describing the OS type. | ||||
| @see getOperatingSystemType | @see getOperatingSystemType | ||||
| */ | */ | ||||
| static const String getOperatingSystemName(); | |||||
| static String getOperatingSystemName(); | |||||
| /** Returns true if the OS is 64-bit, or false for a 32-bit OS. | /** Returns true if the OS is 64-bit, or false for a 32-bit OS. | ||||
| */ | */ | ||||
| @@ -91,16 +91,16 @@ public: | |||||
| /** Returns the current user's name, if available. | /** Returns the current user's name, if available. | ||||
| @see getFullUserName() | @see getFullUserName() | ||||
| */ | */ | ||||
| static const String getLogonName(); | |||||
| static String getLogonName(); | |||||
| /** Returns the current user's full name, if available. | /** Returns the current user's full name, if available. | ||||
| On some OSes, this may just return the same value as getLogonName(). | On some OSes, this may just return the same value as getLogonName(). | ||||
| @see getLogonName() | @see getLogonName() | ||||
| */ | */ | ||||
| static const String getFullUserName(); | |||||
| static String getFullUserName(); | |||||
| /** Returns the host-name of the computer. */ | /** Returns the host-name of the computer. */ | ||||
| static const String getComputerName(); | |||||
| static String getComputerName(); | |||||
| //============================================================================== | //============================================================================== | ||||
| // CPU and memory information.. | // CPU and memory information.. | ||||
| @@ -116,7 +116,7 @@ public: | |||||
| Might not be known on some systems. | Might not be known on some systems. | ||||
| */ | */ | ||||
| static const String getCpuVendor(); | |||||
| static String getCpuVendor(); | |||||
| /** Checks whether Intel MMX instructions are available. */ | /** Checks whether Intel MMX instructions are available. */ | ||||
| static bool hasMMX() noexcept { return getCPUFlags().hasMMX; } | static bool hasMMX() noexcept { return getCPUFlags().hasMMX; } | ||||
| @@ -140,7 +140,7 @@ bool InterprocessConnection::isConnected() const | |||||
| && isThreadRunning(); | && isThreadRunning(); | ||||
| } | } | ||||
| const String InterprocessConnection::getConnectedHostName() const | |||||
| String InterprocessConnection::getConnectedHostName() const | |||||
| { | { | ||||
| if (pipe != nullptr) | if (pipe != nullptr) | ||||
| { | { | ||||
| @@ -139,7 +139,7 @@ public: | |||||
| This will return an empty string if the other machine isn't known for | This will return an empty string if the other machine isn't known for | ||||
| some reason. | some reason. | ||||
| */ | */ | ||||
| const String getConnectedHostName() const; | |||||
| String getConnectedHostName() const; | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Tries to send a message to the other end of this connection. | /** Tries to send a message to the other end of this connection. | ||||
| @@ -78,7 +78,7 @@ public: | |||||
| @see setButtonText | @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. | /** Returns true if the button is currently being held down by the mouse. | ||||
| @@ -567,7 +567,7 @@ int CPlusPlusCodeTokeniser::readNextToken (CodeDocument::Iterator& source) | |||||
| return result; | return result; | ||||
| } | } | ||||
| const StringArray CPlusPlusCodeTokeniser::getTokenTypes() | |||||
| StringArray CPlusPlusCodeTokeniser::getTokenTypes() | |||||
| { | { | ||||
| const char* const types[] = | const char* const types[] = | ||||
| { | { | ||||
| @@ -60,7 +60,7 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| int readNextToken (CodeDocument::Iterator& source); | int readNextToken (CodeDocument::Iterator& source); | ||||
| const StringArray getTokenTypes(); | |||||
| StringArray getTokenTypes(); | |||||
| const Colour getDefaultColour (int tokenType); | const Colour getDefaultColour (int tokenType); | ||||
| /** This is a handy method for checking whether a string is a c++ reserved keyword. */ | /** This is a handy method for checking whether a string is a c++ reserved keyword. */ | ||||
| @@ -444,7 +444,7 @@ const juce_wchar CodeDocument::Position::getCharacter() const | |||||
| return l == nullptr ? 0 : l->line [getIndexInLine()]; | 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]; | const CodeDocumentLine* const l = owner->lines [line]; | ||||
| return l == nullptr ? String::empty : l->line; | return l == nullptr ? String::empty : l->line; | ||||
| @@ -487,13 +487,13 @@ CodeDocument::~CodeDocument() | |||||
| { | { | ||||
| } | } | ||||
| const String CodeDocument::getAllContent() const | |||||
| String CodeDocument::getAllContent() const | |||||
| { | { | ||||
| return getTextBetween (Position (this, 0), | return getTextBetween (Position (this, 0), | ||||
| Position (this, lines.size(), 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()) | if (end.getPosition() <= start.getPosition()) | ||||
| return String::empty; | return String::empty; | ||||
| @@ -542,7 +542,7 @@ int CodeDocument::getNumCharacters() const noexcept | |||||
| return (lastLine == nullptr) ? 0 : lastLine->lineStartInFile + lastLine->lineLength; | 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]; | const CodeDocumentLine* const line = lines [lineIndex]; | ||||
| return (line == nullptr) ? String::empty : line->line; | return (line == nullptr) ? String::empty : line->line; | ||||
| @@ -180,7 +180,7 @@ public: | |||||
| /** Returns the line from the document that this position is within. | /** Returns the line from the document that this position is within. | ||||
| @see getCharacter, getLineNumber | @see getCharacter, getLineNumber | ||||
| */ | */ | ||||
| const String getLineText() const; | |||||
| String getLineText() const; | |||||
| //============================================================================== | //============================================================================== | ||||
| private: | private: | ||||
| @@ -191,13 +191,13 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Returns the full text of the document. */ | /** Returns the full text of the document. */ | ||||
| const String getAllContent() const; | |||||
| String getAllContent() const; | |||||
| /** Returns a section of the document's text. */ | /** 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. */ | /** 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. */ | /** Returns the number of characters in the document. */ | ||||
| int getNumCharacters() const noexcept; | int getNumCharacters() const noexcept; | ||||
| @@ -240,7 +240,7 @@ public: | |||||
| This will be either "\n", "\r\n", or (rarely) "\r". | This will be either "\n", "\r\n", or (rarely) "\r". | ||||
| @see setNewLineCharacters | @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. | /** Sets the new-line characters that the document should use. | ||||
| The string must be either "\n", "\r\n", or (rarely) "\r". | The string must be either "\n", "\r\n", or (rarely) "\r". | ||||
| @@ -55,7 +55,7 @@ public: | |||||
| The index in this list must match the token type numbers that are | The index in this list must match the token type numbers that are | ||||
| returned by readNextToken(). | returned by readNextToken(). | ||||
| */ | */ | ||||
| virtual const StringArray getTokenTypes() = 0; | |||||
| virtual StringArray getTokenTypes() = 0; | |||||
| /** Returns a suggested syntax highlighting colour for a specified | /** Returns a suggested syntax highlighting colour for a specified | ||||
| token type. | token type. | ||||
| @@ -87,7 +87,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()) | return (returnActiveEditorContents && isBeingEdited()) | ||||
| ? editor->getText() | ? editor->getText() | ||||
| @@ -74,7 +74,7 @@ public: | |||||
| the user has finished typing and pressed the return | the user has finished typing and pressed the return | ||||
| key. | key. | ||||
| */ | */ | ||||
| const String getText (bool returnActiveEditorContents = false) const; | |||||
| String getText (bool returnActiveEditorContents = false) const; | |||||
| /** Returns the text content as a Value object. | /** Returns the text content as a Value object. | ||||
| You can call Value::referTo() on this object to make the label read and control | You can call Value::referTo() on this object to make the label read and control | ||||
| @@ -653,7 +653,7 @@ void Slider::setTextValueSuffix (const String& suffix) | |||||
| } | } | ||||
| } | } | ||||
| const String Slider::getTextValueSuffix() const | |||||
| String Slider::getTextValueSuffix() const | |||||
| { | { | ||||
| return textSuffix; | return textSuffix; | ||||
| } | } | ||||
| @@ -682,7 +682,7 @@ public: | |||||
| void setTextValueSuffix (const String& suffix); | void setTextValueSuffix (const String& suffix); | ||||
| /** Returns the suffix that was set by setTextValueSuffix(). */ | /** 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. | /** Allows a user-defined mapping of distance along the slider to its value. | ||||
| @@ -105,7 +105,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); | const ColumnInfo* const ci = getInfoForId (columnId); | ||||
| return ci != nullptr ? ci->name : String::empty; | return ci != nullptr ? ci->name : String::empty; | ||||
| @@ -431,7 +431,7 @@ void TableHeaderComponent::reSortTable() | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| const String TableHeaderComponent::toString() const | |||||
| String TableHeaderComponent::toString() const | |||||
| { | { | ||||
| String s; | String s; | ||||
| @@ -137,7 +137,7 @@ public: | |||||
| /** Returns the name for a column. | /** Returns the name for a column. | ||||
| @see setColumnName | @see setColumnName | ||||
| */ | */ | ||||
| const String getColumnName (int columnId) const; | |||||
| String getColumnName (int columnId) const; | |||||
| /** Changes the name of a column. */ | /** Changes the name of a column. */ | ||||
| void setColumnName (int columnId, const String& newName); | void setColumnName (int columnId, const String& newName); | ||||
| @@ -286,7 +286,7 @@ public: | |||||
| @see restoreFromString | @see restoreFromString | ||||
| */ | */ | ||||
| const String toString() const; | |||||
| String toString() const; | |||||
| /** Restores the state of the table, based on a string previously created with | /** Restores the state of the table, based on a string previously created with | ||||
| toString(). | toString(). | ||||
| @@ -398,7 +398,7 @@ void Toolbar::setStyle (const ToolbarItemStyle& newStyle) | |||||
| } | } | ||||
| } | } | ||||
| const String Toolbar::toString() const | |||||
| String Toolbar::toString() const | |||||
| { | { | ||||
| String s ("TB:"); | String s ("TB:"); | ||||
| @@ -257,7 +257,7 @@ public: | |||||
| @see restoreFromString | @see restoreFromString | ||||
| */ | */ | ||||
| const String toString() const; | |||||
| String toString() const; | |||||
| /** Restores a set of items that was previously stored in a string by the toString() | /** Restores a set of items that was previously stored in a string by the toString() | ||||
| method. | method. | ||||
| @@ -33,7 +33,7 @@ BEGIN_JUCE_NAMESPACE | |||||
| //============================================================================= | //============================================================================= | ||||
| namespace ComponentBuilderHelpers | namespace ComponentBuilderHelpers | ||||
| { | { | ||||
| const String getStateId (const ValueTree& state) | |||||
| String getStateId (const ValueTree& state) | |||||
| { | { | ||||
| return state [ComponentBuilder::idProperty].toString(); | return state [ComponentBuilder::idProperty].toString(); | ||||
| } | } | ||||
| @@ -194,12 +194,12 @@ public: | |||||
| The image that is returned will be owned by the caller, but it may come | The image that is returned will be owned by the caller, but it may come | ||||
| from the ImageCache. | 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. | /** 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. | 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; | |||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -55,7 +55,7 @@ void GroupComponent::setText (const String& newText) | |||||
| } | } | ||||
| } | } | ||||
| const String GroupComponent::getText() const | |||||
| String GroupComponent::getText() const | |||||
| { | { | ||||
| return text; | return text; | ||||
| } | } | ||||
| @@ -55,7 +55,7 @@ public: | |||||
| void setText (const String& newText); | void setText (const String& newText); | ||||
| /** Returns the currently displayed text label. */ | /** Returns the currently displayed text label. */ | ||||
| const String getText() const; | |||||
| String getText() const; | |||||
| /** Sets the positioning of the text label. | /** Sets the positioning of the text label. | ||||
| @@ -272,7 +272,7 @@ int TabbedButtonBar::getNumTabs() const | |||||
| return tabs.size(); | return tabs.size(); | ||||
| } | } | ||||
| const String TabbedButtonBar::getCurrentTabName() const | |||||
| String TabbedButtonBar::getCurrentTabName() const | |||||
| { | { | ||||
| TabInfo* tab = tabs [currentTabIndex]; | TabInfo* tab = tabs [currentTabIndex]; | ||||
| return tab == nullptr ? String::empty : tab->name; | return tab == nullptr ? String::empty : tab->name; | ||||
| @@ -199,7 +199,7 @@ public: | |||||
| This could be an empty string if none are selected. | 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. | /** Returns the index of the currently selected tab. | ||||
| @@ -221,7 +221,7 @@ int TabbedComponent::getCurrentTabIndex() const | |||||
| return tabs->getCurrentTabIndex(); | return tabs->getCurrentTabIndex(); | ||||
| } | } | ||||
| const String TabbedComponent::getCurrentTabName() const | |||||
| String TabbedComponent::getCurrentTabName() const | |||||
| { | { | ||||
| return tabs->getCurrentTabName(); | return tabs->getCurrentTabName(); | ||||
| } | } | ||||
| @@ -162,7 +162,7 @@ public: | |||||
| @see addTab, TabbedButtonBar::getCurrentTabName() | @see addTab, TabbedButtonBar::getCurrentTabName() | ||||
| */ | */ | ||||
| const String getCurrentTabName() const; | |||||
| String getCurrentTabName() const; | |||||
| /** Returns the current component that's filling the panel. | /** Returns the current component that's filling the panel. | ||||
| @@ -425,7 +425,7 @@ bool DragAndDropContainer::isDragAndDropActive() const | |||||
| return dragImageComponent != nullptr; | return dragImageComponent != nullptr; | ||||
| } | } | ||||
| const String DragAndDropContainer::getCurrentDragDescription() const | |||||
| String DragAndDropContainer::getCurrentDragDescription() const | |||||
| { | { | ||||
| return dragImageComponent != nullptr ? currentDragDesc | return dragImageComponent != nullptr ? currentDragDesc | ||||
| : String::empty; | : String::empty; | ||||
| @@ -103,7 +103,7 @@ public: | |||||
| @see startDragging | @see startDragging | ||||
| */ | */ | ||||
| const String getCurrentDragDescription() const; | |||||
| String getCurrentDragDescription() const; | |||||
| /** Utility to find the DragAndDropContainer for a given Component. | /** Utility to find the DragAndDropContainer for a given Component. | ||||
| @@ -306,12 +306,12 @@ public: | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| const Time getLastMouseDownTime() const noexcept | |||||
| Time getLastMouseDownTime() const noexcept | |||||
| { | { | ||||
| return Time (mouseDowns[0].time); | return Time (mouseDowns[0].time); | ||||
| } | } | ||||
| const Point<int> getLastMouseDownPosition() const noexcept | |||||
| Point<int> getLastMouseDownPosition() const noexcept | |||||
| { | { | ||||
| return mouseDowns[0].position; | return mouseDowns[0].position; | ||||
| } | } | ||||
| @@ -512,8 +512,8 @@ const ModifierKeys MouseInputSource::getCurrentModifiers() const { return | |||||
| Component* MouseInputSource::getComponentUnderMouse() const { return pimpl->getComponentUnderMouse(); } | Component* MouseInputSource::getComponentUnderMouse() const { return pimpl->getComponentUnderMouse(); } | ||||
| void MouseInputSource::triggerFakeMove() const { pimpl->triggerFakeMove(); } | void MouseInputSource::triggerFakeMove() const { pimpl->triggerFakeMove(); } | ||||
| int MouseInputSource::getNumberOfMultipleClicks() const noexcept { return pimpl->getNumberOfMultipleClicks(); } | int MouseInputSource::getNumberOfMultipleClicks() const noexcept { return pimpl->getNumberOfMultipleClicks(); } | ||||
| const Time MouseInputSource::getLastMouseDownTime() const noexcept { return pimpl->getLastMouseDownTime(); } | |||||
| const Point<int> MouseInputSource::getLastMouseDownPosition() const noexcept { return pimpl->getLastMouseDownPosition(); } | |||||
| Time MouseInputSource::getLastMouseDownTime() const noexcept { return pimpl->getLastMouseDownTime(); } | |||||
| Point<int> MouseInputSource::getLastMouseDownPosition() const noexcept { return pimpl->getLastMouseDownPosition(); } | |||||
| bool MouseInputSource::hasMouseMovedSignificantlySincePressed() const noexcept { return pimpl->hasMouseMovedSignificantlySincePressed(); } | bool MouseInputSource::hasMouseMovedSignificantlySincePressed() const noexcept { return pimpl->hasMouseMovedSignificantlySincePressed(); } | ||||
| bool MouseInputSource::canDoUnboundedMovement() const noexcept { return isMouse(); } | bool MouseInputSource::canDoUnboundedMovement() const noexcept { return isMouse(); } | ||||
| void MouseInputSource::enableUnboundedMouseMovement (bool isEnabled, bool keepCursorVisibleUntilOffscreen) { pimpl->enableUnboundedMouseMovement (isEnabled, keepCursorVisibleUntilOffscreen); } | void MouseInputSource::enableUnboundedMouseMovement (bool isEnabled, bool keepCursorVisibleUntilOffscreen) { pimpl->enableUnboundedMouseMovement (isEnabled, keepCursorVisibleUntilOffscreen); } | ||||
| @@ -120,10 +120,10 @@ public: | |||||
| int getNumberOfMultipleClicks() const noexcept; | int getNumberOfMultipleClicks() const noexcept; | ||||
| /** Returns the time at which the last mouse-down occurred. */ | /** 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. */ | /** Returns the screen position at which the last mouse-down occurred. */ | ||||
| const Point<int> getLastMouseDownPosition() const noexcept; | |||||
| Point<int> getLastMouseDownPosition() const noexcept; | |||||
| /** Returns true if this mouse is currently down, and if it has been dragged more | /** 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. | than a couple of pixels from the place it was pressed. | ||||
| @@ -204,12 +204,12 @@ int MarkerList::ValueTreeWrapper::getNumMarkers() const | |||||
| return state.getNumChildren(); | return state.getNumChildren(); | ||||
| } | } | ||||
| const ValueTree MarkerList::ValueTreeWrapper::getMarkerState (int index) const | |||||
| ValueTree MarkerList::ValueTreeWrapper::getMarkerState (int index) const | |||||
| { | { | ||||
| return state.getChild (index); | 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); | return state.getChildWithProperty (nameProperty, name); | ||||
| } | } | ||||
| @@ -219,7 +219,7 @@ bool MarkerList::ValueTreeWrapper::containsMarker (const ValueTree& marker) cons | |||||
| return marker.isAChildOf (state); | 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)); | jassert (containsMarker (marker)); | ||||
| @@ -159,10 +159,10 @@ public: | |||||
| ValueTree& getState() noexcept { return state; } | ValueTree& getState() noexcept { return state; } | ||||
| int getNumMarkers() const; | 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; | 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 setMarker (const MarkerList::Marker& marker, UndoManager* undoManager); | ||||
| void removeMarker (const ValueTree& state, UndoManager* undoManager); | void removeMarker (const ValueTree& state, UndoManager* undoManager); | ||||
| @@ -36,7 +36,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)) | switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol)) | ||||
| { | { | ||||
| @@ -75,7 +75,7 @@ void RelativeCoordinatePositionerBase::ComponentScope::visitRelativeScope (const | |||||
| Expression::Scope::visitRelativeScope (scopeName, visitor); | 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); | return String::toHexString ((int) (pointer_sized_int) (void*) &component); | ||||
| } | } | ||||
| @@ -131,7 +131,7 @@ public: | |||||
| { | { | ||||
| } | } | ||||
| const Expression getSymbolValue (const String& symbol) const | |||||
| Expression getSymbolValue (const String& symbol) const | |||||
| { | { | ||||
| if (symbol == RelativeCoordinate::Strings::left || symbol == RelativeCoordinate::Strings::x | if (symbol == RelativeCoordinate::Strings::left || symbol == RelativeCoordinate::Strings::x | ||||
| || symbol == RelativeCoordinate::Strings::width || symbol == RelativeCoordinate::Strings::right | || symbol == RelativeCoordinate::Strings::width || symbol == RelativeCoordinate::Strings::right | ||||
| @@ -62,9 +62,9 @@ public: | |||||
| public: | public: | ||||
| ComponentScope (Component& component_); | ComponentScope (Component& component_); | ||||
| const Expression getSymbolValue (const String& symbol) const; | |||||
| Expression getSymbolValue (const String& symbol) const; | |||||
| void visitRelativeScope (const String& scopeName, Visitor& visitor) const; | void visitRelativeScope (const String& scopeName, Visitor& visitor) const; | ||||
| const String getScopeUID() const; | |||||
| String getScopeUID() const; | |||||
| protected: | protected: | ||||
| Component& component; | Component& component; | ||||
| @@ -152,7 +152,7 @@ RelativePointPath::StartSubPath::StartSubPath (const RelativePoint& pos) | |||||
| { | { | ||||
| } | } | ||||
| const ValueTree RelativePointPath::StartSubPath::createTree() const | |||||
| ValueTree RelativePointPath::StartSubPath::createTree() const | |||||
| { | { | ||||
| ValueTree v (DrawablePath::ValueTreeWrapper::Element::startSubPathElement); | ValueTree v (DrawablePath::ValueTreeWrapper::Element::startSubPathElement); | ||||
| v.setProperty (DrawablePath::ValueTreeWrapper::point1, startPos.toString(), nullptr); | v.setProperty (DrawablePath::ValueTreeWrapper::point1, startPos.toString(), nullptr); | ||||
| @@ -181,7 +181,7 @@ RelativePointPath::CloseSubPath::CloseSubPath() | |||||
| { | { | ||||
| } | } | ||||
| const ValueTree RelativePointPath::CloseSubPath::createTree() const | |||||
| ValueTree RelativePointPath::CloseSubPath::createTree() const | |||||
| { | { | ||||
| return ValueTree (DrawablePath::ValueTreeWrapper::Element::closeSubPathElement); | return ValueTree (DrawablePath::ValueTreeWrapper::Element::closeSubPathElement); | ||||
| } | } | ||||
| @@ -208,7 +208,7 @@ RelativePointPath::LineTo::LineTo (const RelativePoint& endPoint_) | |||||
| { | { | ||||
| } | } | ||||
| const ValueTree RelativePointPath::LineTo::createTree() const | |||||
| ValueTree RelativePointPath::LineTo::createTree() const | |||||
| { | { | ||||
| ValueTree v (DrawablePath::ValueTreeWrapper::Element::lineToElement); | ValueTree v (DrawablePath::ValueTreeWrapper::Element::lineToElement); | ||||
| v.setProperty (DrawablePath::ValueTreeWrapper::point1, endPoint.toString(), nullptr); | v.setProperty (DrawablePath::ValueTreeWrapper::point1, endPoint.toString(), nullptr); | ||||
| @@ -239,7 +239,7 @@ RelativePointPath::QuadraticTo::QuadraticTo (const RelativePoint& controlPoint, | |||||
| controlPoints[1] = endPoint; | controlPoints[1] = endPoint; | ||||
| } | } | ||||
| const ValueTree RelativePointPath::QuadraticTo::createTree() const | |||||
| ValueTree RelativePointPath::QuadraticTo::createTree() const | |||||
| { | { | ||||
| ValueTree v (DrawablePath::ValueTreeWrapper::Element::quadraticToElement); | ValueTree v (DrawablePath::ValueTreeWrapper::Element::quadraticToElement); | ||||
| v.setProperty (DrawablePath::ValueTreeWrapper::point1, controlPoints[0].toString(), nullptr); | v.setProperty (DrawablePath::ValueTreeWrapper::point1, controlPoints[0].toString(), nullptr); | ||||
| @@ -274,7 +274,7 @@ RelativePointPath::CubicTo::CubicTo (const RelativePoint& controlPoint1, const R | |||||
| controlPoints[2] = endPoint; | controlPoints[2] = endPoint; | ||||
| } | } | ||||
| const ValueTree RelativePointPath::CubicTo::createTree() const | |||||
| ValueTree RelativePointPath::CubicTo::createTree() const | |||||
| { | { | ||||
| ValueTree v (DrawablePath::ValueTreeWrapper::Element::cubicToElement); | ValueTree v (DrawablePath::ValueTreeWrapper::Element::cubicToElement); | ||||
| v.setProperty (DrawablePath::ValueTreeWrapper::point1, controlPoints[0].toString(), nullptr); | v.setProperty (DrawablePath::ValueTreeWrapper::point1, controlPoints[0].toString(), nullptr); | ||||
| @@ -84,7 +84,7 @@ public: | |||||
| public: | public: | ||||
| ElementBase (ElementType type); | ElementBase (ElementType type); | ||||
| virtual ~ElementBase() {} | virtual ~ElementBase() {} | ||||
| virtual const ValueTree createTree() const = 0; | |||||
| virtual ValueTree createTree() const = 0; | |||||
| virtual void addToPath (Path& path, Expression::Scope*) const = 0; | virtual void addToPath (Path& path, Expression::Scope*) const = 0; | ||||
| virtual RelativePoint* getControlPoints (int& numPoints) = 0; | virtual RelativePoint* getControlPoints (int& numPoints) = 0; | ||||
| virtual ElementBase* clone() const = 0; | virtual ElementBase* clone() const = 0; | ||||
| @@ -101,7 +101,7 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| StartSubPath (const RelativePoint& pos); | StartSubPath (const RelativePoint& pos); | ||||
| const ValueTree createTree() const; | |||||
| ValueTree createTree() const; | |||||
| void addToPath (Path& path, Expression::Scope*) const; | void addToPath (Path& path, Expression::Scope*) const; | ||||
| RelativePoint* getControlPoints (int& numPoints); | RelativePoint* getControlPoints (int& numPoints); | ||||
| ElementBase* clone() const; | ElementBase* clone() const; | ||||
| @@ -117,7 +117,7 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| CloseSubPath(); | CloseSubPath(); | ||||
| const ValueTree createTree() const; | |||||
| ValueTree createTree() const; | |||||
| void addToPath (Path& path, Expression::Scope*) const; | void addToPath (Path& path, Expression::Scope*) const; | ||||
| RelativePoint* getControlPoints (int& numPoints); | RelativePoint* getControlPoints (int& numPoints); | ||||
| ElementBase* clone() const; | ElementBase* clone() const; | ||||
| @@ -131,7 +131,7 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| LineTo (const RelativePoint& endPoint); | LineTo (const RelativePoint& endPoint); | ||||
| const ValueTree createTree() const; | |||||
| ValueTree createTree() const; | |||||
| void addToPath (Path& path, Expression::Scope*) const; | void addToPath (Path& path, Expression::Scope*) const; | ||||
| RelativePoint* getControlPoints (int& numPoints); | RelativePoint* getControlPoints (int& numPoints); | ||||
| ElementBase* clone() const; | ElementBase* clone() const; | ||||
| @@ -147,7 +147,7 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| QuadraticTo (const RelativePoint& controlPoint, const RelativePoint& endPoint); | QuadraticTo (const RelativePoint& controlPoint, const RelativePoint& endPoint); | ||||
| const ValueTree createTree() const; | |||||
| ValueTree createTree() const; | |||||
| void addToPath (Path& path, Expression::Scope*) const; | void addToPath (Path& path, Expression::Scope*) const; | ||||
| RelativePoint* getControlPoints (int& numPoints); | RelativePoint* getControlPoints (int& numPoints); | ||||
| ElementBase* clone() const; | ElementBase* clone() const; | ||||
| @@ -163,7 +163,7 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| CubicTo (const RelativePoint& controlPoint1, const RelativePoint& controlPoint2, const RelativePoint& endPoint); | CubicTo (const RelativePoint& controlPoint1, const RelativePoint& controlPoint2, const RelativePoint& endPoint); | ||||
| const ValueTree createTree() const; | |||||
| ValueTree createTree() const; | |||||
| void addToPath (Path& path, Expression::Scope*) const; | void addToPath (Path& path, Expression::Scope*) const; | ||||
| RelativePoint* getControlPoints (int& numPoints); | RelativePoint* getControlPoints (int& numPoints); | ||||
| ElementBase* clone() const; | ElementBase* clone() const; | ||||
| @@ -121,7 +121,7 @@ class RelativeRectangleLocalScope : public Expression::Scope | |||||
| public: | public: | ||||
| RelativeRectangleLocalScope (const RelativeRectangle& rect_) : rect (rect_) {} | RelativeRectangleLocalScope (const RelativeRectangle& rect_) : rect (rect_) {} | ||||
| const Expression getSymbolValue (const String& symbol) const | |||||
| Expression getSymbolValue (const String& symbol) const | |||||
| { | { | ||||
| switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol)) | switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol)) | ||||
| { | { | ||||
| @@ -179,7 +179,7 @@ bool RelativeRectangle::isDynamic() const | |||||
| || dependsOnSymbolsOtherThanThis (bottom.getExpression()); | || dependsOnSymbolsOtherThanThis (bottom.getExpression()); | ||||
| } | } | ||||
| const String RelativeRectangle::toString() const | |||||
| String RelativeRectangle::toString() const | |||||
| { | { | ||||
| return left.toString() + ", " + top.toString() + ", " + right.toString() + ", " + bottom.toString(); | return left.toString() + ", " + top.toString() + ", " + right.toString() + ", " + bottom.toString(); | ||||
| } | } | ||||
| @@ -88,7 +88,7 @@ public: | |||||
| the string syntax used by the coordinates, see the RelativeCoordinate constructor notes. | 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. | 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. | /** Renames a symbol if it is used by any of the coordinates. | ||||
| This calls Expression::withRenamedSymbol() on the rectangle's coordinates. | This calls Expression::withRenamedSymbol() on the rectangle's coordinates. | ||||
| @@ -44,7 +44,7 @@ public: | |||||
| ~RemapperValueSource() {} | ~RemapperValueSource() {} | ||||
| const var getValue() const | |||||
| var getValue() const | |||||
| { | { | ||||
| return mappings.indexOf (sourceValue.getValue()) + 1; | return mappings.indexOf (sourceValue.getValue()) + 1; | ||||
| } | } | ||||
| @@ -111,7 +111,7 @@ public: | |||||
| /** Returns the file path or URL from which the video file was loaded. | /** Returns the file path or URL from which the video file was loaded. | ||||
| If there isn't one, this returns an empty string. | 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. */ | /** Returns true if there's currently a video open. */ | ||||
| bool isMovieOpen() const; | bool isMovieOpen() const; | ||||
| @@ -120,7 +120,7 @@ public: | |||||
| If there isn't one, this returns File::nonexistent | 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. */ | /** Returns true if there's currently a movie open. */ | ||||
| bool isMovieOpen() const; | bool isMovieOpen() const; | ||||
| @@ -562,7 +562,7 @@ void ComponentPeer::addMaskedRegion (int x, int y, int w, int h) | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| const StringArray ComponentPeer::getAvailableRenderingEngines() | |||||
| StringArray ComponentPeer::getAvailableRenderingEngines() | |||||
| { | { | ||||
| return StringArray ("Software Renderer"); | return StringArray ("Software Renderer"); | ||||
| } | } | ||||
| @@ -359,7 +359,7 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| virtual const StringArray getAvailableRenderingEngines(); | |||||
| virtual StringArray getAvailableRenderingEngines(); | |||||
| virtual int getCurrentRenderingEngine() const; | virtual int getCurrentRenderingEngine() const; | ||||
| virtual void setCurrentRenderingEngine (int index); | virtual void setCurrentRenderingEngine (int index); | ||||
| @@ -1026,19 +1026,19 @@ public: | |||||
| typedef ReferenceCountedObjectPtr<ClipRegionBase> Ptr; | typedef ReferenceCountedObjectPtr<ClipRegionBase> 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<int>& r) = 0; | |||||
| virtual const Ptr clipToRectangleList (const RectangleList& r) = 0; | |||||
| virtual const Ptr excludeClipRectangle (const Rectangle<int>& 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<int>& delta) = 0; | |||||
| virtual Ptr clipToRectangle (const Rectangle<int>& r) = 0; | |||||
| virtual Ptr clipToRectangleList (const RectangleList& r) = 0; | |||||
| virtual Ptr excludeClipRectangle (const Rectangle<int>& 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<int>& delta) = 0; | |||||
| virtual bool clipRegionIntersects (const Rectangle<int>& r) const = 0; | virtual bool clipRegionIntersects (const Rectangle<int>& r) const = 0; | ||||
| virtual const Rectangle<int> getClipBounds() const = 0; | |||||
| virtual Rectangle<int> getClipBounds() const = 0; | |||||
| virtual void fillRectWithColour (Image::BitmapData& destData, const Rectangle<int>& area, const PixelARGB& colour, bool replaceContents) const = 0; | virtual void fillRectWithColour (Image::BitmapData& destData, const Rectangle<int>& area, const PixelARGB& colour, bool replaceContents) const = 0; | ||||
| virtual void fillRectWithColour (Image::BitmapData& destData, const Rectangle<float>& area, const PixelARGB& colour) const = 0; | virtual void fillRectWithColour (Image::BitmapData& destData, const Rectangle<float>& area, const PixelARGB& colour) const = 0; | ||||
| @@ -1226,23 +1226,23 @@ public: | |||||
| ClipRegion_EdgeTable (const Rectangle<int>& bounds, const Path& p, const AffineTransform& t) : edgeTable (bounds, p, t) {} | ClipRegion_EdgeTable (const Rectangle<int>& bounds, const Path& p, const AffineTransform& t) : edgeTable (bounds, p, t) {} | ||||
| ClipRegion_EdgeTable (const ClipRegion_EdgeTable& other) : edgeTable (other.edgeTable) {} | ClipRegion_EdgeTable (const ClipRegion_EdgeTable& other) : edgeTable (other.edgeTable) {} | ||||
| const Ptr clone() const | |||||
| Ptr clone() const | |||||
| { | { | ||||
| return new ClipRegion_EdgeTable (*this); | return new ClipRegion_EdgeTable (*this); | ||||
| } | } | ||||
| const Ptr applyClipTo (const Ptr& target) const | |||||
| Ptr applyClipTo (const Ptr& target) const | |||||
| { | { | ||||
| return target->clipToEdgeTable (edgeTable); | return target->clipToEdgeTable (edgeTable); | ||||
| } | } | ||||
| const Ptr clipToRectangle (const Rectangle<int>& r) | |||||
| Ptr clipToRectangle (const Rectangle<int>& r) | |||||
| { | { | ||||
| edgeTable.clipToRectangle (r); | edgeTable.clipToRectangle (r); | ||||
| return edgeTable.isEmpty() ? nullptr : this; | return edgeTable.isEmpty() ? nullptr : this; | ||||
| } | } | ||||
| const Ptr clipToRectangleList (const RectangleList& r) | |||||
| Ptr clipToRectangleList (const RectangleList& r) | |||||
| { | { | ||||
| RectangleList inverse (edgeTable.getMaximumBounds()); | RectangleList inverse (edgeTable.getMaximumBounds()); | ||||
| @@ -1253,26 +1253,26 @@ public: | |||||
| return edgeTable.isEmpty() ? nullptr : this; | return edgeTable.isEmpty() ? nullptr : this; | ||||
| } | } | ||||
| const Ptr excludeClipRectangle (const Rectangle<int>& r) | |||||
| Ptr excludeClipRectangle (const Rectangle<int>& r) | |||||
| { | { | ||||
| edgeTable.excludeRectangle (r); | edgeTable.excludeRectangle (r); | ||||
| return edgeTable.isEmpty() ? nullptr : this; | 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 et (edgeTable.getMaximumBounds(), p, transform); | ||||
| edgeTable.clipToEdgeTable (et); | edgeTable.clipToEdgeTable (et); | ||||
| return edgeTable.isEmpty() ? nullptr : this; | return edgeTable.isEmpty() ? nullptr : this; | ||||
| } | } | ||||
| const Ptr clipToEdgeTable (const EdgeTable& et) | |||||
| Ptr clipToEdgeTable (const EdgeTable& et) | |||||
| { | { | ||||
| edgeTable.clipToEdgeTable (et); | edgeTable.clipToEdgeTable (et); | ||||
| return edgeTable.isEmpty() ? nullptr : this; | 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); | const Image::BitmapData srcData (image, Image::BitmapData::readOnly); | ||||
| @@ -1317,7 +1317,7 @@ public: | |||||
| return edgeTable.isEmpty() ? nullptr : this; | return edgeTable.isEmpty() ? nullptr : this; | ||||
| } | } | ||||
| const Ptr translated (const Point<int>& delta) | |||||
| Ptr translated (const Point<int>& delta) | |||||
| { | { | ||||
| edgeTable.translate ((float) delta.getX(), delta.getY()); | edgeTable.translate ((float) delta.getX(), delta.getY()); | ||||
| return edgeTable.isEmpty() ? nullptr : this; | return edgeTable.isEmpty() ? nullptr : this; | ||||
| @@ -1328,7 +1328,7 @@ public: | |||||
| return edgeTable.getMaximumBounds().intersects (r); | return edgeTable.getMaximumBounds().intersects (r); | ||||
| } | } | ||||
| const Rectangle<int> getClipBounds() const | |||||
| Rectangle<int> getClipBounds() const | |||||
| { | { | ||||
| return edgeTable.getMaximumBounds(); | return edgeTable.getMaximumBounds(); | ||||
| } | } | ||||
| @@ -1431,50 +1431,50 @@ public: | |||||
| ClipRegion_RectangleList (const RectangleList& r) : clip (r) {} | ClipRegion_RectangleList (const RectangleList& r) : clip (r) {} | ||||
| ClipRegion_RectangleList (const ClipRegion_RectangleList& other) : clip (other.clip) {} | ClipRegion_RectangleList (const ClipRegion_RectangleList& other) : clip (other.clip) {} | ||||
| const Ptr clone() const | |||||
| Ptr clone() const | |||||
| { | { | ||||
| return new ClipRegion_RectangleList (*this); | return new ClipRegion_RectangleList (*this); | ||||
| } | } | ||||
| const Ptr applyClipTo (const Ptr& target) const | |||||
| Ptr applyClipTo (const Ptr& target) const | |||||
| { | { | ||||
| return target->clipToRectangleList (clip); | return target->clipToRectangleList (clip); | ||||
| } | } | ||||
| const Ptr clipToRectangle (const Rectangle<int>& r) | |||||
| Ptr clipToRectangle (const Rectangle<int>& r) | |||||
| { | { | ||||
| clip.clipTo (r); | clip.clipTo (r); | ||||
| return clip.isEmpty() ? nullptr : this; | return clip.isEmpty() ? nullptr : this; | ||||
| } | } | ||||
| const Ptr clipToRectangleList (const RectangleList& r) | |||||
| Ptr clipToRectangleList (const RectangleList& r) | |||||
| { | { | ||||
| clip.clipTo (r); | clip.clipTo (r); | ||||
| return clip.isEmpty() ? nullptr : this; | return clip.isEmpty() ? nullptr : this; | ||||
| } | } | ||||
| const Ptr excludeClipRectangle (const Rectangle<int>& r) | |||||
| Ptr excludeClipRectangle (const Rectangle<int>& r) | |||||
| { | { | ||||
| clip.subtract (r); | clip.subtract (r); | ||||
| return clip.isEmpty() ? nullptr : this; | 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); | 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); | 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); | return Ptr (new ClipRegion_EdgeTable (clip))->clipToImageAlpha (image, transform, betterQuality); | ||||
| } | } | ||||
| const Ptr translated (const Point<int>& delta) | |||||
| Ptr translated (const Point<int>& delta) | |||||
| { | { | ||||
| clip.offsetAll (delta.getX(), delta.getY()); | clip.offsetAll (delta.getX(), delta.getY()); | ||||
| return clip.isEmpty() ? nullptr : this; | return clip.isEmpty() ? nullptr : this; | ||||
| @@ -1485,7 +1485,7 @@ public: | |||||
| return clip.intersects (r); | return clip.intersects (r); | ||||
| } | } | ||||
| const Rectangle<int> getClipBounds() const | |||||
| Rectangle<int> getClipBounds() const | |||||
| { | { | ||||
| return clip.getBounds(); | return clip.getBounds(); | ||||
| } | } | ||||
| @@ -1934,12 +1934,12 @@ public: | |||||
| return false; | return false; | ||||
| } | } | ||||
| const Rectangle<int> getUntransformedClipBounds() const | |||||
| Rectangle<int> getUntransformedClipBounds() const | |||||
| { | { | ||||
| return clip != nullptr ? clip->getClipBounds() : Rectangle<int>(); | return clip != nullptr ? clip->getClipBounds() : Rectangle<int>(); | ||||
| } | } | ||||
| const Rectangle<int> getClipBounds() const | |||||
| Rectangle<int> getClipBounds() const | |||||
| { | { | ||||
| if (clip != nullptr) | if (clip != nullptr) | ||||
| { | { | ||||
| @@ -230,7 +230,7 @@ Drawable::ValueTreeWrapperBase::ValueTreeWrapperBase (const ValueTree& state_) | |||||
| { | { | ||||
| } | } | ||||
| const String Drawable::ValueTreeWrapperBase::getID() const | |||||
| String Drawable::ValueTreeWrapperBase::getID() const | |||||
| { | { | ||||
| return state [ComponentBuilder::idProperty]; | return state [ComponentBuilder::idProperty]; | ||||
| } | } | ||||
| @@ -172,13 +172,13 @@ public: | |||||
| If there are any images used in this drawable, you'll need to provide a valid ImageProvider | 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. | 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. | /** Returns the area that this drawble covers. | ||||
| The result is expressed in this drawable's own coordinate space, and does not take | 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. | into account any transforms that may be applied to the component. | ||||
| */ | */ | ||||
| virtual const Rectangle<float> getDrawableBounds() const = 0; | |||||
| virtual Rectangle<float> getDrawableBounds() const = 0; | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Internal class used to manage ValueTrees that represent Drawables. */ | /** Internal class used to manage ValueTrees that represent Drawables. */ | ||||
| @@ -189,7 +189,7 @@ public: | |||||
| ValueTree& getState() noexcept { return state; } | ValueTree& getState() noexcept { return state; } | ||||
| const String getID() const; | |||||
| String getID() const; | |||||
| void setID (const String& newID); | void setID (const String& newID); | ||||
| ValueTree state; | ValueTree state; | ||||
| @@ -68,7 +68,7 @@ Drawable* DrawableComposite::createCopy() const | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| const Rectangle<float> DrawableComposite::getDrawableBounds() const | |||||
| Rectangle<float> DrawableComposite::getDrawableBounds() const | |||||
| { | { | ||||
| Rectangle<float> r; | Rectangle<float> r; | ||||
| @@ -89,7 +89,7 @@ MarkerList* DrawableComposite::getMarkers (bool xAxis) | |||||
| return xAxis ? &markersX : &markersY; | 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 (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); | jassert (markersY.getNumMarkers() >= 2 && markersY.getMarker (0)->name == contentTopMarkerName && markersY.getMarker (1)->name == contentBottomMarkerName); | ||||
| @@ -254,7 +254,7 @@ ValueTree DrawableComposite::ValueTreeWrapper::getChildListCreating (UndoManager | |||||
| return state.getOrCreateChildWithName (childGroupTag, undoManager); | return state.getOrCreateChildWithName (childGroupTag, undoManager); | ||||
| } | } | ||||
| const RelativeParallelogram DrawableComposite::ValueTreeWrapper::getBoundingBox() const | |||||
| RelativeParallelogram DrawableComposite::ValueTreeWrapper::getBoundingBox() const | |||||
| { | { | ||||
| return RelativeParallelogram (state.getProperty (topLeft, "0, 0"), | return RelativeParallelogram (state.getProperty (topLeft, "0, 0"), | ||||
| state.getProperty (topRight, "100, 0"), | state.getProperty (topRight, "100, 0"), | ||||
| @@ -277,7 +277,7 @@ void DrawableComposite::ValueTreeWrapper::resetBoundingBoxToContentArea (UndoMan | |||||
| RelativePoint (content.left, content.bottom)), undoManager); | RelativePoint (content.left, content.bottom)), undoManager); | ||||
| } | } | ||||
| const RelativeRectangle DrawableComposite::ValueTreeWrapper::getContentArea() const | |||||
| RelativeRectangle DrawableComposite::ValueTreeWrapper::getContentArea() const | |||||
| { | { | ||||
| MarkerList::ValueTreeWrapper markersX (getMarkerList (true)); | MarkerList::ValueTreeWrapper markersX (getMarkerList (true)); | ||||
| MarkerList::ValueTreeWrapper markersY (getMarkerList (false)); | MarkerList::ValueTreeWrapper markersY (getMarkerList (false)); | ||||
| @@ -323,7 +323,7 @@ void DrawableComposite::refreshFromValueTree (const ValueTree& tree, ComponentBu | |||||
| builder.updateChildComponents (*this, wrapper.getChildList()); | builder.updateChildComponents (*this, wrapper.getChildList()); | ||||
| } | } | ||||
| const ValueTree DrawableComposite::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const | |||||
| ValueTree DrawableComposite::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const | |||||
| { | { | ||||
| ValueTree tree (valueTreeType); | ValueTree tree (valueTreeType); | ||||
| ValueTreeWrapper v (tree); | ValueTreeWrapper v (tree); | ||||
| @@ -72,7 +72,7 @@ public: | |||||
| "bottom", but this method is a shortcut that returns them all at once. | "bottom", but this method is a shortcut that returns them all at once. | ||||
| @see contentLeftMarkerName, contentRightMarkerName, contentTopMarkerName, contentBottomMarkerName | @see contentLeftMarkerName, contentRightMarkerName, contentTopMarkerName, contentBottomMarkerName | ||||
| */ | */ | ||||
| const RelativeRectangle getContentArea() const; | |||||
| RelativeRectangle getContentArea() const; | |||||
| /** Changes the main content area. | /** Changes the main content area. | ||||
| The content area is actually defined by the markers named "left", "right", "top" and | The content area is actually defined by the markers named "left", "right", "top" and | ||||
| @@ -102,11 +102,11 @@ public: | |||||
| /** @internal */ | /** @internal */ | ||||
| void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); | void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); | ||||
| /** @internal */ | /** @internal */ | ||||
| const ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; | |||||
| ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; | |||||
| /** @internal */ | /** @internal */ | ||||
| static const Identifier valueTreeType; | static const Identifier valueTreeType; | ||||
| /** @internal */ | /** @internal */ | ||||
| const Rectangle<float> getDrawableBounds() const; | |||||
| Rectangle<float> getDrawableBounds() const; | |||||
| /** @internal */ | /** @internal */ | ||||
| void childBoundsChanged (Component*); | void childBoundsChanged (Component*); | ||||
| /** @internal */ | /** @internal */ | ||||
| @@ -126,11 +126,11 @@ public: | |||||
| ValueTree getChildList() const; | ValueTree getChildList() const; | ||||
| ValueTree getChildListCreating (UndoManager* undoManager); | ValueTree getChildListCreating (UndoManager* undoManager); | ||||
| const RelativeParallelogram getBoundingBox() const; | |||||
| RelativeParallelogram getBoundingBox() const; | |||||
| void setBoundingBox (const RelativeParallelogram& newBounds, UndoManager* undoManager); | void setBoundingBox (const RelativeParallelogram& newBounds, UndoManager* undoManager); | ||||
| void resetBoundingBoxToContentArea (UndoManager* undoManager); | void resetBoundingBoxToContentArea (UndoManager* undoManager); | ||||
| const RelativeRectangle getContentArea() const; | |||||
| RelativeRectangle getContentArea() const; | |||||
| void setContentArea (const RelativeRectangle& newArea, UndoManager* undoManager); | void setContentArea (const RelativeRectangle& newArea, UndoManager* undoManager); | ||||
| MarkerList::ValueTreeWrapper getMarkerList (bool xAxis) const; | MarkerList::ValueTreeWrapper getMarkerList (bool xAxis) const; | ||||
| @@ -145,7 +145,7 @@ void DrawableImage::paint (Graphics& g) | |||||
| } | } | ||||
| } | } | ||||
| const Rectangle<float> DrawableImage::getDrawableBounds() const | |||||
| Rectangle<float> DrawableImage::getDrawableBounds() const | |||||
| { | { | ||||
| return image.getBounds().toFloat(); | return image.getBounds().toFloat(); | ||||
| } | } | ||||
| @@ -177,7 +177,7 @@ DrawableImage::ValueTreeWrapper::ValueTreeWrapper (const ValueTree& state_) | |||||
| jassert (state.hasType (valueTreeType)); | jassert (state.hasType (valueTreeType)); | ||||
| } | } | ||||
| const var DrawableImage::ValueTreeWrapper::getImageIdentifier() const | |||||
| var DrawableImage::ValueTreeWrapper::getImageIdentifier() const | |||||
| { | { | ||||
| return state [image]; | return state [image]; | ||||
| } | } | ||||
| @@ -228,7 +228,7 @@ Value DrawableImage::ValueTreeWrapper::getOverlayColourValue (UndoManager* undoM | |||||
| return state.getPropertyAsValue (overlay, undoManager); | return state.getPropertyAsValue (overlay, undoManager); | ||||
| } | } | ||||
| const RelativeParallelogram DrawableImage::ValueTreeWrapper::getBoundingBox() const | |||||
| RelativeParallelogram DrawableImage::ValueTreeWrapper::getBoundingBox() const | |||||
| { | { | ||||
| return RelativeParallelogram (state.getProperty (topLeft, "0, 0"), | return RelativeParallelogram (state.getProperty (topLeft, "0, 0"), | ||||
| state.getProperty (topRight, "100, 0"), | state.getProperty (topRight, "100, 0"), | ||||
| @@ -277,7 +277,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); | ValueTree tree (valueTreeType); | ||||
| ValueTreeWrapper v (tree); | ValueTreeWrapper v (tree); | ||||
| @@ -52,7 +52,7 @@ public: | |||||
| void setImage (const Image& imageToUse); | void setImage (const Image& imageToUse); | ||||
| /** Returns the current image. */ | /** 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. */ | /** Sets the opacity to use when drawing the image. */ | ||||
| void setOpacity (float newOpacity); | void setOpacity (float newOpacity); | ||||
| @@ -91,11 +91,11 @@ public: | |||||
| /** @internal */ | /** @internal */ | ||||
| Drawable* createCopy() const; | Drawable* createCopy() const; | ||||
| /** @internal */ | /** @internal */ | ||||
| const Rectangle<float> getDrawableBounds() const; | |||||
| Rectangle<float> getDrawableBounds() const; | |||||
| /** @internal */ | /** @internal */ | ||||
| void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); | void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); | ||||
| /** @internal */ | /** @internal */ | ||||
| const ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; | |||||
| ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; | |||||
| /** @internal */ | /** @internal */ | ||||
| static const Identifier valueTreeType; | static const Identifier valueTreeType; | ||||
| @@ -106,7 +106,7 @@ public: | |||||
| public: | public: | ||||
| ValueTreeWrapper (const ValueTree& state); | ValueTreeWrapper (const ValueTree& state); | ||||
| const var getImageIdentifier() const; | |||||
| var getImageIdentifier() const; | |||||
| void setImageIdentifier (const var& newIdentifier, UndoManager* undoManager); | void setImageIdentifier (const var& newIdentifier, UndoManager* undoManager); | ||||
| Value getImageIdentifierValue (UndoManager* undoManager); | Value getImageIdentifierValue (UndoManager* undoManager); | ||||
| @@ -118,7 +118,7 @@ public: | |||||
| void setOverlayColour (const Colour& newColour, UndoManager* undoManager); | void setOverlayColour (const Colour& newColour, UndoManager* undoManager); | ||||
| Value getOverlayColourValue (UndoManager* undoManager); | Value getOverlayColourValue (UndoManager* undoManager); | ||||
| const RelativeParallelogram getBoundingBox() const; | |||||
| RelativeParallelogram getBoundingBox() const; | |||||
| void setBoundingBox (const RelativeParallelogram& newBounds, UndoManager* undoManager); | void setBoundingBox (const RelativeParallelogram& newBounds, UndoManager* undoManager); | ||||
| static const Identifier opacity, overlay, image, topLeft, topRight, bottomLeft; | static const Identifier opacity, overlay, image, topLeft, topRight, bottomLeft; | ||||
| @@ -264,7 +264,7 @@ int DrawablePath::ValueTreeWrapper::Element::getNumControlPoints() const noexcep | |||||
| return 0; | 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()); | jassert (index >= 0 && index < getNumControlPoints()); | ||||
| return RelativePoint (state [index == 0 ? point1 : (index == 1 ? point2 : point3)].toString()); | return RelativePoint (state [index == 0 ? point1 : (index == 1 ? point2 : point3)].toString()); | ||||
| @@ -282,7 +282,7 @@ void DrawablePath::ValueTreeWrapper::Element::setControlPoint (const int index, | |||||
| state.setProperty (index == 0 ? point1 : (index == 1 ? point2 : point3), point.toString(), undoManager); | 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()); | const Identifier i (state.getType()); | ||||
| @@ -294,7 +294,7 @@ const RelativePoint DrawablePath::ValueTreeWrapper::Element::getStartPoint() con | |||||
| return getPreviousElement().getEndPoint(); | return getPreviousElement().getEndPoint(); | ||||
| } | } | ||||
| const RelativePoint DrawablePath::ValueTreeWrapper::Element::getEndPoint() const | |||||
| RelativePoint DrawablePath::ValueTreeWrapper::Element::getEndPoint() const | |||||
| { | { | ||||
| const Identifier i (state.getType()); | const Identifier i (state.getType()); | ||||
| if (i == startSubPathElement || i == lineToElement) return getControlPoint (0); | if (i == startSubPathElement || i == lineToElement) return getControlPoint (0); | ||||
| @@ -332,7 +332,7 @@ float DrawablePath::ValueTreeWrapper::Element::getLength (Expression::Scope* sco | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| const String DrawablePath::ValueTreeWrapper::Element::getModeOfEndPoint() const | |||||
| String DrawablePath::ValueTreeWrapper::Element::getModeOfEndPoint() const | |||||
| { | { | ||||
| return state [mode].toString(); | return state [mode].toString(); | ||||
| } | } | ||||
| @@ -392,7 +392,7 @@ void DrawablePath::ValueTreeWrapper::Element::convertToPathBreak (UndoManager* u | |||||
| namespace DrawablePathHelpers | namespace DrawablePathHelpers | ||||
| { | { | ||||
| const Point<float> findCubicSubdivisionPoint (float proportion, const Point<float> points[4]) | |||||
| Point<float> findCubicSubdivisionPoint (float proportion, const Point<float> points[4]) | |||||
| { | { | ||||
| const Point<float> mid1 (points[0] + (points[1] - points[0]) * proportion), | const Point<float> mid1 (points[0] + (points[1] - points[0]) * proportion), | ||||
| mid2 (points[1] + (points[2] - points[1]) * proportion), | mid2 (points[1] + (points[2] - points[1]) * proportion), | ||||
| @@ -404,7 +404,7 @@ namespace DrawablePathHelpers | |||||
| return newCp1 + (newCp2 - newCp1) * proportion; | return newCp1 + (newCp2 - newCp1) * proportion; | ||||
| } | } | ||||
| const Point<float> findQuadraticSubdivisionPoint (float proportion, const Point<float> points[3]) | |||||
| Point<float> findQuadraticSubdivisionPoint (float proportion, const Point<float> points[3]) | |||||
| { | { | ||||
| const Point<float> mid1 (points[0] + (points[1] - points[0]) * proportion), | const Point<float> mid1 (points[0] + (points[1] - points[0]) * proportion), | ||||
| mid2 (points[1] + (points[2] - points[1]) * proportion); | mid2 (points[1] + (points[2] - points[1]) * proportion); | ||||
| @@ -564,7 +564,7 @@ void DrawablePath::refreshFromValueTree (const ValueTree& tree, ComponentBuilder | |||||
| setPath (newRelativePath); | setPath (newRelativePath); | ||||
| } | } | ||||
| const ValueTree DrawablePath::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const | |||||
| ValueTree DrawablePath::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const | |||||
| { | { | ||||
| ValueTree tree (valueTreeType); | ValueTree tree (valueTreeType); | ||||
| ValueTreeWrapper v (tree); | ValueTreeWrapper v (tree); | ||||
| @@ -73,7 +73,7 @@ public: | |||||
| /** @internal */ | /** @internal */ | ||||
| void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); | void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); | ||||
| /** @internal */ | /** @internal */ | ||||
| const ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; | |||||
| ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; | |||||
| /** @internal */ | /** @internal */ | ||||
| static const Identifier valueTreeType; | static const Identifier valueTreeType; | ||||
| @@ -96,17 +96,17 @@ public: | |||||
| const Identifier getType() const noexcept { return state.getType(); } | const Identifier getType() const noexcept { return state.getType(); } | ||||
| int getNumControlPoints() const noexcept; | int getNumControlPoints() const noexcept; | ||||
| const RelativePoint getControlPoint (int index) const; | |||||
| RelativePoint getControlPoint (int index) const; | |||||
| Value getControlPointValue (int index, UndoManager*) 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*); | void setControlPoint (int index, const RelativePoint& point, UndoManager*); | ||||
| float getLength (Expression::Scope*) const; | float getLength (Expression::Scope*) const; | ||||
| ValueTreeWrapper getParent() const; | ValueTreeWrapper getParent() const; | ||||
| Element getPreviousElement() const; | Element getPreviousElement() const; | ||||
| const String getModeOfEndPoint() const; | |||||
| String getModeOfEndPoint() const; | |||||
| void setModeOfEndPoint (const String& newMode, UndoManager*); | void setModeOfEndPoint (const String& newMode, UndoManager*); | ||||
| void convertToLine (UndoManager*); | void convertToLine (UndoManager*); | ||||
| @@ -138,7 +138,7 @@ DrawableRectangle::ValueTreeWrapper::ValueTreeWrapper (const ValueTree& state_) | |||||
| jassert (state.hasType (valueTreeType)); | jassert (state.hasType (valueTreeType)); | ||||
| } | } | ||||
| const RelativeParallelogram DrawableRectangle::ValueTreeWrapper::getRectangle() const | |||||
| RelativeParallelogram DrawableRectangle::ValueTreeWrapper::getRectangle() const | |||||
| { | { | ||||
| return RelativeParallelogram (state.getProperty (topLeft, "0, 0"), | return RelativeParallelogram (state.getProperty (topLeft, "0, 0"), | ||||
| state.getProperty (topRight, "100, 0"), | state.getProperty (topRight, "100, 0"), | ||||
| @@ -157,7 +157,7 @@ void DrawableRectangle::ValueTreeWrapper::setCornerSize (const RelativePoint& ne | |||||
| state.setProperty (cornerSize, newSize.toString(), undoManager); | state.setProperty (cornerSize, newSize.toString(), undoManager); | ||||
| } | } | ||||
| const RelativePoint DrawableRectangle::ValueTreeWrapper::getCornerSize() const | |||||
| RelativePoint DrawableRectangle::ValueTreeWrapper::getCornerSize() const | |||||
| { | { | ||||
| return RelativePoint (state [cornerSize]); | return RelativePoint (state [cornerSize]); | ||||
| } | } | ||||
| @@ -179,7 +179,7 @@ void DrawableRectangle::refreshFromValueTree (const ValueTree& tree, ComponentBu | |||||
| setCornerSize (v.getCornerSize()); | setCornerSize (v.getCornerSize()); | ||||
| } | } | ||||
| const ValueTree DrawableRectangle::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const | |||||
| ValueTree DrawableRectangle::createValueTree (ComponentBuilder::ImageProvider* imageProvider) const | |||||
| { | { | ||||
| ValueTree tree (valueTreeType); | ValueTree tree (valueTreeType); | ||||
| ValueTreeWrapper v (tree); | ValueTreeWrapper v (tree); | ||||
| @@ -56,7 +56,7 @@ public: | |||||
| const RelativeParallelogram& getRectangle() const noexcept { return bounds; } | const RelativeParallelogram& getRectangle() const noexcept { return bounds; } | ||||
| /** Returns the corner size to be used. */ | /** 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 */ | /** Sets a new corner size for the rectangle */ | ||||
| void setCornerSize (const RelativePoint& newSize); | void setCornerSize (const RelativePoint& newSize); | ||||
| @@ -67,7 +67,7 @@ public: | |||||
| /** @internal */ | /** @internal */ | ||||
| void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); | void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); | ||||
| /** @internal */ | /** @internal */ | ||||
| const ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; | |||||
| ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; | |||||
| /** @internal */ | /** @internal */ | ||||
| static const Identifier valueTreeType; | static const Identifier valueTreeType; | ||||
| @@ -78,11 +78,11 @@ public: | |||||
| public: | public: | ||||
| ValueTreeWrapper (const ValueTree& state); | ValueTreeWrapper (const ValueTree& state); | ||||
| const RelativeParallelogram getRectangle() const; | |||||
| RelativeParallelogram getRectangle() const; | |||||
| void setRectangle (const RelativeParallelogram& newBounds, UndoManager*); | void setRectangle (const RelativeParallelogram& newBounds, UndoManager*); | ||||
| void setCornerSize (const RelativePoint& cornerSize, UndoManager*); | void setCornerSize (const RelativePoint& cornerSize, UndoManager*); | ||||
| const RelativePoint getCornerSize() const; | |||||
| RelativePoint getCornerSize() const; | |||||
| Value getCornerSizeValue (UndoManager*) const; | Value getCornerSizeValue (UndoManager*) const; | ||||
| static const Identifier topLeft, topRight, bottomLeft, cornerSize; | static const Identifier topLeft, topRight, bottomLeft, cornerSize; | ||||
| @@ -193,7 +193,7 @@ void DrawableShape::strokeChanged() | |||||
| repaint(); | repaint(); | ||||
| } | } | ||||
| const Rectangle<float> DrawableShape::getDrawableBounds() const | |||||
| Rectangle<float> DrawableShape::getDrawableBounds() const | |||||
| { | { | ||||
| if (isStrokeVisible()) | if (isStrokeVisible()) | ||||
| return strokePath.getBounds(); | return strokePath.getBounds(); | ||||
| @@ -415,7 +415,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; | DrawableShape::RelativeFillType f; | ||||
| f.readFrom (state.getChildWithName (fillOrStrokeType), imageProvider); | f.readFrom (state.getChildWithName (fillOrStrokeType), imageProvider); | ||||
| @@ -439,7 +439,7 @@ void DrawableShape::FillAndStrokeState::setFill (const Identifier& fillOrStrokeT | |||||
| newFill.writeTo (v, imageProvider, undoManager); | newFill.writeTo (v, imageProvider, undoManager); | ||||
| } | } | ||||
| const PathStrokeType DrawableShape::FillAndStrokeState::getStrokeType() const | |||||
| PathStrokeType DrawableShape::FillAndStrokeState::getStrokeType() const | |||||
| { | { | ||||
| const String jointStyleString (state [jointStyle].toString()); | const String jointStyleString (state [jointStyle].toString()); | ||||
| const String capStyleString (state [capStyle].toString()); | const String capStyleString (state [capStyle].toString()); | ||||
| @@ -136,11 +136,11 @@ public: | |||||
| FillAndStrokeState (const ValueTree& state); | FillAndStrokeState (const ValueTree& state); | ||||
| ValueTree getFillState (const Identifier& fillOrStrokeType); | 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, | void setFill (const Identifier& fillOrStrokeType, const RelativeFillType& newFill, | ||||
| ComponentBuilder::ImageProvider*, UndoManager*); | ComponentBuilder::ImageProvider*, UndoManager*); | ||||
| const PathStrokeType getStrokeType() const; | |||||
| PathStrokeType getStrokeType() const; | |||||
| void setStrokeType (const PathStrokeType& newStrokeType, UndoManager*); | void setStrokeType (const PathStrokeType& newStrokeType, UndoManager*); | ||||
| static const Identifier type, colour, colours, fill, stroke, path, jointStyle, capStyle, strokeWidth, | static const Identifier type, colour, colours, fill, stroke, path, jointStyle, capStyle, strokeWidth, | ||||
| @@ -148,7 +148,7 @@ public: | |||||
| }; | }; | ||||
| /** @internal */ | /** @internal */ | ||||
| const Rectangle<float> getDrawableBounds() const; | |||||
| Rectangle<float> getDrawableBounds() const; | |||||
| /** @internal */ | /** @internal */ | ||||
| void paint (Graphics& g); | void paint (Graphics& g); | ||||
| /** @internal */ | /** @internal */ | ||||
| @@ -181,7 +181,7 @@ void DrawableText::paint (Graphics& g) | |||||
| ga.draw (g, transform); | ga.draw (g, transform); | ||||
| } | } | ||||
| const Rectangle<float> DrawableText::getDrawableBounds() const | |||||
| Rectangle<float> DrawableText::getDrawableBounds() const | |||||
| { | { | ||||
| return RelativeParallelogram::getBoundingBox (resolvedPoints); | return RelativeParallelogram::getBoundingBox (resolvedPoints); | ||||
| } | } | ||||
| @@ -307,7 +307,7 @@ void DrawableText::refreshFromValueTree (const ValueTree& tree, ComponentBuilder | |||||
| } | } | ||||
| } | } | ||||
| const ValueTree DrawableText::createValueTree (ComponentBuilder::ImageProvider*) const | |||||
| ValueTree DrawableText::createValueTree (ComponentBuilder::ImageProvider*) const | |||||
| { | { | ||||
| ValueTree tree (valueTreeType); | ValueTree tree (valueTreeType); | ||||
| ValueTreeWrapper v (tree); | ValueTreeWrapper v (tree); | ||||