2020-04-03 13:23:19 +02:00
|
|
|
#include "PluginProcessor.h"
|
|
|
|
#include "PluginEditor.h"
|
|
|
|
#include "Veno/Core/Config.h"
|
2020-06-13 10:56:20 +02:00
|
|
|
#include "Veno/Utils/Logger.h"
|
|
|
|
#include "Veno/Fonts/Fonts.h"
|
2020-04-03 13:23:19 +02:00
|
|
|
|
2020-06-13 16:52:16 +02:00
|
|
|
VenoAudioProcessorEditor::VenoAudioProcessorEditor (VenoAudioProcessor& p)
|
|
|
|
: AudioProcessorEditor (&p), processor (p)
|
|
|
|
{
|
2020-06-08 21:27:17 +02:00
|
|
|
m_id = p.m_id;
|
2020-06-13 16:52:16 +02:00
|
|
|
Config::getInstance ()->registerEditor (this, m_id);
|
|
|
|
LookAndFeel::setDefaultLookAndFeel (m_look);
|
|
|
|
waveform = std::make_unique<SidebarLCD> (m_id);
|
|
|
|
setSize (600, 400);
|
|
|
|
addAndMakeVisible (*waveform);
|
2020-04-03 13:23:19 +02:00
|
|
|
}
|
|
|
|
|
2020-06-13 16:52:16 +02:00
|
|
|
VenoAudioProcessorEditor::~VenoAudioProcessorEditor ()
|
|
|
|
{
|
|
|
|
LookAndFeel::setDefaultLookAndFeel (nullptr);
|
|
|
|
waveform.reset (nullptr);
|
2020-06-08 21:27:17 +02:00
|
|
|
delete m_look;
|
2020-06-13 16:52:16 +02:00
|
|
|
Config::getInstance ()->removeEditor (m_id);
|
2020-04-03 13:23:19 +02:00
|
|
|
}
|
|
|
|
|
2020-06-13 16:52:16 +02:00
|
|
|
void VenoAudioProcessorEditor::paint (Graphics& g)
|
|
|
|
{
|
|
|
|
g.setFont (*VenoFonts::getNormal ());
|
|
|
|
g.fillAll (Colour (0, 0, 0));
|
2020-04-03 13:23:19 +02:00
|
|
|
}
|
|
|
|
|
2020-06-13 16:52:16 +02:00
|
|
|
void VenoAudioProcessorEditor::resized ()
|
|
|
|
{
|
|
|
|
if (waveform != nullptr)
|
|
|
|
{
|
|
|
|
waveform->setBounds (0, 0, getWidth (), getHeight ());
|
2020-06-13 10:56:20 +02:00
|
|
|
}
|
2020-04-03 13:23:19 +02:00
|
|
|
}
|