-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPluginEditor.h
More file actions
41 lines (31 loc) · 1.42 KB
/
Copy pathPluginEditor.h
File metadata and controls
41 lines (31 loc) · 1.42 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
#pragma once
#include <juce_audio_processors/juce_audio_processors.h>
#include "SpectralWaterfallComponent.h"
class PluginProcessor;
// =============================================================================
class PluginEditor : public juce::AudioProcessorEditor
{
public:
explicit PluginEditor (PluginProcessor& p);
~PluginEditor () override;
// ---- Component ----------------------------------------------------------
void paint (juce::Graphics&) override;
void resized () override;
void parentHierarchyChanged () override; // sets window icon when peer is ready
// ---- Accessor for PluginProcessor ---------------------------------------
SpectralWaterfallComponent& getWaterfall () { return waterfall; }
private:
PluginProcessor& processor;
SpectralWaterfallComponent waterfall;
// ---- Toolbar ------------------------------------------------------------
juce::TextButton liveButton{"Live"};
juce::TextButton fileButton{"Load File..."};
juce::TextButton aboutButton{"?"};
juce::FileChooser fileChooser{"Load audio file for analysis",
juce::File::getSpecialLocation (juce::File::userMusicDirectory),
"*.wav;*.aif;*.aiff;*.flac;*.mp3;*.ogg"};
static constexpr int kToolbarH = 36;
void onLiveClicked ();
void onFileClicked ();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginEditor)
};