RAM2118 commited on
Commit
9f7698e
·
verified ·
1 Parent(s): 06d413f

Upload Source/Plugin/PluginBridgeEditor.h

Browse files
Files changed (1) hide show
  1. Source/Plugin/PluginBridgeEditor.h +13 -10
Source/Plugin/PluginBridgeEditor.h CHANGED
@@ -1,35 +1,38 @@
1
  #pragma once
2
 
 
3
  #include <juce_gui_basics/juce_gui_basics.h>
4
  #include "PluginBridgeProcessor.h"
5
 
6
- class PluginBridgeEditor : public juce::AudioProcessorEditor,
7
- private juce::Timer
8
  {
9
  public:
10
- explicit PluginBridgeEditor(PluginBridgeProcessor&);
11
  ~PluginBridgeEditor() override;
12
 
13
- void paint(juce::Graphics&) override;
14
  void resized() override;
15
 
16
  private:
17
  void timerCallback() override;
18
  void showPluginMenu();
19
- void toggleGui();
 
20
 
21
  PluginBridgeProcessor& processorRef;
22
 
 
23
  juce::Label titleLabel;
24
  juce::Label mcpStatusLabel;
25
  juce::Label pluginStatusLabel;
26
- juce::Label connectionLabel;
27
-
28
  juce::TextButton selectButton{"Select Plugin"};
29
- juce::TextButton guiButton{"Open GUI"};
30
- juce::TextButton reloadButton{"Reload"};
31
 
32
- bool guiOpen = false;
 
 
 
 
 
33
 
34
  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginBridgeEditor)
35
  };
 
1
  #pragma once
2
 
3
+ #include <juce_audio_processors/juce_audio_processors.h>
4
  #include <juce_gui_basics/juce_gui_basics.h>
5
  #include "PluginBridgeProcessor.h"
6
 
7
+ class PluginBridgeEditor : public juce::AudioProcessorEditor, private juce::Timer
 
8
  {
9
  public:
10
+ PluginBridgeEditor(PluginBridgeProcessor& p);
11
  ~PluginBridgeEditor() override;
12
 
13
+ void paint(juce::Graphics& g) override;
14
  void resized() override;
15
 
16
  private:
17
  void timerCallback() override;
18
  void showPluginMenu();
19
+ void embedPluginEditor();
20
+ void removePluginEditor();
21
 
22
  PluginBridgeProcessor& processorRef;
23
 
24
+ // Top bar controls (always visible)
25
  juce::Label titleLabel;
26
  juce::Label mcpStatusLabel;
27
  juce::Label pluginStatusLabel;
 
 
28
  juce::TextButton selectButton{"Select Plugin"};
 
 
29
 
30
+ // Embedded plugin editor
31
+ std::unique_ptr<juce::AudioProcessorEditor> hostedEditor;
32
+
33
+ static constexpr int kTopBarHeight = 40;
34
+ static constexpr int kDefaultWidth = 400;
35
+ static constexpr int kDefaultHeight = 60;
36
 
37
  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginBridgeEditor)
38
  };