WE Core
Loading...
Searching...
No Matches
CoreProcessorEditor.h
Go to the documentation of this file.
1/*
2 * File: CoreProcessorEditor.h
3 *
4 * Version: 1.0.0
5 *
6 * Created: 18/03/2017
7 *
8 * This file is part of WECore.
9 *
10 * WECore is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * WECore is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with WECore. If not, see <http://www.gnu.org/licenses/>.
22 *
23 */
24
25#pragma once
26
27#include "../JuceLibraryCode/JuceHeader.h"
28#include "CoreAudioProcessor.h"
29
30namespace WECore::JUCEPlugin {
31
39class CoreProcessorEditor : public juce::AudioProcessorEditor,
41 public:
43 dynamic_cast<CoreAudioProcessor&>(processor).
44 removeParameterChangeListener(&_parameterListener);
45 }
46
47 protected:
49 : AudioProcessorEditor(ownerFilter) {
50 dynamic_cast<CoreAudioProcessor&>(processor).
51 addParameterChangeListener(&_parameterListener);
52 }
53
61 void _assignLookAndFeelToAllChildren(juce::LookAndFeel& defaultLookAndFeel) {
62 for (int iii {0}; iii < getNumChildComponents(); iii++) {
63 getChildComponent(iii)->setLookAndFeel(&defaultLookAndFeel);
64 }
65 }
66
74 for (int iii {0}; iii < getNumChildComponents(); iii++) {
75 getChildComponent(iii)->setLookAndFeel(nullptr);
76 }
77 }
78
79 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CoreProcessorEditor)
80 };
81}
CoreProcessorEditor(CoreAudioProcessor &ownerFilter)
void _assignLookAndFeelToAllChildren(juce::LookAndFeel &defaultLookAndFeel)