MCPcopy Create free account
hub / github.com/jerryuhoo/Fire / ModulationMatrixRow

Class ModulationMatrixRow

Source/Panels/ControlPanel/ModulationMatrixPanel.h:38–68  ·  view source on GitHub ↗

A single row in our modulation matrix UI.

Source from the content-addressed store, hash-verified

36// A single row in our modulation matrix UI.
37//
38class ModulationMatrixRow : public juce::Component,
39 public juce::Button::Listener,
40 public juce::Slider::Listener,
41 public juce::ComboBox::Listener
42{
43public:
44 // The constructor now accepts a callback function to handle its deletion.
45 ModulationMatrixRow(FireAudioProcessor& p, int routingIndex, std::function<void()> onDelete);
46 ~ModulationMatrixRow() override;
47
48 void resized() override;
49
50private:
51 void buttonClicked(juce::Button* button) override;
52 void sliderValueChanged(juce::Slider* slider) override;
53 void comboBoxChanged(juce::ComboBox* comboBox) override;
54
55 FireAudioProcessor& processor;
56 FireLookAndFeel fireLookAndFeel;
57 int index; // The index of the routing this row represents in the processor's array
58 std::function<void()> onDeleteCallback; // The function to call when the delete button is pressed.
59
60 juce::ComboBox sourceMenu;
61 juce::Slider amountSlider;
62 juce::TextButton bipolarButton;
63 juce::TextButton bypassButton;
64 juce::ComboBox destinationMenu;
65 juce::TextButton removeButton;
66
67 std::vector<ModulationTarget> allPossibleTargets;
68};
69
70//
71// The main panel that holds all the modulation routing rows.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected