diff --git a/modules/juce_data_structures/values/juce_Value.cpp b/modules/juce_data_structures/values/juce_Value.cpp index b455e35491..2435b96840 100644 --- a/modules/juce_data_structures/values/juce_Value.cpp +++ b/modules/juce_data_structures/values/juce_Value.cpp @@ -206,7 +206,7 @@ bool Value::operator!= (const Value& other) const } //============================================================================== -void Value::addListener (ValueListener* const listener) +void Value::addListener (Value::Listener* listener) { if (listener != nullptr) { @@ -217,7 +217,7 @@ void Value::addListener (ValueListener* const listener) } } -void Value::removeListener (ValueListener* const listener) +void Value::removeListener (Value::Listener* listener) { listeners.remove (listener); @@ -230,7 +230,7 @@ void Value::callListeners() if (listeners.size() > 0) { Value v (*this); // (create a copy in case this gets deleted by a callback) - listeners.call ([&] (ValueListener& l) { l.valueChanged (v); }); + listeners.call ([&] (Value::Listener& l) { l.valueChanged (v); }); } } diff --git a/modules/juce_data_structures/values/juce_Value.h b/modules/juce_data_structures/values/juce_Value.h index 8386740fe4..b2cd644395 100644 --- a/modules/juce_data_structures/values/juce_Value.h +++ b/modules/juce_data_structures/values/juce_Value.h @@ -237,7 +237,5 @@ private: /** Writes a Value to an OutputStream as a UTF8 string. */ OutputStream& JUCE_CALLTYPE operator<< (OutputStream&, const Value&); -/** This typedef is just for compatibility with old code - newer code should use the Value::Listener class directly. */ -typedef Value::Listener ValueListener; } // namespace juce diff --git a/modules/juce_gui_basics/buttons/juce_Button.h b/modules/juce_gui_basics/buttons/juce_Button.h index 242a87cdaa..72442a754f 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.h +++ b/modules/juce_gui_basics/buttons/juce_Button.h @@ -514,9 +514,5 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Button) }; -#ifndef DOXYGEN - /** This typedef is just for compatibility with old code and VC6 - newer code should use Button::Listener instead. */ - typedef Button::Listener ButtonListener; -#endif } // namespace juce diff --git a/modules/juce_gui_basics/layout/juce_ScrollBar.h b/modules/juce_gui_basics/layout/juce_ScrollBar.h index c4d7ec7878..f973640245 100644 --- a/modules/juce_gui_basics/layout/juce_ScrollBar.h +++ b/modules/juce_gui_basics/layout/juce_ScrollBar.h @@ -427,7 +427,5 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ScrollBar) }; -/** This typedef is just for compatibility with old code - newer code should use the ScrollBar::Listener class directly. */ -typedef ScrollBar::Listener ScrollBarListener; } // namespace juce diff --git a/modules/juce_gui_basics/menus/juce_MenuBarModel.h b/modules/juce_gui_basics/menus/juce_MenuBarModel.h index a4b7d9c0ec..bcf2bfe949 100644 --- a/modules/juce_gui_basics/menus/juce_MenuBarModel.h +++ b/modules/juce_gui_basics/menus/juce_MenuBarModel.h @@ -187,7 +187,5 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MenuBarModel) }; -/** This typedef is just for compatibility with old code - newer code should use the MenuBarModel::Listener class directly. */ -typedef MenuBarModel::Listener MenuBarModelListener; } // namespace juce diff --git a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp index 8f810cc3f1..0ddfd9524e 100644 --- a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp +++ b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp @@ -32,7 +32,7 @@ class TextPropertyComponent::LabelComp : public Label, { public: LabelComp (TextPropertyComponent& tpc, int charLimit, bool multiline, bool editable) - : Label (String(), String()), + : Label ({}, {}), owner (tpc), maxChars (charLimit), isMultiline (multiline) @@ -159,15 +159,8 @@ void TextPropertyComponent::textWasEdited() callListeners(); } -void TextPropertyComponent::addListener (TextPropertyComponentListener* const listener) -{ - listenerList.add (listener); -} - -void TextPropertyComponent::removeListener (TextPropertyComponentListener* const listener) -{ - listenerList.remove (listener); -} +void TextPropertyComponent::addListener (TextPropertyComponent::Listener* l) { listenerList.add (l); } +void TextPropertyComponent::removeListener (TextPropertyComponent::Listener* l) { listenerList.remove (l); } void TextPropertyComponent::callListeners() { diff --git a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h index abc7c10bd3..cb67290c45 100644 --- a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h +++ b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h @@ -156,9 +156,5 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TextPropertyComponent) }; -#ifndef DOXYGEN - /** This typedef is just for compatibility with old code and VC6 - newer code should use TextPropertyComponent::Listener instead. */ - typedef TextPropertyComponent::Listener TextPropertyComponentListener; -#endif } // namespace juce diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp index 5349a05ed1..225944150f 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp @@ -623,8 +623,8 @@ void ComboBox::setScrollWheelEnabled (bool enabled) noexcept } //============================================================================== -void ComboBox::addListener (ComboBoxListener* listener) { listeners.add (listener); } -void ComboBox::removeListener (ComboBoxListener* listener) { listeners.remove (listener); } +void ComboBox::addListener (ComboBox::Listener* l) { listeners.add (l); } +void ComboBox::removeListener (ComboBox::Listener* l) { listeners.remove (l); } void ComboBox::handleAsyncUpdate() { diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.h b/modules/juce_gui_basics/widgets/juce_ComboBox.h index 042fc9e0c5..2790953c8d 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.h +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.h @@ -447,7 +447,5 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComboBox) }; -/** This typedef is just for compatibility with old code - newer code should use the ComboBox::Listener class directly. */ -typedef ComboBox::Listener ComboBoxListener; } // namespace juce diff --git a/modules/juce_gui_basics/widgets/juce_Label.cpp b/modules/juce_gui_basics/widgets/juce_Label.cpp index 270195f64b..b1c3aa7e38 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.cpp +++ b/modules/juce_gui_basics/widgets/juce_Label.cpp @@ -190,7 +190,7 @@ void Label::textWasChanged() {} void Label::editorShown (TextEditor* textEditor) { Component::BailOutChecker checker (this); - listeners.callChecked (checker, [this, textEditor] (LabelListener& l) { l.editorShown (this, *textEditor); }); + listeners.callChecked (checker, [this, textEditor] (Label::Listener& l) { l.editorShown (this, *textEditor); }); } void Label::editorAboutToBeHidden (TextEditor* textEditor) @@ -199,7 +199,7 @@ void Label::editorAboutToBeHidden (TextEditor* textEditor) peer->dismissPendingTextInput(); Component::BailOutChecker checker (this); - listeners.callChecked (checker, [this, textEditor] (LabelListener& l) { l.editorHidden (this, *textEditor); }); + listeners.callChecked (checker, [this, textEditor] (Label::Listener& l) { l.editorHidden (this, *textEditor); }); } void Label::showEditor() @@ -395,15 +395,8 @@ KeyboardFocusTraverser* Label::createFocusTraverser() } //============================================================================== -void Label::addListener (LabelListener* listener) -{ - listeners.add (listener); -} - -void Label::removeListener (LabelListener* listener) -{ - listeners.remove (listener); -} +void Label::addListener (Label::Listener* l) { listeners.add (l); } +void Label::removeListener (Label::Listener* l) { listeners.remove (l); } void Label::callChangeListeners() { diff --git a/modules/juce_gui_basics/widgets/juce_Label.h b/modules/juce_gui_basics/widgets/juce_Label.h index b34cf3d4d8..0aee949994 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.h +++ b/modules/juce_gui_basics/widgets/juce_Label.h @@ -349,7 +349,5 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Label) }; -/** This typedef is just for compatibility with old code - newer code should use the Label::Listener class directly. */ -typedef Label::Listener LabelListener; } // namespace juce diff --git a/modules/juce_gui_basics/widgets/juce_Slider.h b/modules/juce_gui_basics/widgets/juce_Slider.h index 08dcd55232..c87f387f37 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.h +++ b/modules/juce_gui_basics/widgets/juce_Slider.h @@ -960,7 +960,5 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Slider) }; -/** This typedef is just for compatibility with old code - newer code should use the Slider::Listener class directly. */ -typedef Slider::Listener SliderListener; } // namespace juce diff --git a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h index bccb5bbfe2..f41962dec6 100644 --- a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h +++ b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h @@ -453,7 +453,5 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TableHeaderComponent) }; -/** This typedef is just for compatibility with old code - newer code should use the TableHeaderComponent::Listener class directly. */ -typedef TableHeaderComponent::Listener TableHeaderListener; } // namespace juce diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.h b/modules/juce_gui_basics/widgets/juce_TextEditor.h index a8d2a17ce9..ebf3231ee2 100644 --- a/modules/juce_gui_basics/widgets/juce_TextEditor.h +++ b/modules/juce_gui_basics/widgets/juce_TextEditor.h @@ -770,7 +770,5 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TextEditor) }; -/** This typedef is just for compatibility with old code - newer code should use the TextEditor::Listener class directly. */ -typedef TextEditor::Listener TextEditorListener; } // namespace juce diff --git a/modules/juce_video/capture/juce_CameraDevice.h b/modules/juce_video/capture/juce_CameraDevice.h index 18a19b5f7a..6c11e22ed1 100644 --- a/modules/juce_video/capture/juce_CameraDevice.h +++ b/modules/juce_video/capture/juce_CameraDevice.h @@ -159,11 +159,6 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CameraDevice) }; -#ifndef DOXYGEN - /** This typedef is just for compatibility with VC6 - newer code should use the CameraDevice::Listener class directly. */ - typedef CameraDevice::Listener CameraImageListener; -#endif - #endif } // namespace juce