MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / PluginListWindow

Method PluginListWindow

Source/VSTScanner.cpp:193–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191/////////////////////////////////////////////////////////////////////////////////////////////////
192
193PluginListWindow::PluginListWindow(juce::AudioPluginFormatManager& pluginFormatManager, WindowCloseListener* listener)
194: juce::DocumentWindow("Plugin Manager",
195 juce::LookAndFeel::getDefaultLookAndFeel().findColour(juce::ResizableWindow::backgroundColourId),
196 juce::DocumentWindow::closeButton)
197, mListener(listener)
198{
199 auto deadMansPedalFile(juce::File(ofToDataPath("vst/deadmanspedal.txt")));
200
201 TheSynth->GetKnownPluginList().setCustomScanner(std::make_unique<CustomPluginScanner>());
202
203 mComponent = new CustomPluginListComponent(pluginFormatManager,
204 TheSynth->GetKnownPluginList(),
205 deadMansPedalFile,
206 getAppProperties().getUserSettings(), true);
207
208 setContentOwned(mComponent, true);
209
210 setResizable(true, false);
211 setResizeLimits(300, 400, 1500, 1500);
212 setSize(600, 600);
213 //setAlwaysOnTop(true);
214
215 if (const auto* dpy = juce::Desktop::getInstance().getDisplays().getDisplayForRect(TheSynth->GetMainComponent()->getScreenBounds()))
216 {
217 const auto& mainMon = dpy->userArea;
218 setTopLeftPosition(mainMon.getX() + mainMon.getWidth() / 4,
219 mainMon.getY() + mainMon.getHeight() / 4);
220 }
221
222 restoreWindowStateFromString(getAppProperties().getUserSettings()->getValue("listWindowPos"));
223 setVisible(true);
224}
225
226PluginListWindow::~PluginListWindow()
227{

Callers

nothing calls this directly

Calls 2

ofToDataPathFunction · 0.85
GetMainComponentMethod · 0.80

Tested by

no test coverage detected