openshot-audio
0.1.6
|
#include <juce_KnownPluginList.h>
Classes | |
class | CustomScanner |
struct | PluginTree |
Public Types | |
enum | SortMethod { defaultOrder = 0, sortAlphabetically, sortByCategory, sortByManufacturer, sortByFormat, sortByFileSystemLocation } |
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.
KnownPluginList::KnownPluginList | ( | ) |
Creates an empty list.
KnownPluginList::~KnownPluginList | ( | ) |
Destructor.
void KnownPluginList::addToMenu | ( | PopupMenu & | menu, |
SortMethod | sortMethod | ||
) | const |
Adds all the plugin 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.
bool KnownPluginList::addType | ( | const PluginDescription & | type | ) |
Adds a type manually from its description.
|
inlinenoexcept |
Type iteration.
void KnownPluginList::clear | ( | ) |
Clears the list.
void KnownPluginList::clearBlacklistedFiles | ( | ) |
Clears all the blacklisted files.
KnownPluginList::PluginTree * KnownPluginList::createTree | ( | const SortMethod | sortMethod | ) | const |
Creates a PluginTree object containing all the known plugins.
XmlElement * KnownPluginList::createXml | ( | ) | const |
Creates some XML that can be used to store the state of this list.
|
inlinenoexcept |
Type iteration.
const StringArray & KnownPluginList::getBlacklistedFiles | ( | ) | const |
Returns the list of blacklisted files.
Converts a menu item index that has been chosen into its index in this list. Returns -1 if it's not an ID that was used.
|
inlinenoexcept |
Returns the number of types currently in the list.
|
inlinenoexcept |
Returns one of the types.
PluginDescription * KnownPluginList::getTypeForFile | ( | const String & | fileOrIdentifier | ) | const |
Looks for a type in the list which comes from this file.
PluginDescription * 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().
bool 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.
void KnownPluginList::recreateFromXml | ( | const XmlElement & | xml | ) |
Recreates the state of this list from its stored XML format.
Removes a plugin ID from the black-list.
void KnownPluginList::removeType | ( | int | index | ) |
Removes a type.
void 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.
bool 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.
void KnownPluginList::scanFinished | ( | ) |
Tells a custom scanner that a scan has finished, and it can release any resources.
void KnownPluginList::setCustomScanner | ( | CustomScanner * | newScanner | ) |
Supplies a custom scanner to be used in future scans. The KnownPluginList will take ownership of the object passed in.
void KnownPluginList::sort | ( | SortMethod | method, |
bool | forwards | ||
) |
Sorts the list.