Remove capture toggle button from editor. Also remove JS engine and dynamic object as those are not used currently.

This commit is contained in:
xenakios 2017-12-13 18:48:52 +02:00
parent bd1eabf3bf
commit e980344bb3
2 changed files with 5 additions and 11 deletions

View File

@ -39,9 +39,7 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor (Pa
addAndMakeVisible(m_parcomps.back().get()); addAndMakeVisible(m_parcomps.back().get());
} }
} }
addAndMakeVisible(&m_rec_enable);
m_rec_enable.setButtonText("Capture");
attachCallback(m_rec_enable, [this]() { processor.setRecordingEnabled(m_rec_enable.getToggleState()); });
//addAndMakeVisible(&m_specvis); //addAndMakeVisible(&m_specvis);
setSize (1000, 30+(pars.size()/2)*25+200); setSize (1000, 30+(pars.size()/2)*25+200);
m_wavecomponent.TimeSelectionChangedCallback = [this](Range<double> range, int which) m_wavecomponent.TimeSelectionChangedCallback = [this](Range<double> range, int which)
@ -74,9 +72,8 @@ void PaulstretchpluginAudioProcessorEditor::resized()
{ {
m_import_button.setBounds(1, 1, 60, 24); m_import_button.setBounds(1, 1, 60, 24);
m_import_button.changeWidthToFitText(); m_import_button.changeWidthToFitText();
m_rec_enable.setBounds(m_import_button.getRight()+1, 1, 10, 24);
m_rec_enable.changeWidthToFitText(); m_info_label.setBounds(m_import_button.getRight() + 1, m_import_button.getY(), getWidth()-m_import_button.getRight()-1, 24);
m_info_label.setBounds(m_rec_enable.getRight() + 1, m_rec_enable.getY(), getWidth()-m_rec_enable.getRight()-1, 24);
for (int i = 0; i < m_parcomps.size(); ++i) for (int i = 0; i < m_parcomps.size(); ++i)
{ {
@ -95,8 +92,6 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id)
{ {
for (auto& e : m_parcomps) for (auto& e : m_parcomps)
e->updateComponent(); e->updateComponent();
if (processor.isRecordingEnabled() != m_rec_enable.getToggleState())
m_rec_enable.setToggleState(processor.isRecordingEnabled(), dontSendNotification);
if (processor.isRecordingEnabled()) if (processor.isRecordingEnabled())
{ {
m_wavecomponent.setRecordingPosition(processor.getRecordingPositionPercent()); m_wavecomponent.setRecordingPosition(processor.getRecordingPositionPercent());

View File

@ -274,12 +274,11 @@ private:
PaulstretchpluginAudioProcessor& processor; PaulstretchpluginAudioProcessor& processor;
std::vector<std::shared_ptr<ParameterComponent>> m_parcomps; std::vector<std::shared_ptr<ParameterComponent>> m_parcomps;
SpectralVisualizer m_specvis; SpectralVisualizer m_specvis;
ToggleButton m_rec_enable;
TextButton m_import_button; TextButton m_import_button;
Label m_info_label; Label m_info_label;
void chooseFile(); void chooseFile();
JavascriptEngine m_js_engine;
MyDynamicObject m_js_object;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessorEditor) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessorEditor)
}; };