diff --git a/src/gui/overlays/AboutScreen.h b/src/gui/overlays/AboutScreen.h index b082e24946f..5999380c6dd 100644 --- a/src/gui/overlays/AboutScreen.h +++ b/src/gui/overlays/AboutScreen.h @@ -65,6 +65,8 @@ struct AboutScreen : public juce::Component, std::unique_ptr copyButton; juce::Colour fillColour{juce::Colour(0, 0, 0).withAlpha(0.8f)}; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AboutScreen); }; } // namespace Overlays } // namespace Surge diff --git a/src/gui/overlays/LuaEditors.h b/src/gui/overlays/LuaEditors.h index 814b96953a8..8030710ca4b 100644 --- a/src/gui/overlays/LuaEditors.h +++ b/src/gui/overlays/LuaEditors.h @@ -59,6 +59,8 @@ class CodeEditorContainerWithApply : public juce::Component, SurgeStorage *storage; virtual void applyCode() = 0; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CodeEditorContainerWithApply); }; class FormulaModulatorEditor : public CodeEditorContainerWithApply @@ -73,6 +75,8 @@ class FormulaModulatorEditor : public CodeEditorContainerWithApply void applyCode() override; FormulaModulatorStorage *formulastorage; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FormulaModulatorEditor); }; class WavetablePreviewComponent; @@ -108,6 +112,8 @@ class WavetableEquationEditor : public CodeEditorContainerWithApply, void buttonClicked(juce::Button *button) override; OscillatorStorage *osc; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(WavetableEquationEditor); }; } // namespace Overlays diff --git a/src/gui/overlays/MSEGEditor.h b/src/gui/overlays/MSEGEditor.h index 5c68ccdb3bc..391e627431c 100644 --- a/src/gui/overlays/MSEGEditor.h +++ b/src/gui/overlays/MSEGEditor.h @@ -50,6 +50,8 @@ struct MSEGEditor : public juce::Component, std::unique_ptr controls; std::unique_ptr canvas; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MSEGEditor); }; } // namespace Overlays } // namespace Surge diff --git a/src/gui/overlays/MiniEdit.h b/src/gui/overlays/MiniEdit.h index b16da21489f..a15494ca8a0 100644 --- a/src/gui/overlays/MiniEdit.h +++ b/src/gui/overlays/MiniEdit.h @@ -49,6 +49,8 @@ struct MiniEdit : public juce::Component, void textEditorEscapeKeyPressed(juce::TextEditor &editor) override; void textEditorReturnKeyPressed(juce::TextEditor &editor) override; void grabFocus() { typein->grabKeyboardFocus(); } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MiniEdit); }; } // namespace Overlays } // namespace Surge diff --git a/src/gui/overlays/ModulationEditor.h b/src/gui/overlays/ModulationEditor.h index fceec8ff081..b554e1ca04f 100644 --- a/src/gui/overlays/ModulationEditor.h +++ b/src/gui/overlays/ModulationEditor.h @@ -41,6 +41,8 @@ class ModulationEditor : public juce::Component void paint(juce::Graphics &g) override; void resized() override; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ModulationEditor); }; } // namespace Overlays diff --git a/src/gui/overlays/OverlayWrapper.h b/src/gui/overlays/OverlayWrapper.h index d456388fb8b..14bacdab4b1 100644 --- a/src/gui/overlays/OverlayWrapper.h +++ b/src/gui/overlays/OverlayWrapper.h @@ -55,6 +55,8 @@ struct OverlayWrapper : public juce::Component, std::function closeOverlay = []() {}; void setCloseOverlay(std::function f) { closeOverlay = std::move(f); } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(OverlayWrapper); }; } // namespace Overlays } // namespace Surge diff --git a/src/gui/overlays/PatchDBViewer.h b/src/gui/overlays/PatchDBViewer.h index 2ebeac94646..d6f9ac83880 100644 --- a/src/gui/overlays/PatchDBViewer.h +++ b/src/gui/overlays/PatchDBViewer.h @@ -46,6 +46,8 @@ class PatchDBViewer : public juce::Component, public juce::TextEditor::Listener SurgeStorage *storage; SurgeGUIEditor *editor; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PatchDBViewer); }; } // namespace Overlays diff --git a/src/gui/overlays/PatchStoreDialog.h b/src/gui/overlays/PatchStoreDialog.h index 7edd46f4483..d6225fd98e6 100644 --- a/src/gui/overlays/PatchStoreDialog.h +++ b/src/gui/overlays/PatchStoreDialog.h @@ -48,6 +48,8 @@ struct PatchStoreDialog : public juce::Component, std::unique_ptr okButton, cancelButton; std::unique_ptr storeTuningButton; std::unique_ptr storeTuningLabel; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PatchStoreDialog); }; } // namespace Overlays } // namespace Surge diff --git a/src/gui/overlays/TypeinParamEditor.h b/src/gui/overlays/TypeinParamEditor.h index 31a2037e5fb..e26ef1ce5fb 100644 --- a/src/gui/overlays/TypeinParamEditor.h +++ b/src/gui/overlays/TypeinParamEditor.h @@ -82,6 +82,8 @@ struct TypeinParamEditor : public juce::Component, // Text editor listener methods void textEditorReturnKeyPressed(juce::TextEditor &editor) override; void textEditorEscapeKeyPressed(juce::TextEditor &editor) override; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(TypeinParamEditor); }; } // namespace Overlays } // namespace Surge diff --git a/src/gui/widgets/EffectChooser.h b/src/gui/widgets/EffectChooser.h index 761a71ccd51..7f829390b0b 100644 --- a/src/gui/widgets/EffectChooser.h +++ b/src/gui/widgets/EffectChooser.h @@ -113,6 +113,8 @@ struct EffectChooser : public juce::Component, public WidgetBaseMixindisplayFont); g.drawText(label, getLocalBounds(), juce::Justification::centredLeft); } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(EffectLabel); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/LFOAndStepDisplay.h b/src/gui/widgets/LFOAndStepDisplay.h index d13e1eebffc..9aa97a9975e 100644 --- a/src/gui/widgets/LFOAndStepDisplay.h +++ b/src/gui/widgets/LFOAndStepDisplay.h @@ -125,6 +125,8 @@ struct LFOAndStepDisplay : public juce::Component, public WidgetBaseMixin ss_shift_left, ss_shift_right; int lfoTypeHover{-1}; int ss_shift_hover{-1}; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(LFOAndStepDisplay); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/MainFrame.h b/src/gui/widgets/MainFrame.h index da80cc66cc0..cf49b7455fb 100644 --- a/src/gui/widgets/MainFrame.h +++ b/src/gui/widgets/MainFrame.h @@ -27,6 +27,7 @@ namespace Widgets { struct MainFrame : public juce::Component { + MainFrame() : juce::Component() {} SurgeGUIEditor *editor{nullptr}; void setSurgeGUIEditor(SurgeGUIEditor *e) { editor = e; } @@ -44,6 +45,8 @@ struct MainFrame : public juce::Component } void mouseDown(const juce::MouseEvent &event) override; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MainFrame); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/MenuForDiscreteParams.h b/src/gui/widgets/MenuForDiscreteParams.h index 46cd42e488d..76943cda164 100644 --- a/src/gui/widgets/MenuForDiscreteParams.h +++ b/src/gui/widgets/MenuForDiscreteParams.h @@ -120,6 +120,8 @@ struct MenuForDiscreteParams : public juce::Component, void setStorage(SurgeStorage *s) { storage = s; } float nextValueInOrder(float v, int inc); + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MenuForDiscreteParams); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/ModulatableSlider.h b/src/gui/widgets/ModulatableSlider.h index 50482521816..7ac1003b56a 100644 --- a/src/gui/widgets/ModulatableSlider.h +++ b/src/gui/widgets/ModulatableSlider.h @@ -134,6 +134,8 @@ struct ModulatableSlider : public juce::Component, juce::Rectangle handleSize; // Where do we position the tray relative to local bounds? juce::AffineTransform trayPosition; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ModulatableSlider); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/ModulationSourceButton.h b/src/gui/widgets/ModulationSourceButton.h index 9eec7296878..62b64c78720 100644 --- a/src/gui/widgets/ModulationSourceButton.h +++ b/src/gui/widgets/ModulationSourceButton.h @@ -132,6 +132,8 @@ struct ModulationSourceButton : public juce::Component, void mouseDrag(const juce::MouseEvent &event) override; void mouseWheelMove(const juce::MouseEvent &event, const juce::MouseWheelDetails &wheel) override; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ModulationSourceButton); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/MultiSwitch.h b/src/gui/widgets/MultiSwitch.h index 3da2ce6086d..316dffd6101 100644 --- a/src/gui/widgets/MultiSwitch.h +++ b/src/gui/widgets/MultiSwitch.h @@ -79,6 +79,8 @@ struct MultiSwitch : public juce::Component, public WidgetBaseMixin void setSwitchDrawable(SurgeImage *d) { switchD = d; } void setHoverSwitchDrawable(SurgeImage *d) { hoverSwitchD = d; } void setHoverOnSwitchDrawable(SurgeImage *d) { hoverOnSwitchD = d; } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MultiSwitch); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/NumberField.h b/src/gui/widgets/NumberField.h index 8285d7e36dc..08ed68277a4 100644 --- a/src/gui/widgets/NumberField.h +++ b/src/gui/widgets/NumberField.h @@ -30,6 +30,8 @@ namespace Widgets { struct NumberField : public juce::Component, public WidgetBaseMixin { + NumberField() : juce::Component(), WidgetBaseMixin() {} + SurgeStorage *storage{nullptr}; void setStorage(SurgeStorage *s) { storage = s; } @@ -119,6 +121,8 @@ struct NumberField : public juce::Component, public WidgetBaseMixin textHoverColour = c; repaint(); } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NumberField); }; } // namespace Widgets diff --git a/src/gui/widgets/OscillatorWaveformDisplay.h b/src/gui/widgets/OscillatorWaveformDisplay.h index 233e2f4d1f6..b866bd09f8c 100644 --- a/src/gui/widgets/OscillatorWaveformDisplay.h +++ b/src/gui/widgets/OscillatorWaveformDisplay.h @@ -82,6 +82,8 @@ struct OscillatorWaveformDisplay : public juce::Component, public Surge::GUI::Sk void dismissCustomEditor(); void drawEditorBox(juce::Graphics &g, const std::string &s); std::unique_ptr customEditor; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(OscillatorWaveformDisplay); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/ParameterInfowindow.h b/src/gui/widgets/ParameterInfowindow.h index d89875d6325..f87ac5df560 100644 --- a/src/gui/widgets/ParameterInfowindow.h +++ b/src/gui/widgets/ParameterInfowindow.h @@ -78,6 +78,8 @@ struct ParameterInfowindow : public juce::Component, public Surge::GUI::SkinCons } void doHide(int afterIdles = -1); void idle(); + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ParameterInfowindow); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/PatchSelector.h b/src/gui/widgets/PatchSelector.h index 183501d7c97..143aa858514 100644 --- a/src/gui/widgets/PatchSelector.h +++ b/src/gui/widgets/PatchSelector.h @@ -97,6 +97,8 @@ struct PatchSelector : public juce::Component, public WidgetBaseMixin SurgeImage *switchD{nullptr}, *hoverSwitchD{nullptr}; void setSwitchDrawable(SurgeImage *d) { switchD = d; } void setHoverSwitchDrawable(SurgeImage *d) { hoverSwitchD = d; } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Switch); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/VerticalLabel.h b/src/gui/widgets/VerticalLabel.h index 7ae28952256..7a41abbb9ed 100644 --- a/src/gui/widgets/VerticalLabel.h +++ b/src/gui/widgets/VerticalLabel.h @@ -53,6 +53,8 @@ struct VerticalLabel : public juce::Component fontColour = f; repaint(); } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(VerticalLabel); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/VuMeter.h b/src/gui/widgets/VuMeter.h index b39557bd34d..77944697615 100644 --- a/src/gui/widgets/VuMeter.h +++ b/src/gui/widgets/VuMeter.h @@ -44,6 +44,8 @@ struct VuMeter : public juce::Component, public WidgetBaseMixin void onSkinChanged() override; SurgeImage *hVuBars; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(VuMeter); }; } // namespace Widgets } // namespace Surge diff --git a/src/gui/widgets/WaveShaperSelector.h b/src/gui/widgets/WaveShaperSelector.h index 2814449d2f2..71dd928230f 100644 --- a/src/gui/widgets/WaveShaperSelector.h +++ b/src/gui/widgets/WaveShaperSelector.h @@ -53,6 +53,8 @@ struct WaveShaperSelector : public juce::Component, public WidgetBaseMixin buttonM, buttonP, buttonA, waveArea; static std::array>, n_ws_types> wsCurves; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(WaveShaperSelector); }; } // namespace Widgets diff --git a/src/gui/widgets/XMLConfiguredMenus.h b/src/gui/widgets/XMLConfiguredMenus.h index ee1c9af759c..61da26079db 100644 --- a/src/gui/widgets/XMLConfiguredMenus.h +++ b/src/gui/widgets/XMLConfiguredMenus.h @@ -150,6 +150,8 @@ struct OscillatorMenu : public juce::Component, int font_size{8}, text_hoffset{0}, text_voffset{0}; juce::Justification text_align{juce::Justification::centred}; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(OscillatorMenu); }; struct FxMenu : public juce::Component, public XMLMenuPopulator, public WidgetBaseMixin @@ -201,6 +203,8 @@ struct FxMenu : public juce::Component, public XMLMenuPopulator, public WidgetBa SurgeImage *bg{}, *bgHover{}; void setBackgroundDrawable(SurgeImage *b) { bg = b; }; void setHoverBackgroundDrawable(SurgeImage *bgh) { bgHover = bgh; } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FxMenu); }; } // namespace Widgets } // namespace Surge