==============================================================================
| 13 | |
| 14 | //============================================================================== |
| 15 | GlobalPanel::GlobalPanel(FireAudioProcessor& p, |
| 16 | std::function<void(ModulatableSlider*)> onModDragStart, |
| 17 | std::function<void(ModulatableSlider*)> onModDragMove, |
| 18 | std::function<void(ModulatableSlider*)> onModDragEnd, |
| 19 | std::function<void(ModulatableSlider*)> onHoverStart, |
| 20 | std::function<void(ModulatableSlider*)> onHoverEnd) |
| 21 | : PanelBase(p) |
| 22 | { |
| 23 | createSliders(); |
| 24 | createLabels(); |
| 25 | createButtons(); |
| 26 | createComboBoxes(); |
| 27 | |
| 28 | addAndMakeVisible(oscilloscope); |
| 29 | addAndMakeVisible(vuPanel); |
| 30 | addAndMakeVisible(widthGraph); |
| 31 | |
| 32 | vuPanel.setFocusBandNum(-1); |
| 33 | |
| 34 | // Assign callbacks to all modulatable sliders in this panel |
| 35 | for (auto& sliderPair : modulatableSliderComponents) |
| 36 | { |
| 37 | auto* slider = sliderPair.second.get(); |
| 38 | slider->onModDragStart = onModDragStart; |
| 39 | slider->onModDragMove = onModDragMove; |
| 40 | slider->onModDragEnd = onModDragEnd; |
| 41 | slider->onHoverStart = onHoverStart; |
| 42 | slider->onHoverEnd = onHoverEnd; |
| 43 | } |
| 44 | |
| 45 | setupComponentGroups(); |
| 46 | |
| 47 | updateAttachments(); |
| 48 | |
| 49 | // init state |
| 50 | setBypassState(0, filterBypassButton->getToggleState()); |
| 51 | setBypassState(1, downsampleBypassButton->getToggleState()); |
| 52 | |
| 53 | // init visibility |
| 54 | setVisibility(downsampleComponents, false); |
| 55 | setVisibility(graphComponents, false); |
| 56 | |
| 57 | // Set the default filter type to Low Cut before the panel is shown |
| 58 | filterLowCutButton.setToggleState(true, juce::dontSendNotification); |
| 59 | |
| 60 | // Set initial switch state and trigger visibility update using buttonClicked |
| 61 | filterSwitch.setToggleState(true, juce::dontSendNotification); |
| 62 | buttonClicked(&filterSwitch); |
| 63 | } |
| 64 | |
| 65 | GlobalPanel::~GlobalPanel() |
| 66 | { |
nothing calls this directly
no test coverage detected