|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
Manages a list of plugin types. More...
#include "juce_KnownPluginList.h"
Classes | |
| class | CustomScanner |
| Class to define a custom plugin scanner. More... | |
| struct | PluginTree |
| A structure that recursively holds a tree of plugins. More... | |
Public Types | |
| enum | SortMethod { defaultOrder , sortAlphabetically , sortByCategory , sortByManufacturer , sortByFormat , sortByFileSystemLocation , sortByInfoUpdateTime } |
| Sort methods used to change the order of the plugins in the list. More... | |
Public Member Functions | |
| KnownPluginList () | |
| Creates an empty list. | |
| ~KnownPluginList () override | |
| Destructor. | |
| void | clear () |
| Clears the list. | |
| bool | addType (const PluginDescription &type) |
| Adds a type manually from its description. | |
| void | removeType (const PluginDescription &type) |
| Removes a type. | |
| int | getNumTypes () const noexcept |
| Returns the number of types currently in the list. | |
| Array< PluginDescription > | getTypes () const |
| Returns a copy of the current list. | |
| Array< PluginDescription > | getTypesForFormat (AudioPluginFormat &) const |
| Returns the subset of plugin types for a given format. | |
| std::unique_ptr< PluginDescription > | getTypeForFile (const String &fileOrIdentifier) const |
| Looks for a type in the list which comes from this file. | |
| std::unique_ptr< PluginDescription > | getTypeForIdentifierString (const String &identifierString) const |
| Looks for a type in the list which matches a plugin type ID. | |
| bool | scanAndAddFile (const String &possiblePluginFileOrIdentifier, bool dontRescanIfAlreadyInList, OwnedArray< PluginDescription > &typesFound, AudioPluginFormat &formatToUse) |
| Looks for all types that can be loaded from a given file, and adds them to the list. | |
| void | scanFinished () |
| Tells a custom scanner that a scan has finished, and it can release any resources. | |
| bool | isListingUpToDate (const String &possiblePluginFileOrIdentifier, AudioPluginFormat &formatToUse) const |
| Returns true if the specified file is already known about and if it hasn't been modified since our entry was created. | |
| void | scanAndAddDragAndDroppedFiles (AudioPluginFormatManager &formatManager, const StringArray &filenames, OwnedArray< PluginDescription > &typesFound) |
| Scans and adds a bunch of files that might have been dragged-and-dropped. | |
| const StringArray & | getBlacklistedFiles () const |
| Returns the list of blacklisted files. | |
| void | addToBlacklist (const String &pluginID) |
| Adds a plugin ID to the black-list. | |
| void | removeFromBlacklist (const String &pluginID) |
| Removes a plugin ID from the black-list. | |
| void | clearBlacklistedFiles () |
| Clears all the blacklisted files. | |
| void | sort (SortMethod method, bool forwards) |
| Sorts the list. | |
| std::unique_ptr< XmlElement > | createXml () const |
| Creates some XML that can be used to store the state of this list. | |
| void | recreateFromXml (const XmlElement &xml) |
| Recreates the state of this list from its stored XML format. | |
| void | setCustomScanner (std::unique_ptr< CustomScanner > newScanner) |
| Supplies a custom scanner to be used in future scans. | |
Public Member Functions inherited from juce::ChangeBroadcaster | |
| ChangeBroadcaster () noexcept | |
| Creates an ChangeBroadcaster. | |
| virtual | ~ChangeBroadcaster () |
| Destructor. | |
| void | addChangeListener (ChangeListener *listener) |
| Registers a listener to receive change callbacks from this broadcaster. | |
| void | removeChangeListener (ChangeListener *listener) |
| Unregisters a listener from the list. | |
| void | removeAllChangeListeners () |
| Removes all listeners from the list. | |
| void | sendChangeMessage () |
| Causes an asynchronous change message to be sent to all the registered listeners. | |
| void | sendSynchronousChangeMessage () |
| Sends a synchronous change message to all the registered listeners. | |
| void | dispatchPendingMessages () |
| If a change message has been sent but not yet dispatched, this will call sendSynchronousChangeMessage() to make the callback immediately. | |
Static Public Member Functions | |
| static void | addToMenu (PopupMenu &menu, const Array< PluginDescription > &types, SortMethod sortMethod, const String ¤tlyTickedPluginID={}) |
| Adds the plug-in types to a popup menu so that the user can select one. | |
| static int | getIndexChosenByMenu (const Array< PluginDescription > &types, int menuResultCode) |
| Converts a menu item index that has been chosen into its index in the list. | |
| static std::unique_ptr< PluginTree > | createTree (const Array< PluginDescription > &types, SortMethod sortMethod) |
| Creates a PluginTree object representing the list of plug-ins. | |
Manages a list of plugin types.
This can be easily edited, saved and loaded, and used to create instances of the plugin types in it.
@tags{Audio}
Definition at line 40 of file juce_KnownPluginList.h.
| struct juce::KnownPluginList::PluginTree |
A structure that recursively holds a tree of plugins.
Definition at line 171 of file juce_KnownPluginList.h.
| Class Members | ||
|---|---|---|
| String | folder | The name of this folder in the tree. |
| Array< PluginDescription > | plugins | |
| OwnedArray< PluginTree > | subFolders | |
Sort methods used to change the order of the plugins in the list.
Definition at line 128 of file juce_KnownPluginList.h.
| juce::KnownPluginList::KnownPluginList | ( | ) |
Creates an empty list.
Definition at line 29 of file juce_KnownPluginList.cpp.
|
override |
Destructor.
Definition at line 30 of file juce_KnownPluginList.cpp.
Adds a plugin ID to the black-list.
Definition at line 258 of file juce_KnownPluginList.cpp.
|
static |
Adds the plug-in types to a popup menu so that the user can select one.
Depending on the sort method, it may add sub-menus for categories, manufacturers, etc.
Use getIndexChosenByMenu() to find out the type that was chosen.
Definition at line 598 of file juce_KnownPluginList.cpp.
| bool juce::KnownPluginList::addType | ( | const PluginDescription & | type | ) |
Adds a type manually from its description.
Definition at line 88 of file juce_KnownPluginList.cpp.
| void juce::KnownPluginList::clear | ( | ) |
Clears the list.
Definition at line 32 of file juce_KnownPluginList.cpp.
| void juce::KnownPluginList::clearBlacklistedFiles | ( | ) |
Clears all the blacklisted files.
Definition at line 278 of file juce_KnownPluginList.cpp.
|
static |
Creates a PluginTree object representing the list of plug-ins.
Definition at line 571 of file juce_KnownPluginList.cpp.
| std::unique_ptr< XmlElement > juce::KnownPluginList::createXml | ( | ) | const |
Creates some XML that can be used to store the state of this list.
Definition at line 362 of file juce_KnownPluginList.cpp.
| const StringArray & juce::KnownPluginList::getBlacklistedFiles | ( | ) | const |
Returns the list of blacklisted files.
Definition at line 253 of file juce_KnownPluginList.cpp.
|
static |
Converts a menu item index that has been chosen into its index in the list.
Returns -1 if it's not an ID that was used.
Definition at line 605 of file juce_KnownPluginList.cpp.
|
noexcept |
Returns the number of types currently in the list.
Definition at line 43 of file juce_KnownPluginList.cpp.
| std::unique_ptr< PluginDescription > juce::KnownPluginList::getTypeForFile | ( | const String & | fileOrIdentifier | ) | const |
Looks for a type in the list which comes from this file.
Definition at line 66 of file juce_KnownPluginList.cpp.
| std::unique_ptr< PluginDescription > juce::KnownPluginList::getTypeForIdentifierString | ( | const String & | identifierString | ) | const |
Looks for a type in the list which matches a plugin type ID.
The identifierString parameter must have been created by PluginDescription::createIdentifierString().
Definition at line 77 of file juce_KnownPluginList.cpp.
| Array< PluginDescription > juce::KnownPluginList::getTypes | ( | ) | const |
Returns a copy of the current list.
Definition at line 49 of file juce_KnownPluginList.cpp.
| Array< PluginDescription > juce::KnownPluginList::getTypesForFormat | ( | AudioPluginFormat & | format | ) | const |
Returns the subset of plugin types for a given format.
Definition at line 55 of file juce_KnownPluginList.cpp.
| bool juce::KnownPluginList::isListingUpToDate | ( | const String & | possiblePluginFileOrIdentifier, |
| AudioPluginFormat & | formatToUse | ||
| ) | const |
Returns true if the specified file is already known about and if it hasn't been modified since our entry was created.
Definition at line 126 of file juce_KnownPluginList.cpp.
| void juce::KnownPluginList::recreateFromXml | ( | const XmlElement & | xml | ) |
Recreates the state of this list from its stored XML format.
Definition at line 379 of file juce_KnownPluginList.cpp.
Removes a plugin ID from the black-list.
Definition at line 267 of file juce_KnownPluginList.cpp.
| void juce::KnownPluginList::removeType | ( | const PluginDescription & | type | ) |
Removes a type.
Definition at line 113 of file juce_KnownPluginList.cpp.
| void juce::KnownPluginList::scanAndAddDragAndDroppedFiles | ( | AudioPluginFormatManager & | formatManager, |
| const StringArray & | filenames, | ||
| OwnedArray< PluginDescription > & | typesFound | ||
| ) |
Scans and adds a bunch of files that might have been dragged-and-dropped.
If any types are found in the files, their descriptions are returned in the array.
Definition at line 210 of file juce_KnownPluginList.cpp.
| bool juce::KnownPluginList::scanAndAddFile | ( | const String & | possiblePluginFileOrIdentifier, |
| bool | dontRescanIfAlreadyInList, | ||
| OwnedArray< PluginDescription > & | typesFound, | ||
| AudioPluginFormat & | formatToUse | ||
| ) |
Looks for all types that can be loaded from a given file, and adds them to the list.
If dontRescanIfAlreadyInList is true, then the file will only be loaded and re-tested if it's not already in the list, or if the file's modification time has changed since the list was created. If dontRescanIfAlreadyInList is false, the file will always be reloaded and tested.
Returns true if any new types were added, and all the types found in this file (even if it was already known and hasn't been re-scanned) get returned in the array.
Definition at line 147 of file juce_KnownPluginList.cpp.
| void juce::KnownPluginList::scanFinished | ( | ) |
Tells a custom scanner that a scan has finished, and it can release any resources.
Definition at line 247 of file juce_KnownPluginList.cpp.
| void juce::KnownPluginList::setCustomScanner | ( | std::unique_ptr< CustomScanner > | newScanner | ) |
Supplies a custom scanner to be used in future scans.
The KnownPluginList will take ownership of the object passed in.
Definition at line 141 of file juce_KnownPluginList.cpp.
| void juce::KnownPluginList::sort | ( | SortMethod | method, |
| bool | forwards | ||
| ) |
Sorts the list.
Definition at line 333 of file juce_KnownPluginList.cpp.