wavetable/plugin/Source/PluginEditor.cpp

52 lines
1.2 KiB
C++
Raw Normal View History

2020-05-20 16:44:46 -07:00
#include "PluginProcessor.h"
#include "PluginEditor.h"
//==============================================================================
WavetableAudioProcessorEditor::WavetableAudioProcessorEditor (WavetableAudioProcessor& p)
2023-08-23 08:45:23 -07:00
: ProcessorEditor (p), vaProc (p)
2020-05-20 16:44:46 -07:00
{
2023-08-23 08:45:23 -07:00
addAndMakeVisible (editor);
2020-05-20 16:44:46 -07:00
2023-08-23 08:45:23 -07:00
setSize (901, 753);
2020-05-20 16:44:46 -07:00
}
WavetableAudioProcessorEditor::~WavetableAudioProcessorEditor()
{
}
//==============================================================================
2023-08-25 09:47:50 -07:00
void WavetableAudioProcessorEditor::showAboutInfo()
{
#if JUCE_DEBUG
if (inspector == nullptr)
{
inspector = std::make_unique<melatonin::Inspector> (*this);
inspector->setVisible(true);
}
else
{
inspector = nullptr;
}
#else
ProcessorEditor::showAboutInfo();
#endif
}
2023-08-23 08:45:23 -07:00
void WavetableAudioProcessorEditor::paint (juce::Graphics& g)
2020-05-20 16:44:46 -07:00
{
ProcessorEditor::paint (g);
2023-08-23 08:45:23 -07:00
titleBar.setShowBrowser (true);
2020-05-20 16:44:46 -07:00
2023-08-23 08:45:23 -07:00
g.fillAll (findColour (gin::PluginLookAndFeel::blackColourId));
2020-05-20 16:44:46 -07:00
}
void WavetableAudioProcessorEditor::resized()
{
ProcessorEditor::resized ();
2023-08-23 08:45:23 -07:00
auto rc = getLocalBounds().reduced (1);
rc.removeFromTop (40);
2020-05-20 16:44:46 -07:00
2023-08-23 08:45:23 -07:00
editor.setBounds (rc);
2020-05-20 16:44:46 -07:00
}