| #pragma once |
|
|
| #include <juce_audio_processors/juce_audio_processors.h> |
| #include <juce_gui_basics/juce_gui_basics.h> |
| #include "PluginBridgeProcessor.h" |
| #include "PluginPickerComponent.h" |
|
|
| class PluginBridgeEditor : public juce::AudioProcessorEditor, private juce::Timer |
| { |
| public: |
| PluginBridgeEditor(PluginBridgeProcessor& p); |
| ~PluginBridgeEditor() override; |
|
|
| void paint(juce::Graphics& g) override; |
| void resized() override; |
|
|
| private: |
| void timerCallback() override; |
| void showPluginMenu(); |
| void hidePicker(); |
| void attachPluginEditor(); |
| void detachPluginEditor(); |
| void showAudioOnlyUI(); |
| void hideAudioOnlyUI(); |
|
|
| PluginBridgeProcessor& processorRef; |
|
|
| |
| juce::Label titleLabel; |
| juce::Label mcpStatusLabel; |
| juce::Label pluginStatusLabel; |
| juce::TextButton selectButton{"Select Plugin"}; |
| juce::ComboBox channelDropdown; |
|
|
| |
| std::unique_ptr<juce::AudioProcessorEditor> pluginEditor; |
|
|
| |
| std::unique_ptr<PluginPickerComponent> activePicker; |
|
|
| |
| juce::Label audioOnlyLabel; |
|
|
| bool showingError = false; |
| bool audioOnlyMode = false; |
|
|
| static constexpr int kTopBarHeight = 32; |
| static constexpr int kChannelBarHeight = 26; |
| static constexpr int kHeaderHeight = kTopBarHeight + kChannelBarHeight; |
| static constexpr int kAudioOnlyHeight = 80; |
| static constexpr int kDefaultWidth = PluginPickerComponent::kWidth; |
| static constexpr int kDefaultHeight = kHeaderHeight; |
|
|
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginBridgeEditor) |
| }; |
|
|