2023-07-02 20:00:14 +00:00
|
|
|
#pragma once
|
|
|
|
#include <JuceHeader.h>
|
|
|
|
#include "../PluginProcessor.h"
|
|
|
|
#include "../audio/Effect.h"
|
|
|
|
#include "EffectComponent.h"
|
|
|
|
|
|
|
|
class LuaListComponent : public juce::Component
|
|
|
|
{
|
|
|
|
public:
|
2023-07-04 13:58:36 +00:00
|
|
|
LuaListComponent(OscirenderAudioProcessor& p, Effect& effect);
|
2023-07-02 20:00:14 +00:00
|
|
|
~LuaListComponent();
|
|
|
|
|
|
|
|
void resized() override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
std::shared_ptr<EffectComponent> effectComponent;
|
|
|
|
private:
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(LuaListComponent)
|
|
|
|
};
|
|
|
|
|
|
|
|
class LuaListBoxModel : public juce::ListBoxModel
|
|
|
|
{
|
|
|
|
public:
|
2023-07-04 13:58:36 +00:00
|
|
|
LuaListBoxModel(juce::ListBox& lb, OscirenderAudioProcessor& p) : listBox(lb), audioProcessor(p) {}
|
2023-07-02 20:00:14 +00:00
|
|
|
|
|
|
|
int getNumRows() override;
|
|
|
|
void paintListBoxItem(int rowNumber, juce::Graphics& g, int width, int height, bool rowIsSelected) override;
|
|
|
|
juce::Component* refreshComponentForRow(int sliderNum, bool isRowSelected, juce::Component *existingComponentToUpdate) override;
|
|
|
|
|
|
|
|
private:
|
2023-07-21 10:08:55 +00:00
|
|
|
int numSliders = 26;
|
2023-07-02 20:00:14 +00:00
|
|
|
juce::ListBox& listBox;
|
2023-07-04 13:58:36 +00:00
|
|
|
OscirenderAudioProcessor& audioProcessor;
|
2023-07-02 20:00:14 +00:00
|
|
|
};
|