kopia lustrzana https://github.com/jameshball/osci-render
40 wiersze
1.1 KiB
C++
40 wiersze
1.1 KiB
C++
#pragma once
|
|
#include <JuceHeader.h>
|
|
#include "../PluginProcessor.h"
|
|
#include "../audio/Effect.h"
|
|
#include "LabelledTextBox.h"
|
|
|
|
|
|
class EffectComponent : public juce::Component {
|
|
public:
|
|
EffectComponent(Effect& effect, int index);
|
|
EffectComponent(Effect& effect, int index, bool checkboxVisible);
|
|
EffectComponent(Effect& effect);
|
|
EffectComponent(Effect& effect, bool checkboxVisible);
|
|
~EffectComponent();
|
|
|
|
void resized() override;
|
|
void paint(juce::Graphics& g) override;
|
|
void mouseDown(const juce::MouseEvent& event) override;
|
|
|
|
void setCheckboxVisible(bool visible);
|
|
void setComponent(std::shared_ptr<juce::Component> component);
|
|
|
|
juce::Slider slider;
|
|
Effect& effect;
|
|
int index;
|
|
juce::ToggleButton selected;
|
|
|
|
private:
|
|
void componentSetup();
|
|
bool checkboxVisible = true;
|
|
juce::Rectangle<int> textBounds;
|
|
std::shared_ptr<juce::Component> component;
|
|
|
|
juce::Label popupLabel;
|
|
LabelledTextBox min{"Min"};
|
|
LabelledTextBox max{"Max"};
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(EffectComponent)
|
|
};
|