juicysfplugin/Source/FilePicker.h

37 lines
829 B
C
Raw Normal View History

2018-02-27 08:25:20 +08:00
//
// Created by Alex Birch on 03/10/2017.
//
#pragma once
#include "../JuceLibraryCode/JuceHeader.h"
#include "FluidSynthModel.h"
2018-06-14 07:43:17 +08:00
#include "FilePickerFragment.h"
2018-02-27 08:25:20 +08:00
class FilePicker: public Component,
public FilePickerFragment,
2018-02-27 08:25:20 +08:00
private FilenameComponentListener
{
public:
FilePicker(
FluidSynthModel* fluidSynthModel
);
~FilePicker();
void resized() override;
void paint (Graphics& g) override;
virtual void setDisplayedFilePath(const String&) override;
2018-02-27 08:25:20 +08:00
private:
FilenameComponent fileChooser;
FluidSynthModel* fluidSynthModel;
String currentPath;
2018-02-27 08:25:20 +08:00
void filenameComponentChanged (FilenameComponent*) override;
bool shouldChangeDisplayedFilePath(const String &path);
2018-02-27 08:25:20 +08:00
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FilePicker)
};