This commit is contained in:
Armin 2026-08-10 12:55:02 +02:00
commit 6c0d072465
19 changed files with 2212 additions and 0 deletions

54
Source/PluginEditor.h Normal file
View file

@ -0,0 +1,54 @@
#pragma once
#include <JuceHeader.h>
#include <vector>
#include "Knob.h"
#include "PluginProcessor.h"
#include "HorizontLookAndFeel.h"
#include "SpectrumDisplay.h"
class HorizontAudioProcessorEditor : public juce::AudioProcessorEditor,
private juce::ComboBox::Listener
{
public:
HorizontAudioProcessorEditor (HorizontAudioProcessor&, juce::AudioProcessorValueTreeState&);
~HorizontAudioProcessorEditor() override;
void paint (juce::Graphics&) override;
void resized() override;
void mouseWheelMove (const juce::MouseEvent&, const juce::MouseWheelDetails&) override;
float getScaleFactor() const noexcept { return scaleFactor; }
private:
void comboBoxChanged (juce::ComboBox* boxThatHasChanged) override;
void layoutKnobRow (juce::Rectangle<int> area, int startIndex, int count);
void setScaleFactor (float newScale);
void updateScaleFactor();
void updateScaleSelection();
HorizontAudioProcessor& processor;
juce::AudioProcessorValueTreeState& apvts;
std::unique_ptr<HorizontLookAndFeel> lookAndFeel;
juce::Label titleLabel;
juce::Label subtitleLabel;
juce::ComboBox presetBox;
juce::ComboBox scaleBox;
juce::Label footerLabel;
SpectrumDisplay display;
std::vector<std::unique_ptr<Knob>> knobs;
juce::Rectangle<int> knobRow1Area;
juce::Rectangle<int> knobRow2Area;
juce::Rectangle<int> footerArea;
float scaleFactor = 1.0f;
static constexpr float baseWidth = 860.0f;
static constexpr float baseHeight = 606.0f;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HorizontAudioProcessorEditor)
};