reVeno/Source/PluginEditor.cpp

39 lines
1,004 B
C++
Raw Normal View History

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
VenoAudioProcessorEditor::VenoAudioProcessorEditor (VenoAudioProcessor& p)
: AudioProcessorEditor (&p), processor (p)
{
m_id = p.m_id;
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
}
VenoAudioProcessorEditor::~VenoAudioProcessorEditor ()
{
LookAndFeel::setDefaultLookAndFeel (nullptr);
waveform.reset (nullptr);
delete m_look;
Config::getInstance ()->removeEditor (m_id);
2020-04-03 13:23:19 +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
}
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
}