From ab76ba29877ac3c2d5ba86cd959dc3194bfaaf1e Mon Sep 17 00:00:00 2001 From: xenakios Date: Wed, 26 Sep 2018 18:55:58 +0300 Subject: [PATCH] Initial work to add an audio file preview component for the audio file open dialog --- Source/PluginEditor.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index fcab4fd..11582c0 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -21,6 +21,31 @@ www.gnu.org/licenses #include #include "RenderSettingsComponent.h" +class AudioFilePreviewComponent : public FilePreviewComponent +{ +public: + AudioFilePreviewComponent(PaulstretchpluginAudioProcessor* p) : m_proc(p) + { + addAndMakeVisible(m_playbut); + m_playbut.setButtonText("Play"); + m_playbut.onClick = [this]() + { + + }; + setSize(100, 30); + } + void selectedFileChanged(const File &newSelectedFile) override + { + } + void resized() override + { + m_playbut.setBounds(0, 0, getWidth(), getHeight()); + } +private: + TextButton m_playbut; + PaulstretchpluginAudioProcessor* m_proc = nullptr; +}; + //============================================================================== PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(PaulstretchpluginAudioProcessor& p) : AudioProcessorEditor(&p),