openshot-audio  0.1.4
juce_PluginListComponent.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_PLUGINLISTCOMPONENT_H_INCLUDED
26 #define JUCE_PLUGINLISTCOMPONENT_H_INCLUDED
27 
28 
29 //==============================================================================
35  public FileDragAndDropTarget,
36  private ChangeListener,
37  private ButtonListener // (can't use Button::Listener due to idiotic VC2005 bug)
38 {
39 public:
40  //==============================================================================
48  KnownPluginList& listToRepresent,
49  const File& deadMansPedalFile,
50  PropertiesFile* propertiesToUse);
51 
54 
56  void setOptionsButtonText (const String& newText);
57 
59  void setScanDialogText (const String& textForProgressWindowTitle,
60  const String& textForProgressWindowDescription);
61 
65  void setNumberOfThreadsForScanning (int numThreads);
66 
68  static FileSearchPath getLastSearchPath (PropertiesFile&, AudioPluginFormat&);
69 
71  static void setLastSearchPath (PropertiesFile&, AudioPluginFormat&, const FileSearchPath&);
72 
74  void scanFor (AudioPluginFormat&);
75 
77  bool isScanning() const noexcept;
78 
80  void removeSelectedPlugins();
81 
85  void setTableModel (TableListBoxModel* model);
86 
88  TableListBox& getTableListBox() noexcept { return table; }
89 
90 private:
91  //==============================================================================
92  AudioPluginFormatManager& formatManager;
93  KnownPluginList& list;
94  File deadMansPedalFile;
95  TableListBox table;
96  TextButton optionsButton;
97  PropertiesFile* propertiesToUse;
98  String dialogTitle, dialogText;
99  int numThreads;
100 
101  class TableModel;
103 
104  class Scanner;
105  friend class Scanner;
107  ScopedPointer<Scanner> currentScanner;
108 
109  void scanFinished (const StringArray&);
110  static void optionsMenuStaticCallback (int, PluginListComponent*);
111  void optionsMenuCallback (int);
112  void updateList();
113  void showSelectedFolder();
114  bool canShowSelectedFolder() const;
115  void removeMissingPlugins();
116  void removePluginItem (int index);
117 
118  void resized() override;
119  bool isInterestedInFileDrag (const StringArray&) override;
120  void filesDropped (const StringArray&, int, int) override;
121  void buttonClicked (Button*) override;
122  void changeListenerCallback (ChangeBroadcaster*) override;
123 
125 };
126 
127 
128 #endif // JUCE_PLUGINLISTCOMPONENT_H_INCLUDED
Definition: juce_PluginListComponent.cpp:330
Definition: juce_TableListBox.h:38
Definition: juce_TableListBox.h:206
Definition: juce_PropertiesFile.h:43
Definition: juce_KnownPluginList.h:38
Definition: juce_ChangeListener.h:44
Definition: juce_AudioPluginFormat.h:35
TableListBox & getTableListBox() noexcept
Definition: juce_PluginListComponent.h:88
#define noexcept
Definition: juce_CompilerSupport.h:141
virtual bool isInterestedInFileDrag(const StringArray &files)=0
virtual void buttonClicked(Button *)=0
Definition: juce_FileDragAndDropTarget.h:33
Definition: juce_Button.h:39
Definition: juce_TextButton.h:36
Definition: juce_String.h:43
Definition: juce_AudioPluginFormatManager.h:35
Definition: juce_ChangeBroadcaster.h:35
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_PluginListComponent.cpp:25
virtual void resized()
Definition: juce_Component.cpp:2272
Definition: juce_FileSearchPath.h:39
Definition: juce_Component.h:33
Definition: juce_PluginListComponent.h:34
virtual void changeListenerCallback(ChangeBroadcaster *source)=0
Definition: juce_Button.h:162
Definition: juce_StringArray.h:39
virtual void filesDropped(const StringArray &files, int x, int y)=0
Definition: juce_ContainerDeletePolicy.h:44
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
Definition: juce_File.h:45