mirror of
https://codeberg.org/armin/monoslicer.git
synced 2026-10-11 21:11:53 +02:00
Support text drag-and-drop of files and validate extensions via format manager
This commit is contained in:
parent
c10df9642c
commit
7630bb93fc
5 changed files with 89 additions and 10 deletions
|
|
@ -102,6 +102,7 @@ private:
|
|||
|
||||
class MonoslicerEditor : public juce::AudioProcessorEditor,
|
||||
public juce::FileDragAndDropTarget,
|
||||
public juce::TextDragAndDropTarget,
|
||||
private juce::Button::Listener,
|
||||
private juce::ComboBox::Listener,
|
||||
private juce::Timer
|
||||
|
|
@ -118,6 +119,12 @@ public:
|
|||
void fileDragMove(const juce::StringArray& files, int x, int y) override;
|
||||
void fileDragExit(const juce::StringArray& files) override;
|
||||
void filesDropped(const juce::StringArray& files, int x, int y) override;
|
||||
|
||||
bool isInterestedInTextDrag(const juce::String& text) override;
|
||||
void textDragEnter(const juce::String& text, int x, int y) override;
|
||||
void textDragExit(const juce::String& text) override;
|
||||
void textDropped(const juce::String& text, int x, int y) override;
|
||||
|
||||
void buttonClicked(juce::Button* button) override;
|
||||
void comboBoxChanged(juce::ComboBox* comboBoxThatHasChanged) override;
|
||||
void timerCallback() override;
|
||||
|
|
@ -214,6 +221,7 @@ private:
|
|||
void setupSlider(juce::Slider& slider, juce::Label& label, const juce::String& name);
|
||||
void attachSlider(juce::Slider& slider, juce::Label& label, const juce::String& name,
|
||||
const juce::String& paramId, std::unique_ptr<SliderAttachment>& attachment);
|
||||
void handleDroppedSample(const juce::File& file);
|
||||
|
||||
int keyClickNote = -1;
|
||||
DropOverlay dropOverlay;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue