forked from gregvds/AudioPlugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPluginEditor.h
More file actions
124 lines (98 loc) · 3.77 KB
/
PluginEditor.h
File metadata and controls
124 lines (98 loc) · 3.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
==============================================================================
This file was auto-generated!
It contains the basic framework code for a JUCE plugin editor.
==============================================================================
*/
#pragma once
#include "../JuceLibraryCode/JuceHeader.h"
#include "PluginProcessor.h"
#define DIALSIZE 100
#define SLIDERSIZE 200
#define TEXTBOXWIDTH 80
#define TEXTBOXHEIGT 20
#define LABELHEIGHT 20
#define SPECTRUMWIDTH 500
//==============================================================================
/**
Class to visualize audio signal
*/
class Visualiser : public AudioVisualiserComponent
{
public:
Visualiser() : AudioVisualiserComponent(2)
{
}
};
//==============================================================================
/**
Classes to contain look and feel customizations for different types of sliders
*/
class RotaryLookAndFeel : public LookAndFeel_V4
{
public:
RotaryLookAndFeel()
{
setColour(Slider::ColourIds::thumbColourId, Colours::olivedrab);
}
};
class VerticalLookAndFeel : public LookAndFeel_V4
{
public:
VerticalLookAndFeel()
{
setColour(Slider::ColourIds::thumbColourId, Colours::khaki);
}
};
//==============================================================================
/**
*/
class GainSliderAudioProcessorEditor : public AudioProcessorEditor,
public Slider::Listener,
public ComboBox::Listener
{
public:
GainSliderAudioProcessorEditor (GainSliderAudioProcessor&);
~GainSliderAudioProcessorEditor();
//==============================================================================
void paint (Graphics&) override;
void resized() override;
void sliderValueChanged(Slider *slider) override;
void comboBoxChanged(ComboBox *comboBox) override;
Visualiser visualiser;
private:
// This reference is provided as a quick way for your editor to
// access the processor object that created it.
GainSliderAudioProcessor& processor;
// These must be declared before the components using them
RotaryLookAndFeel rotaryLookAndFeel;
VerticalLookAndFeel verticalLookAndFeel;
ComboBox crossFeedMenu;
ComboBox filterTypeMenu;
Slider delaySlider;
Slider frequencySlider;
Slider qSlider;
Slider separationSlider;
Slider directGainSlider;
Slider xfeedGainSlider;
Label delayLabel;
Label frequencyLabel;
Label qLabel;
Label separationLabel;
Label directGainLabel;
Label xfeedGainLabel;
ToggleButton ActiveStateToggleButton { "Active" };
SharedResourcePointer<TooltipWindow> tooltipWindow;
public:
// Things public to be destroyed before private stuff.
// Destruction operates on a bottom to top of the code order.
std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> delaySliderAttach;
std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> freqSliderAttach;
std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> qSliderAttach;
std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> sepSliderAttach;
std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> directGainSliderAttach;
std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> xfeedGainSliderAttach;
std::unique_ptr <AudioProcessorValueTreeState::ButtonAttachment> ActiveStateToggleButtonAttach;
std::unique_ptr <AudioProcessorValueTreeState::ComboBoxAttachment > filterTypeMenuAttach;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GainSliderAudioProcessorEditor)
};