| 191 | ///////////////////////////////////////////////////////////////////////////////////////////////// |
| 192 | |
| 193 | PluginListWindow::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 | |
| 226 | PluginListWindow::~PluginListWindow() |
| 227 | { |
nothing calls this directly
no test coverage detected