LMMS
Loading...
Searching...
No Matches
juce_PluginListComponent.cpp
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
30{
31public:
33
34 int getNumRows() override
35 {
36 return list.getNumTypes() + list.getBlacklistedFiles().size();
37 }
38
39 void paintRowBackground (Graphics& g, int /*rowNumber*/, int /*width*/, int /*height*/, bool rowIsSelected) override
40 {
41 const auto defaultColour = owner.findColour (ListBox::backgroundColourId);
42 const auto c = rowIsSelected ? defaultColour.interpolatedWith (owner.findColour (ListBox::textColourId), 0.5f)
43 : defaultColour;
44
45 g.fillAll (c);
46 }
47
48 enum
49 {
55 };
56
57 void paintCell (Graphics& g, int row, int columnId, int width, int height, bool /*rowIsSelected*/) override
58 {
60 bool isBlacklisted = row >= list.getNumTypes();
61
62 if (isBlacklisted)
63 {
64 if (columnId == nameCol)
65 text = list.getBlacklistedFiles() [row - list.getNumTypes()];
66 else if (columnId == descCol)
67 text = TRANS("Deactivated after failing to initialise correctly");
68 }
69 else
70 {
71 auto desc = list.getTypes()[row];
72
73 switch (columnId)
74 {
75 case nameCol: text = desc.name; break;
76 case typeCol: text = desc.pluginFormatName; break;
77 case categoryCol: text = desc.category.isNotEmpty() ? desc.category : "-"; break;
78 case manufacturerCol: text = desc.manufacturerName; break;
79 case descCol: text = getPluginDescription (desc); break;
80
81 default: jassertfalse; break;
82 }
83 }
84
85 if (text.isNotEmpty())
86 {
87 const auto defaultTextColour = owner.findColour (ListBox::textColourId);
88 g.setColour (isBlacklisted ? Colours::red
89 : columnId == nameCol ? defaultTextColour
90 : defaultTextColour.interpolatedWith (Colours::transparentBlack, 0.3f));
91 g.setFont (Font ((float) height * 0.7f, Font::bold));
92 g.drawFittedText (text, 4, 0, width - 6, height, Justification::centredLeft, 1, 0.9f);
93 }
94 }
95
96 void cellClicked (int rowNumber, int columnId, const juce::MouseEvent& e) override
97 {
98 TableListBoxModel::cellClicked (rowNumber, columnId, e);
99
100 if (rowNumber >= 0 && rowNumber < getNumRows() && e.mods.isPopupMenu())
101 owner.createMenuForRow (rowNumber).showMenuAsync (PopupMenu::Options().withDeletionCheck (owner));
102 }
103
104 void deleteKeyPressed (int) override
105 {
106 owner.removeSelectedPlugins();
107 }
108
109 void sortOrderChanged (int newSortColumnId, bool isForwards) override
110 {
111 switch (newSortColumnId)
112 {
113 case nameCol: list.sort (KnownPluginList::sortAlphabetically, isForwards); break;
114 case typeCol: list.sort (KnownPluginList::sortByFormat, isForwards); break;
115 case categoryCol: list.sort (KnownPluginList::sortByCategory, isForwards); break;
116 case manufacturerCol: list.sort (KnownPluginList::sortByManufacturer, isForwards); break;
117 case descCol: break;
118
119 default: jassertfalse; break;
120 }
121 }
122
124 {
125 StringArray items;
126
127 if (desc.descriptiveName != desc.name)
128 items.add (desc.descriptiveName);
129
130 items.add (desc.version);
131
132 items.removeEmptyStrings();
133 return items.joinIntoString (" - ");
134 }
135
138
140};
141
142//==============================================================================
144 const File& deadMansPedal, PropertiesFile* const props,
145 bool allowPluginsWhichRequireAsynchronousInstantiation)
146 : formatManager (manager),
147 list (listToEdit),
148 deadMansPedalFile (deadMansPedal),
149 optionsButton ("Options..."),
150 propertiesToUse (props),
151 allowAsync (allowPluginsWhichRequireAsynchronousInstantiation),
152 numThreads (allowAsync ? 1 : 0)
153{
154 tableModel.reset (new TableModel (*this, listToEdit));
155
156 TableHeaderComponent& header = table.getHeader();
157
160 header.addColumn (TRANS("Category"), TableModel::categoryCol, 100, 100, 200);
161 header.addColumn (TRANS("Manufacturer"), TableModel::manufacturerCol, 200, 100, 300);
162 header.addColumn (TRANS("Description"), TableModel::descCol, 300, 100, 500, TableHeaderComponent::notSortable);
163
164 table.setHeaderHeight (22);
165 table.setRowHeight (20);
166 table.setModel (tableModel.get());
167 table.setMultipleSelectionEnabled (true);
169
171 optionsButton.onClick = [this]
172 {
173 createOptionsMenu().showMenuAsync (PopupMenu::Options()
174 .withDeletionCheck (*this)
175 .withTargetComponent (optionsButton));
176 };
177
178 optionsButton.setTriggeredOnMouseDown (true);
179
180 setSize (400, 600);
181 list.addChangeListener (this);
182 updateList();
183 table.getHeader().reSortTable();
184
186 deadMansPedalFile.deleteFile();
187}
188
190{
191 list.removeChangeListener (this);
192}
193
195{
196 optionsButton.setButtonText (newText);
197 resized();
198}
199
201{
203 dialogText = content;
204}
205
210
212{
213 auto r = getLocalBounds().reduced (2);
214
215 if (optionsButton.isVisible())
216 {
217 optionsButton.setBounds (r.removeFromBottom (24));
218 optionsButton.changeWidthToFitText (24);
219 r.removeFromBottom (3);
220 }
221
222 table.setBounds (r);
223}
224
226{
227 table.getHeader().reSortTable();
228 updateList();
229}
230
232{
233 table.updateContent();
234 table.repaint();
235}
236
238{
239 auto selected = table.getSelectedRows();
240
241 for (int i = table.getNumRows(); --i >= 0;)
242 if (selected.contains (i))
244}
245
247{
248 table.setModel (nullptr);
249 tableModel.reset (model);
250 table.setModel (tableModel.get());
251
252 table.getHeader().reSortTable();
253 table.updateContent();
254 table.repaint();
255}
256
257static bool canShowFolderForPlugin (KnownPluginList& list, int index)
258{
259 return File::createFileWithoutCheckingPath (list.getTypes()[index].fileOrIdentifier).exists();
260}
261
262static void showFolderForPlugin (KnownPluginList& list, int index)
263{
264 if (canShowFolderForPlugin (list, index))
265 File (list.getTypes()[index].fileOrIdentifier).revealToUser();
266}
267
269{
270 auto types = list.getTypes();
271
272 for (int i = types.size(); --i >= 0;)
273 {
274 auto type = types.getUnchecked (i);
275
276 if (! formatManager.doesPluginStillExist (type))
277 list.removeType (type);
278 }
279}
280
282{
283 if (index < list.getNumTypes())
284 list.removeType (list.getTypes()[index]);
285 else
286 list.removeFromBlacklist (list.getBlacklistedFiles() [index - list.getNumTypes()]);
287}
288
290{
291 PopupMenu menu;
292 menu.addItem (PopupMenu::Item (TRANS("Clear list"))
293 .setAction ([this] { list.clear(); }));
294
295 menu.addSeparator();
296
297 for (auto format : formatManager.getFormats())
298 if (format->canScanForPlugins())
299 menu.addItem (PopupMenu::Item ("Remove all " + format->getName() + " plug-ins")
300 .setEnabled (! list.getTypesForFormat (*format).isEmpty())
301 .setAction ([this, format]
302 {
303 for (auto& pd : list.getTypesForFormat (*format))
304 list.removeType (pd);
305 }));
306
307 menu.addSeparator();
308
309 menu.addItem (PopupMenu::Item (TRANS("Remove selected plug-in from list"))
310 .setEnabled (table.getNumSelectedRows() > 0)
311 .setAction ([this] { removeSelectedPlugins(); }));
312
313 menu.addItem (PopupMenu::Item (TRANS("Remove any plug-ins whose files no longer exist"))
314 .setAction ([this] { removeMissingPlugins(); }));
315
316 menu.addSeparator();
317
318 auto selectedRow = table.getSelectedRow();
319
320 menu.addItem (PopupMenu::Item (TRANS("Show folder containing selected plug-in"))
321 .setEnabled (canShowFolderForPlugin (list, selectedRow))
322 .setAction ([this, selectedRow] { showFolderForPlugin (list, selectedRow); }));
323
324 menu.addSeparator();
325
326 for (auto format : formatManager.getFormats())
327 if (format->canScanForPlugins())
328 menu.addItem (PopupMenu::Item ("Scan for new or updated " + format->getName() + " plug-ins")
329 .setAction ([this, format] { scanFor (*format); }));
330
331 return menu;
332}
333
335{
336 PopupMenu menu;
337
338 if (rowNumber >= 0 && rowNumber < tableModel->getNumRows())
339 {
340 menu.addItem (PopupMenu::Item (TRANS("Remove plug-in from list"))
341 .setAction ([this, rowNumber] { removePluginItem (rowNumber); }));
342
343 menu.addItem (PopupMenu::Item (TRANS("Show folder containing plug-in"))
345 .setAction ([this, rowNumber] { showFolderForPlugin (list, rowNumber); }));
346 }
347
348 return menu;
349}
350
352{
353 return true;
354}
355
357{
359 list.scanAndAddDragAndDroppedFiles (formatManager, files, typesFound);
360}
361
363{
364 auto key = "lastPluginScanPath_" + format.getName();
365
366 if (properties.containsKey (key) && properties.getValue (key, {}).trim().isEmpty())
367 properties.removeValue (key);
368
369 return FileSearchPath (properties.getValue (key, format.getDefaultLocationsToSearch().toString()));
370}
371
373 const FileSearchPath& newPath)
374{
375 auto key = "lastPluginScanPath_" + format.getName();
376
377 if (newPath.getNumPaths() == 0)
378 properties.removeValue (key);
379 else
380 properties.setValue (key, newPath.toString());
381}
382
383//==============================================================================
385{
386public:
388 PropertiesFile* properties, bool allowPluginsWhichRequireAsynchronousInstantiation, int threads,
389 const String& title, const String& text)
390 : owner (plc),
392 filesOrIdentifiersToScan (filesOrIdentifiers),
394 pathChooserWindow (TRANS("Select folders to scan..."), String(), MessageBoxIconType::NoIcon),
396 numThreads (threads),
397 allowAsync (allowPluginsWhichRequireAsynchronousInstantiation)
398 {
399 const auto blacklisted = owner.list.getBlacklistedFiles();
400 initiallyBlacklistedFiles = std::set<String> (blacklisted.begin(), blacklisted.end());
401
402 FileSearchPath path (formatToScan.getDefaultLocationsToSearch());
403
404 // You need to use at least one thread when scanning plug-ins asynchronously
405 jassert (! allowAsync || (numThreads > 0));
406
407 // If the filesOrIdentifiersToScan argument isn't empty, we should only scan these
408 // If the path is empty, then paths aren't used for this format.
409 if (filesOrIdentifiersToScan.isEmpty() && path.getNumPaths() > 0)
410 {
411 #if ! JUCE_IOS
412 if (propertiesToUse != nullptr)
414 #endif
415
416 pathList.setSize (500, 300);
417 pathList.setPath (path);
418
419 pathChooserWindow.addCustomComponent (&pathList);
420 pathChooserWindow.addButton (TRANS("Scan"), 1, KeyPress (KeyPress::returnKey));
421 pathChooserWindow.addButton (TRANS("Cancel"), 0, KeyPress (KeyPress::escapeKey));
422
423 pathChooserWindow.enterModalState (true,
425 &pathChooserWindow, this),
426 false);
427 }
428 else
429 {
430 startScan();
431 }
432 }
433
434 ~Scanner() override
435 {
436 if (pool != nullptr)
437 {
438 pool->removeAllJobs (true, 60000);
439 pool.reset();
440 }
441 }
442
443private:
448 std::unique_ptr<PluginDirectoryScanner> scanner;
452 double progress = 0;
453 const int numThreads;
455 std::atomic<bool> finished { false };
456 std::unique_ptr<ThreadPool> pool;
458
460 {
461 if (alert != nullptr && scanner != nullptr)
462 {
463 if (result != 0)
464 scanner->warnUserAboutStupidPaths();
465 else
466 scanner->finishedScan();
467 }
468 }
469
470 // Try to dissuade people from to scanning their entire C: drive, or other system folders.
472 {
473 for (int i = 0; i < pathList.getPath().getNumPaths(); ++i)
474 {
475 auto f = pathList.getPath()[i];
476
477 if (isStupidPath (f))
478 {
480 TRANS("Plugin Scanning"),
481 TRANS("If you choose to scan folders that contain non-plugin files, "
482 "then scanning may take a long time, and can cause crashes when "
483 "attempting to load unsuitable files.")
484 + newLine
485 + TRANS ("Are you sure you want to scan the folder \"XYZ\"?")
486 .replace ("XYZ", f.getFullPathName()),
487 TRANS ("Scan"),
488 String(),
489 nullptr,
491 return;
492 }
493 }
494
495 startScan();
496 }
497
498 static bool isStupidPath (const File& f)
499 {
500 Array<File> roots;
502
503 if (roots.contains (f))
504 return true;
505
506 File::SpecialLocationType pathsThatWouldBeStupidToScan[]
515
516 for (auto location : pathsThatWouldBeStupidToScan)
517 {
518 auto sillyFolder = File::getSpecialLocation (location);
519
520 if (f == sillyFolder || sillyFolder.isAChildOf (f))
521 return true;
522 }
523
524 return false;
525 }
526
528 {
529 if (result != 0)
530 scanner->startScan();
531 else
532 scanner->finishedScan();
533 }
534
536 {
537 pathChooserWindow.setVisible (false);
538
539 scanner.reset (new PluginDirectoryScanner (owner.list, formatToScan, pathList.getPath(),
540 true, owner.deadMansPedalFile, allowAsync));
541
542 if (! filesOrIdentifiersToScan.isEmpty())
543 {
544 scanner->setFilesOrIdentifiersToScan (filesOrIdentifiersToScan);
545 }
546 else if (propertiesToUse != nullptr)
547 {
549 propertiesToUse->saveIfNeeded();
550 }
551
552 progressWindow.addButton (TRANS("Cancel"), 0, KeyPress (KeyPress::escapeKey));
553 progressWindow.addProgressBarComponent (progress);
554 progressWindow.enterModalState();
555
556 if (numThreads > 0)
557 {
558 pool.reset (new ThreadPool (numThreads));
559
560 for (int i = numThreads; --i >= 0;)
561 pool->addJob (new ScanJob (*this), true);
562 }
563
564 startTimer (20);
565 }
566
568 {
569 const auto blacklisted = owner.list.getBlacklistedFiles();
570 std::set<String> allBlacklistedFiles (blacklisted.begin(), blacklisted.end());
571
572 std::vector<String> newBlacklistedFiles;
573 std::set_difference (allBlacklistedFiles.begin(), allBlacklistedFiles.end(),
575 std::back_inserter (newBlacklistedFiles));
576
577 owner.scanFinished (scanner != nullptr ? scanner->getFailedFiles() : StringArray(),
578 newBlacklistedFiles);
579 }
580
581 void timerCallback() override
582 {
584 return;
585
586 progress = scanner->getProgress();
587
588 if (pool == nullptr)
589 {
591
592 if (doNextScan())
593 startTimer (20);
594 }
595
596 if (! progressWindow.isCurrentlyModal())
597 finished = true;
598
599 if (finished)
600 finishedScan();
601 else
602 progressWindow.setMessage (TRANS("Testing") + ":\n\n" + pluginBeingScanned);
603 }
604
606 {
607 if (scanner->scanNextFile (true, pluginBeingScanned))
608 return true;
609
610 finished = true;
611 return false;
612 }
613
614 struct ScanJob : public ThreadPoolJob
615 {
616 ScanJob (Scanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {}
617
619 {
620 while (scanner.doNextScan() && ! shouldExit())
621 {}
622
623 return jobHasFinished;
624 }
625
627
629 };
630
632};
633
638
639void PluginListComponent::scanFor (AudioPluginFormat& format, const StringArray& filesOrIdentifiersToScan)
640{
641 currentScanner.reset (new Scanner (*this, format, filesOrIdentifiersToScan, propertiesToUse, allowAsync, numThreads,
642 dialogTitle.isNotEmpty() ? dialogTitle : TRANS("Scanning for plug-ins..."),
643 dialogText.isNotEmpty() ? dialogText : TRANS("Searching for all possible plug-in files...")));
644}
645
647{
648 return currentScanner != nullptr;
649}
650
652 const std::vector<String>& newBlacklistedFiles)
653{
654 StringArray warnings;
655
656 const auto addWarningText = [&warnings] (const auto& range, const auto& prefix)
657 {
658 if (range.size() == 0)
659 return;
660
661 StringArray names;
662
663 for (auto& f : range)
664 names.add (File::createFileWithoutCheckingPath (f).getFileName());
665
666 warnings.add (prefix + ":\n\n" + names.joinIntoString (", "));
667 };
668
669 addWarningText (newBlacklistedFiles, TRANS ("The following files encountered fatal errors during validation"));
670 addWarningText (failedFiles, TRANS ("The following files appeared to be plugin files, but failed to load correctly"));
671
672 currentScanner.reset(); // mustn't delete this before using the failed files array
673
674 if (! warnings.isEmpty())
676 TRANS("Scan complete"),
677 warnings.joinIntoString ("\n\n"));
678}
679
680} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
static File createFileWithoutCheckingPath(const String &absolutePath) noexcept
Definition File.cpp:65
static File getSpecialLocation(const SpecialLocationType type)
Definition File.cpp:1642
Definition juce_AlertWindow.h:45
static bool JUCE_CALLTYPE showOkCancelBox(MessageBoxIconType iconType, const String &title, const String &message, const String &button1Text, const String &button2Text, Component *associatedComponent, ModalComponentManager::Callback *callback)
Definition juce_AlertWindow.cpp:752
static void JUCE_CALLTYPE showMessageBoxAsync(MessageBoxIconType iconType, const String &title, const String &message, const String &buttonText=String(), Component *associatedComponent=nullptr, ModalComponentManager::Callback *callback=nullptr)
Definition juce_AlertWindow.cpp:712
Definition juce_Array.h:56
bool contains(ParameterType elementToLookFor) const
Definition juce_Array.h:400
Definition juce_AudioPluginFormat.h:38
Definition juce_AudioPluginFormatManager.h:38
Definition juce_ChangeBroadcaster.h:35
NamedValueSet properties
Definition juce_Component.h:2549
void addAndMakeVisible(Component *child, int zOrder=-1)
Definition juce_Component.cpp:1554
void setEnabled(bool shouldBeEnabled)
Definition juce_Component.cpp:3110
void setSize(int newWidth, int newHeight)
Definition juce_Component.cpp:1262
Rectangle< int > getLocalBounds() const noexcept
Definition juce_Component.cpp:2283
Definition juce_File.h:45
void revealToUser() const
Definition juce_linux_Files.cpp:246
SpecialLocationType
Definition juce_File.h:861
@ userMoviesDirectory
Definition juce_File.h:878
@ userMusicDirectory
Definition juce_File.h:875
@ tempDirectory
Definition juce_File.h:913
@ globalApplicationsDirectory
Definition juce_File.h:957
@ userDocumentsDirectory
Definition juce_File.h:869
@ userPicturesDirectory
Definition juce_File.h:881
@ userDesktopDirectory
Definition juce_File.h:872
@ userHomeDirectory
Definition juce_File.h:863
static void findFileSystemRoots(Array< File > &results)
Definition juce_linux_CommonFile.cpp:48
static File createFileWithoutCheckingPath(const String &absolutePath) noexcept
Definition juce_File.cpp:31
bool exists() const
Definition juce_posix_SharedCode.h:246
Definition juce_FileSearchPath.h:35
String toString() const
Definition juce_FileSearchPath.cpp:69
int getNumPaths() const
Definition juce_FileSearchPath.cpp:59
Definition juce_FileSearchPathListComponent.h:42
Definition juce_Font.h:42
@ bold
Definition juce_Font.h:51
Definition juce_GraphicsContext.h:45
@ centredLeft
Definition juce_Justification.h:143
Definition juce_KeyPress.h:40
static const int escapeKey
Definition juce_KeyPress.h:190
static const int returnKey
Definition juce_KeyPress.h:191
Definition juce_KnownPluginList.h:41
@ sortByFormat
Definition juce_KnownPluginList.h:134
@ sortAlphabetically
Definition juce_KnownPluginList.h:131
@ sortByManufacturer
Definition juce_KnownPluginList.h:133
@ sortByCategory
Definition juce_KnownPluginList.h:132
@ textColourId
Definition juce_ListBox.h:498
@ backgroundColourId
Definition juce_ListBox.h:494
static ModalComponentManager::Callback * create(CallbackFn &&fn)
Definition juce_ModalComponentManager.h:174
static ModalComponentManager::Callback * forComponent(void(*functionToCall)(int, ComponentType *), ComponentType *component)
Definition juce_ModalComponentManager.h:276
Definition juce_OwnedArray.h:51
Definition juce_PluginDescription.h:43
String version
Definition juce_PluginDescription.h:74
String name
Definition juce_PluginDescription.h:56
String descriptiveName
Definition juce_PluginDescription.h:62
Definition juce_PluginDirectoryScanner.h:39
static void applyBlacklistingsFromDeadMansPedal(KnownPluginList &listToApplyTo, const File &deadMansPedalFile)
Definition juce_PluginDirectoryScanner.cpp:131
Definition juce_PluginListComponent.cpp:385
const int numThreads
Definition juce_PluginListComponent.cpp:453
double progress
Definition juce_PluginListComponent.cpp:452
String pluginBeingScanned
Definition juce_PluginListComponent.cpp:451
std::atomic< bool > finished
Definition juce_PluginListComponent.cpp:455
void finishedScan()
Definition juce_PluginListComponent.cpp:567
std::unique_ptr< PluginDirectoryScanner > scanner
Definition juce_PluginListComponent.cpp:448
bool allowAsync
Definition juce_PluginListComponent.cpp:454
void timerCallback() override
Definition juce_PluginListComponent.cpp:581
static void startScanCallback(int result, AlertWindow *alert, Scanner *scanner)
Definition juce_PluginListComponent.cpp:459
StringArray filesOrIdentifiersToScan
Definition juce_PluginListComponent.cpp:446
bool timerReentrancyCheck
Definition juce_PluginListComponent.cpp:454
static void warnAboutStupidPathsCallback(int result, Scanner *scanner)
Definition juce_PluginListComponent.cpp:527
void startScan()
Definition juce_PluginListComponent.cpp:535
void warnUserAboutStupidPaths()
Definition juce_PluginListComponent.cpp:471
AudioPluginFormat & formatToScan
Definition juce_PluginListComponent.cpp:445
FileSearchPathListComponent pathList
Definition juce_PluginListComponent.cpp:450
PluginListComponent & owner
Definition juce_PluginListComponent.cpp:444
~Scanner() override
Definition juce_PluginListComponent.cpp:434
static bool isStupidPath(const File &f)
Definition juce_PluginListComponent.cpp:498
std::set< String > initiallyBlacklistedFiles
Definition juce_PluginListComponent.cpp:457
PropertiesFile * propertiesToUse
Definition juce_PluginListComponent.cpp:447
AlertWindow progressWindow
Definition juce_PluginListComponent.cpp:449
AlertWindow pathChooserWindow
Definition juce_PluginListComponent.cpp:449
std::unique_ptr< ThreadPool > pool
Definition juce_PluginListComponent.cpp:456
Scanner(PluginListComponent &plc, AudioPluginFormat &format, const StringArray &filesOrIdentifiers, PropertiesFile *properties, bool allowPluginsWhichRequireAsynchronousInstantiation, int threads, const String &title, const String &text)
Definition juce_PluginListComponent.cpp:387
bool doNextScan()
Definition juce_PluginListComponent.cpp:605
Definition juce_PluginListComponent.cpp:30
static String getPluginDescription(const PluginDescription &desc)
Definition juce_PluginListComponent.cpp:123
@ categoryCol
Definition juce_PluginListComponent.cpp:52
@ descCol
Definition juce_PluginListComponent.cpp:54
@ nameCol
Definition juce_PluginListComponent.cpp:50
@ typeCol
Definition juce_PluginListComponent.cpp:51
@ manufacturerCol
Definition juce_PluginListComponent.cpp:53
int getNumRows() override
Definition juce_PluginListComponent.cpp:34
void cellClicked(int rowNumber, int columnId, const juce::MouseEvent &e) override
Definition juce_PluginListComponent.cpp:96
void deleteKeyPressed(int) override
Definition juce_PluginListComponent.cpp:104
void sortOrderChanged(int newSortColumnId, bool isForwards) override
Definition juce_PluginListComponent.cpp:109
void paintCell(Graphics &g, int row, int columnId, int width, int height, bool) override
Definition juce_PluginListComponent.cpp:57
PluginListComponent & owner
Definition juce_PluginListComponent.cpp:136
KnownPluginList & list
Definition juce_PluginListComponent.cpp:137
void paintRowBackground(Graphics &g, int, int, int, bool rowIsSelected) override
Definition juce_PluginListComponent.cpp:39
TableModel(PluginListComponent &c, KnownPluginList &l)
Definition juce_PluginListComponent.cpp:32
static FileSearchPath getLastSearchPath(PropertiesFile &, AudioPluginFormat &)
Definition juce_PluginListComponent.cpp:362
std::unique_ptr< Scanner > currentScanner
Definition juce_PluginListComponent.h:131
bool isInterestedInFileDrag(const StringArray &) override
Definition juce_PluginListComponent.cpp:351
KnownPluginList & list
Definition juce_PluginListComponent.h:118
void setTableModel(TableListBoxModel *)
Definition juce_PluginListComponent.cpp:246
void filesDropped(const StringArray &, int, int) override
Definition juce_PluginListComponent.cpp:356
String dialogText
Definition juce_PluginListComponent.h:123
~PluginListComponent() override
Definition juce_PluginListComponent.cpp:189
bool allowAsync
Definition juce_PluginListComponent.h:124
bool isScanning() const noexcept
Definition juce_PluginListComponent.cpp:646
void changeListenerCallback(ChangeBroadcaster *) override
Definition juce_PluginListComponent.cpp:225
PopupMenu createOptionsMenu()
Definition juce_PluginListComponent.cpp:289
String dialogTitle
Definition juce_PluginListComponent.h:123
void resized() override
Definition juce_PluginListComponent.cpp:211
void updateList()
Definition juce_PluginListComponent.cpp:231
void removeSelectedPlugins()
Definition juce_PluginListComponent.cpp:237
PopupMenu createMenuForRow(int rowNumber)
Definition juce_PluginListComponent.cpp:334
File deadMansPedalFile
Definition juce_PluginListComponent.h:119
TableListBox table
Definition juce_PluginListComponent.h:120
AudioPluginFormatManager & formatManager
Definition juce_PluginListComponent.h:117
void setNumberOfThreadsForScanning(int numThreads)
Definition juce_PluginListComponent.cpp:206
static void setLastSearchPath(PropertiesFile &, AudioPluginFormat &, const FileSearchPath &)
Definition juce_PluginListComponent.cpp:372
int numThreads
Definition juce_PluginListComponent.h:125
PropertiesFile * propertiesToUse
Definition juce_PluginListComponent.h:122
void removePluginItem(int index)
Definition juce_PluginListComponent.cpp:281
void setOptionsButtonText(const String &newText)
Definition juce_PluginListComponent.cpp:194
PluginListComponent(AudioPluginFormatManager &formatManager, KnownPluginList &listToRepresent, const File &deadMansPedalFile, PropertiesFile *propertiesToUse, bool allowPluginsWhichRequireAsynchronousInstantiation=false)
Definition juce_PluginListComponent.cpp:143
TextButton optionsButton
Definition juce_PluginListComponent.h:121
void scanFinished(const StringArray &, const std::vector< String > &)
Definition juce_PluginListComponent.cpp:651
void removeMissingPlugins()
Definition juce_PluginListComponent.cpp:268
void scanFor(AudioPluginFormat &)
Definition juce_PluginListComponent.cpp:634
void setScanDialogText(const String &textForProgressWindowTitle, const String &textForProgressWindowDescription)
Definition juce_PluginListComponent.cpp:200
std::unique_ptr< TableListBoxModel > tableModel
Definition juce_PluginListComponent.h:128
Definition juce_PopupMenu.h:457
Definition juce_PopupMenu.h:80
void addSeparator()
Definition juce_PopupMenu.cpp:1920
void addItem(Item newItem)
Definition juce_PopupMenu.cpp:1753
Definition juce_PropertiesFile.h:48
Definition juce_ScopedValueSetter.h:55
Definition juce_StringArray.h:35
String joinIntoString(StringRef separatorString, int startIndex=0, int numberOfElements=-1) const
Definition juce_StringArray.cpp:289
void removeEmptyStrings(bool removeWhitespaceStrings=true)
Definition juce_StringArray.cpp:250
void add(String stringToAdd)
Definition juce_StringArray.cpp:136
bool isEmpty() const noexcept
Definition juce_StringArray.h:139
Definition juce_String.h:53
Definition juce_TableHeaderComponent.h:47
@ defaultFlags
Definition juce_TableHeaderComponent.h:72
@ notSortable
Definition juce_TableHeaderComponent.h:81
@ sortedForwards
Definition juce_TableHeaderComponent.h:68
@ notResizable
Definition juce_TableHeaderComponent.h:75
void addColumn(const String &columnName, int columnId, int width, int minimumWidth=30, int maximumWidth=-1, int propertyFlags=defaultFlags, int insertIndex=-1)
Definition juce_TableHeaderComponent.cpp:106
Definition juce_TableListBox.h:41
virtual void cellClicked(int rowNumber, int columnId, const MouseEvent &)
Definition juce_TableListBox.cpp:598
Definition juce_ThreadPool.h:156
JobStatus
Definition juce_ThreadPool.h:71
@ jobHasFinished
Definition juce_ThreadPool.h:72
bool shouldExit() const noexcept
Definition juce_ThreadPool.h:107
ThreadPoolJob(const String &name)
Definition juce_ThreadPool.cpp:47
Timer() noexcept
Definition juce_Timer.cpp:316
void startTimer(int intervalInMilliseconds) noexcept
Definition juce_Timer.cpp:332
* e
Definition inflate.c:1404
int * l
Definition inflate.c:1579
int g
Definition inflate.c:1573
register unsigned i
Definition inflate.c:1575
unsigned s
Definition inflate.c:1555
unsigned f
Definition inflate.c:1572
static const char * title
Definition pugl.h:1747
static int int height
Definition pugl.h:1594
static int width
Definition pugl.h:1593
#define TRANS(stringLiteral)
Definition juce_LocalisedStrings.h:208
#define jassert(expression)
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define jassertfalse
static char ** files
Definition misc.c:28
const Colour transparentBlack
Definition juce_Colours.h:40
const Colour red
Definition juce_Colours.h:157
Definition carla_juce.cpp:31
NewLine newLine
Definition juce_String.cpp:28
static bool canShowFolderForPlugin(KnownPluginList &list, int index)
Definition juce_PluginListComponent.cpp:257
static void showFolderForPlugin(KnownPluginList &list, int index)
Definition juce_PluginListComponent.cpp:262
MessageBoxIconType
Definition juce_MessageBoxOptions.h:31
@ WarningIcon
Definition juce_MessageBoxOptions.h:35
@ NoIcon
Definition juce_MessageBoxOptions.h:32
@ InfoIcon
Definition juce_MessageBoxOptions.h:37
@ list
Definition juce_AccessibilityRole.h:56
@ row
Definition juce_AccessibilityRole.h:53
Definition juce_PluginListComponent.cpp:615
JobStatus runJob()
Definition juce_PluginListComponent.cpp:618
ScanJob(Scanner &s)
Definition juce_PluginListComponent.cpp:616
Scanner & scanner
Definition juce_PluginListComponent.cpp:626
Definition juce_PopupMenu.h:111
Item & setEnabled(bool shouldBeEnabled) &noexcept
Definition juce_PopupMenu.cpp:1675
Item & setAction(std::function< void()> action) &noexcept
Definition juce_PopupMenu.cpp:1681
const char * text
Definition swell-functions.h:167
return c
Definition crypt.c:175
ZCONST char * key
Definition crypt.c:587
int r
Definition crypt.c:458
int result
Definition process.c:1455
_WDL_CSTRING_PREFIX void INT_PTR const char * format
Definition wdlcstring.h:263
#define const
Definition zconf.h:137