Browse Source

Warnings: Add missing overrides

v7.0.12
reuk 2 years ago
parent
commit
047448fbce
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
84 changed files with 632 additions and 629 deletions
  1. +3
    -3
      examples/GUI/WidgetsDemo.h
  2. +4
    -4
      examples/GUI/WindowsDemo.h
  3. +3
    -3
      examples/Utilities/Box2DDemo.h
  4. +1
    -1
      extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp
  5. +1
    -1
      extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h
  6. +2
    -2
      extras/Projucer/Source/CodeEditor/jucer_OpenDocumentManager.h
  7. +12
    -12
      extras/Projucer/Source/ComponentEditor/Components/jucer_ButtonHandler.h
  8. +14
    -14
      extras/Projucer/Source/ComponentEditor/Components/jucer_ComboBoxHandler.h
  9. +6
    -6
      extras/Projucer/Source/ComponentEditor/Components/jucer_ComponentNameProperty.h
  10. +7
    -7
      extras/Projucer/Source/ComponentEditor/Components/jucer_ComponentTypeHandler.cpp
  11. +1
    -1
      extras/Projucer/Source/ComponentEditor/Components/jucer_ComponentUndoableAction.h
  12. +4
    -4
      extras/Projucer/Source/ComponentEditor/Components/jucer_GenericComponentHandler.h
  13. +4
    -4
      extras/Projucer/Source/ComponentEditor/Components/jucer_GroupComponentHandler.h
  14. +2
    -2
      extras/Projucer/Source/ComponentEditor/Components/jucer_HyperlinkButtonHandler.h
  15. +4
    -4
      extras/Projucer/Source/ComponentEditor/Components/jucer_ImageButtonHandler.h
  16. +6
    -6
      extras/Projucer/Source/ComponentEditor/Components/jucer_JucerComponentHandler.h
  17. +20
    -20
      extras/Projucer/Source/ComponentEditor/Components/jucer_LabelHandler.h
  18. +36
    -37
      extras/Projucer/Source/ComponentEditor/Components/jucer_TabbedComponentHandler.h
  19. +22
    -22
      extras/Projucer/Source/ComponentEditor/Components/jucer_TextEditorHandler.h
  20. +4
    -4
      extras/Projucer/Source/ComponentEditor/Components/jucer_ToggleButtonHandler.h
  21. +8
    -8
      extras/Projucer/Source/ComponentEditor/Components/jucer_TreeViewHandler.h
  22. +17
    -17
      extras/Projucer/Source/ComponentEditor/Components/jucer_ViewportHandler.h
  23. +4
    -4
      extras/Projucer/Source/ComponentEditor/Documents/jucer_ButtonDocument.cpp
  24. +14
    -14
      extras/Projucer/Source/ComponentEditor/Documents/jucer_ButtonDocument.h
  25. +12
    -12
      extras/Projucer/Source/ComponentEditor/Documents/jucer_ComponentDocument.h
  26. +26
    -26
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_ColouredElement.cpp
  27. +3
    -3
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_GradientPointComponent.h
  28. +4
    -4
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_ImageResourceProperty.h
  29. +8
    -8
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElement.cpp
  30. +2
    -2
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementEllipse.h
  31. +2
    -2
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementGroup.h
  32. +14
    -14
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementImage.h
  33. +17
    -17
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementPath.cpp
  34. +7
    -7
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementPath.h
  35. +2
    -2
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementRectangle.h
  36. +4
    -4
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementRoundedRectangle.h
  37. +18
    -18
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementText.h
  38. +1
    -1
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementUndoableAction.h
  39. +2
    -2
      extras/Projucer/Source/ComponentEditor/Properties/jucer_ComponentBooleanProperty.h
  40. +2
    -2
      extras/Projucer/Source/ComponentEditor/Properties/jucer_ComponentChoiceProperty.h
  41. +7
    -7
      extras/Projucer/Source/ComponentEditor/Properties/jucer_ComponentColourProperty.h
  42. +2
    -2
      extras/Projucer/Source/ComponentEditor/Properties/jucer_ComponentTextProperty.h
  43. +2
    -2
      extras/Projucer/Source/ComponentEditor/Properties/jucer_FontPropertyComponent.h
  44. +2
    -2
      extras/Projucer/Source/ComponentEditor/Properties/jucer_JustificationProperty.h
  45. +3
    -3
      extras/Projucer/Source/ComponentEditor/Properties/jucer_PositionPropertyBase.h
  46. +3
    -3
      extras/Projucer/Source/ComponentEditor/UI/jucer_ComponentLayoutPanel.h
  47. +5
    -5
      extras/Projucer/Source/ComponentEditor/UI/jucer_EditingPanelBase.cpp
  48. +2
    -2
      extras/Projucer/Source/ComponentEditor/UI/jucer_JucerDocumentEditor.cpp
  49. +13
    -13
      extras/Projucer/Source/ComponentEditor/UI/jucer_PaintRoutineEditor.h
  50. +3
    -3
      extras/Projucer/Source/ComponentEditor/UI/jucer_PaintRoutinePanel.h
  51. +1
    -1
      extras/Projucer/Source/ComponentEditor/UI/jucer_ResourceEditorPanel.cpp
  52. +11
    -11
      extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp
  53. +8
    -8
      extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp
  54. +1
    -1
      extras/Projucer/Source/Project/jucer_Project.h
  55. +1
    -1
      extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_LabelPropertyComponent.h
  56. +7
    -7
      modules/juce_audio_devices/native/juce_ALSA_linux.cpp
  57. +15
    -15
      modules/juce_audio_devices/native/juce_WASAPI_windows.cpp
  58. +13
    -13
      modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp
  59. +1
    -1
      modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp
  60. +19
    -17
      modules/juce_audio_utils/native/juce_AudioCDBurner_windows.cpp
  61. +8
    -8
      modules/juce_audio_utils/native/juce_AudioCDReader_windows.cpp
  62. +2
    -1
      modules/juce_box2d/juce_box2d.cpp
  63. +2
    -1
      modules/juce_box2d/juce_box2d.h
  64. +2
    -2
      modules/juce_core/containers/juce_AbstractFifo.cpp
  65. +74
    -74
      modules/juce_core/maths/juce_Expression.cpp
  66. +4
    -4
      modules/juce_core/native/juce_ComSmartPtr_windows.h
  67. +1
    -1
      modules/juce_dsp/containers/juce_SIMDRegister_test.cpp
  68. +6
    -6
      modules/juce_graphics/native/juce_DirectWriteTypeface_windows.cpp
  69. +1
    -1
      modules/juce_graphics/native/juce_Fonts_freetype.cpp
  70. +7
    -7
      modules/juce_graphics/native/juce_Fonts_windows.cpp
  71. +3
    -3
      modules/juce_gui_basics/layout/juce_TabbedComponent.cpp
  72. +12
    -12
      modules/juce_gui_basics/native/juce_DragAndDrop_windows.cpp
  73. +1
    -1
      modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp
  74. +2
    -2
      modules/juce_gui_basics/widgets/juce_TableListBox.cpp
  75. +50
    -50
      modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp
  76. +1
    -1
      modules/juce_opengl/opengl/juce_OpenGLContext.cpp
  77. +3
    -3
      modules/juce_osc/osc/juce_OSCAddress.cpp
  78. +1
    -1
      modules/juce_osc/osc/juce_OSCArgument.cpp
  79. +2
    -2
      modules/juce_osc/osc/juce_OSCBundle.cpp
  80. +1
    -1
      modules/juce_osc/osc/juce_OSCMessage.cpp
  81. +1
    -1
      modules/juce_osc/osc/juce_OSCReceiver.cpp
  82. +2
    -2
      modules/juce_osc/osc/juce_OSCSender.cpp
  83. +1
    -1
      modules/juce_osc/osc/juce_OSCTimeTag.cpp
  84. +3
    -3
      modules/juce_video/native/juce_CameraDevice_windows.h

+ 3
- 3
examples/GUI/WidgetsDemo.h View File

@@ -690,7 +690,7 @@ struct MenuPage final : public Component
{ {
void drawPopupMenuColumnSeparatorWithOptions (Graphics& g, void drawPopupMenuColumnSeparatorWithOptions (Graphics& g,
const Rectangle<int>& bounds, const Rectangle<int>& bounds,
const PopupMenu::Options& opt)
const PopupMenu::Options& opt) override
{ {
if (auto* target = opt.getTargetComponent()) if (auto* target = opt.getTargetComponent())
{ {
@@ -708,7 +708,7 @@ struct MenuPage final : public Component
} }
} }
void drawPopupMenuBackgroundWithOptions (Graphics& g, int, int, const PopupMenu::Options& opt)
void drawPopupMenuBackgroundWithOptions (Graphics& g, int, int, const PopupMenu::Options& opt) override
{ {
if (auto* target = opt.getTargetComponent()) if (auto* target = opt.getTargetComponent())
{ {
@@ -717,7 +717,7 @@ struct MenuPage final : public Component
} }
// Return the amount of space that should be left between popup menu columns. // Return the amount of space that should be left between popup menu columns.
int getPopupMenuColumnSeparatorWidthWithOptions (const PopupMenu::Options&)
int getPopupMenuColumnSeparatorWidthWithOptions (const PopupMenu::Options&) override
{ {
return 10; return 10;
} }


+ 4
- 4
examples/GUI/WindowsDemo.h View File

@@ -57,7 +57,7 @@ public:
: DocumentWindow (name, backgroundColour, buttonsNeeded) : DocumentWindow (name, backgroundColour, buttonsNeeded)
{} {}
void closeButtonPressed()
void closeButtonPressed() override
{ {
delete this; delete this;
} }
@@ -81,12 +81,12 @@ public:
setContentOwned (&selector, false); setContentOwned (&selector, false);
} }
~ColourSelectorWindow()
~ColourSelectorWindow() override
{ {
selector.removeChangeListener (this); selector.removeChangeListener (this);
} }
void closeButtonPressed()
void closeButtonPressed() override
{ {
delete this; delete this;
} }
@@ -96,7 +96,7 @@ private:
| ColourSelector::showSliders | ColourSelector::showSliders
| ColourSelector::showColourspace }; | ColourSelector::showColourspace };
void changeListenerCallback (ChangeBroadcaster* source)
void changeListenerCallback (ChangeBroadcaster* source) override
{ {
if (source == &selector) if (source == &selector)
setBackgroundColour (selector.getCurrentColour()); setBackgroundColour (selector.getCurrentColour());


+ 3
- 3
examples/Utilities/Box2DDemo.h View File

@@ -79,8 +79,8 @@ struct Settings
struct Test struct Test
{ {
Test() {}
virtual ~Test() {}
Test() = default;
virtual ~Test() = default;
virtual void Keyboard (unsigned char /*key*/) {} virtual void Keyboard (unsigned char /*key*/) {}
virtual void KeyboardUp (unsigned char /*key*/) {} virtual void KeyboardUp (unsigned char /*key*/) {}
@@ -88,7 +88,7 @@ struct Test
std::unique_ptr<b2World> m_world { new b2World (b2Vec2 (0.0f, -10.0f)) }; std::unique_ptr<b2World> m_world { new b2World (b2Vec2 (0.0f, -10.0f)) };
}; };
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wimplicit-int-float-conversion")
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wimplicit-int-float-conversion", "-Wsuggest-override")
#include "../Assets/Box2DTests/AddPair.h" #include "../Assets/Box2DTests/AddPair.h"
#include "../Assets/Box2DTests/ApplyForce.h" #include "../Assets/Box2DTests/ApplyForce.h"


+ 1
- 1
extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp View File

@@ -74,7 +74,7 @@
{ {
ScanJob (AUScanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {} ScanJob (AUScanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {}
JobStatus runJob()
JobStatus runJob() override
{ {
while (scanner.doNextScan() && ! shouldExit()) while (scanner.doNextScan() && ! shouldExit())
{} {}


+ 1
- 1
extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h View File

@@ -113,7 +113,7 @@ private:
{ {
PIPCreatorLookAndFeel() {} PIPCreatorLookAndFeel() {}
Rectangle<int> getPropertyComponentContentPosition (PropertyComponent& component)
Rectangle<int> getPropertyComponentContentPosition (PropertyComponent& component) override
{ {
auto textW = jmin (200, component.getWidth() / 3); auto textW = jmin (200, component.getWidth() / 3);
return { textW, 0, component.getWidth() - textW, component.getHeight() - 1 }; return { textW, 0, component.getWidth() - textW, component.getHeight() - 1 };


+ 2
- 2
extras/Projucer/Source/CodeEditor/jucer_OpenDocumentManager.h View File

@@ -138,7 +138,7 @@ class RecentDocumentList final : private OpenDocumentManager::DocumentCloseListe
{ {
public: public:
RecentDocumentList(); RecentDocumentList();
~RecentDocumentList();
~RecentDocumentList() override;
void clear(); void clear();
@@ -160,7 +160,7 @@ public:
std::unique_ptr<XmlElement> createXML() const; std::unique_ptr<XmlElement> createXML() const;
private: private:
bool documentAboutToClose (OpenDocumentManager::Document*);
bool documentAboutToClose (OpenDocumentManager::Document*) override;
Array<OpenDocumentManager::Document*> previousDocs, nextDocs; Array<OpenDocumentManager::Document*> previousDocs, nextDocs;
}; };

+ 12
- 12
extras/Projucer/Source/ComponentEditor/Components/jucer_ButtonHandler.h View File

@@ -204,7 +204,7 @@ private:
oldName = comp->getButtonText(); oldName = comp->getButtonText();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setButtonText (newName); getComponent()->setButtonText (newName);
@@ -212,7 +212,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setButtonText (oldName); getComponent()->setButtonText (oldName);
@@ -232,13 +232,13 @@ private:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.perform (new ButtonCallbackChangeAction (component, *document.getComponentLayout(), newState), document.perform (new ButtonCallbackChangeAction (component, *document.getComponentLayout(), newState),
"Change button callback"); "Change button callback");
} }
bool getState() const { return needsButtonListener (component); }
bool getState() const override { return needsButtonListener (component); }
private: private:
class ButtonCallbackChangeAction : public ComponentUndoableAction <Button> class ButtonCallbackChangeAction : public ComponentUndoableAction <Button>
@@ -251,7 +251,7 @@ private:
oldState = needsButtonListener (comp); oldState = needsButtonListener (comp);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
setNeedsButtonListener (getComponent(), newState); setNeedsButtonListener (getComponent(), newState);
@@ -259,7 +259,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
setNeedsButtonListener (getComponent(), oldState); setNeedsButtonListener (getComponent(), oldState);
@@ -301,7 +301,7 @@ private:
oldId = comp->getRadioGroupId(); oldId = comp->getRadioGroupId();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setRadioGroupId (newId); getComponent()->setRadioGroupId (newId);
@@ -309,7 +309,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setRadioGroupId (oldId); getComponent()->setRadioGroupId (oldId);
@@ -331,13 +331,13 @@ private:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.perform (new ButtonConnectedChangeAction (component, *document.getComponentLayout(), flag, newState), document.perform (new ButtonConnectedChangeAction (component, *document.getComponentLayout(), flag, newState),
"Change button connected edges"); "Change button connected edges");
} }
bool getState() const
bool getState() const override
{ {
return (component->getConnectedEdgeFlags() & flag) != 0; return (component->getConnectedEdgeFlags() & flag) != 0;
} }
@@ -356,7 +356,7 @@ private:
oldState = ((comp->getConnectedEdgeFlags() & flag) != 0); oldState = ((comp->getConnectedEdgeFlags() & flag) != 0);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
@@ -369,7 +369,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();


+ 14
- 14
extras/Projucer/Source/ComponentEditor/Components/jucer_ComboBoxHandler.h View File

@@ -197,13 +197,13 @@ private:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.perform (new ComboEditableChangeAction (component, *document.getComponentLayout(), newState), document.perform (new ComboEditableChangeAction (component, *document.getComponentLayout(), newState),
"Change combo box editability"); "Change combo box editability");
} }
bool getState() const
bool getState() const override
{ {
return component->isTextEditable(); return component->isTextEditable();
} }
@@ -219,7 +219,7 @@ private:
oldState = comp->isTextEditable(); oldState = comp->isTextEditable();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setEditableText (newState); getComponent()->setEditableText (newState);
@@ -227,7 +227,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setEditableText (oldState); getComponent()->setEditableText (oldState);
@@ -250,13 +250,13 @@ private:
{ {
} }
void setJustification (Justification newJustification)
void setJustification (Justification newJustification) override
{ {
document.perform (new ComboJustifyChangeAction (component, *document.getComponentLayout(), newJustification), document.perform (new ComboJustifyChangeAction (component, *document.getComponentLayout(), newJustification),
"Change combo box justification"); "Change combo box justification");
} }
Justification getJustification() const { return component->getJustificationType(); }
Justification getJustification() const override { return component->getJustificationType(); }
private: private:
ComboBox* const component; ComboBox* const component;
@@ -272,7 +272,7 @@ private:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setJustificationType (newState); getComponent()->setJustificationType (newState);
@@ -280,7 +280,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setJustificationType (oldState); getComponent()->setJustificationType (oldState);
@@ -322,7 +322,7 @@ private:
oldState = comp->getProperties() ["items"]; oldState = comp->getProperties() ["items"];
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->getProperties().set ("items", newState); getComponent()->getProperties().set ("items", newState);
@@ -331,7 +331,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->getProperties().set ("items", oldState); getComponent()->getProperties().set ("items", oldState);
@@ -374,7 +374,7 @@ private:
oldState = comp->getTextWhenNothingSelected(); oldState = comp->getTextWhenNothingSelected();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTextWhenNothingSelected (newState); getComponent()->setTextWhenNothingSelected (newState);
@@ -382,7 +382,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTextWhenNothingSelected (oldState); getComponent()->setTextWhenNothingSelected (oldState);
@@ -424,7 +424,7 @@ private:
oldState = comp->getTextWhenNoChoicesAvailable(); oldState = comp->getTextWhenNoChoicesAvailable();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTextWhenNoChoicesAvailable (newState); getComponent()->setTextWhenNoChoicesAvailable (newState);
@@ -432,7 +432,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTextWhenNoChoicesAvailable (oldState); getComponent()->setTextWhenNoChoicesAvailable (oldState);


+ 6
- 6
extras/Projucer/Source/ComponentEditor/Components/jucer_ComponentNameProperty.h View File

@@ -60,7 +60,7 @@ private:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setName (newName); getComponent()->setName (newName);
@@ -68,7 +68,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setName (oldName); getComponent()->setName (oldName);
@@ -110,14 +110,14 @@ private:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
layout.setComponentMemberVariableName (getComponent(), newName); layout.setComponentMemberVariableName (getComponent(), newName);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
layout.setComponentMemberVariableName (getComponent(), oldName); layout.setComponentMemberVariableName (getComponent(), oldName);
@@ -159,14 +159,14 @@ private:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
layout.setComponentVirtualClassName (getComponent(), newName); layout.setComponentVirtualClassName (getComponent(), newName);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
layout.setComponentVirtualClassName (getComponent(), oldName); layout.setComponentVirtualClassName (getComponent(), oldName);


+ 7
- 7
extras/Projucer/Source/ComponentEditor/Components/jucer_ComponentTypeHandler.cpp View File

@@ -300,7 +300,7 @@ private:
oldValue = ttc->getTooltip(); oldValue = ttc->getTooltip();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
@@ -314,7 +314,7 @@ private:
return false; return false;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
@@ -348,12 +348,12 @@ public:
document.addChangeListener (this); document.addChangeListener (this);
} }
~ComponentPositionProperty()
~ComponentPositionProperty() override
{ {
document.removeChangeListener (this); document.removeChangeListener (this);
} }
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{ {
auto* l = document.getComponentLayout(); auto* l = document.getComponentLayout();
@@ -363,7 +363,7 @@ public:
l->setComponentPosition (component, newPos, true); l->setComponentPosition (component, newPos, true);
} }
RelativePositionedRectangle getPosition() const
RelativePositionedRectangle getPosition() const override
{ {
return ComponentTypeHandler::getComponentPosition (component); return ComponentTypeHandler::getComponentPosition (component);
} }
@@ -439,7 +439,7 @@ private:
oldValue = comp->getExplicitFocusOrder(); oldValue = comp->getExplicitFocusOrder();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setExplicitFocusOrder (newValue); getComponent()->setExplicitFocusOrder (newValue);
@@ -447,7 +447,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setExplicitFocusOrder (oldValue); getComponent()->setExplicitFocusOrder (oldValue);


+ 1
- 1
extras/Projucer/Source/ComponentEditor/Components/jucer_ComponentUndoableAction.h View File

@@ -48,7 +48,7 @@ public:
return c; return c;
} }
int getSizeInUnits() { return 2; }
int getSizeInUnits() override { return 2; }
protected: protected:
ComponentLayout& layout; ComponentLayout& layout;


+ 4
- 4
extras/Projucer/Source/ComponentEditor/Components/jucer_GenericComponentHandler.h View File

@@ -169,7 +169,7 @@ private:
oldState = comp->actualClassName; oldState = comp->actualClassName;
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setClassName (newState); getComponent()->setClassName (newState);
@@ -177,7 +177,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setClassName (oldState); getComponent()->setClassName (oldState);
@@ -219,7 +219,7 @@ private:
oldState = comp->constructorParams; oldState = comp->constructorParams;
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setParams (newState); getComponent()->setParams (newState);
@@ -227,7 +227,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setParams (oldState); getComponent()->setParams (oldState);


+ 4
- 4
extras/Projucer/Source/ComponentEditor/Components/jucer_GroupComponentHandler.h View File

@@ -150,7 +150,7 @@ private:
oldName = comp->getText(); oldName = comp->getText();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setText (newName); getComponent()->setText (newName);
@@ -158,7 +158,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setText (oldName); getComponent()->setText (oldName);
@@ -215,7 +215,7 @@ private:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTextLabelPosition (newState); getComponent()->setTextLabelPosition (newState);
@@ -223,7 +223,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTextLabelPosition (oldState); getComponent()->setTextLabelPosition (oldState);


+ 2
- 2
extras/Projucer/Source/ComponentEditor/Components/jucer_HyperlinkButtonHandler.h View File

@@ -127,7 +127,7 @@ private:
oldState = comp->getURL(); oldState = comp->getURL();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setURL (newState); getComponent()->setURL (newState);
@@ -135,7 +135,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setURL (oldState); getComponent()->setURL (oldState);


+ 4
- 4
extras/Projucer/Source/ComponentEditor/Components/jucer_ImageButtonHandler.h View File

@@ -179,12 +179,12 @@ public:
{ {
} }
void setResource (const String& newName)
void setResource (const String& newName) override
{ {
setImageResource (layout, element, role, newName, true); setImageResource (layout, element, role, newName, true);
} }
String getResource() const
String getResource() const override
{ {
return getImageResource (element, role); return getImageResource (element, role);
} }
@@ -314,12 +314,12 @@ public:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
setImageKeepProportions (layout, component, newState, true); setImageKeepProportions (layout, component, newState, true);
} }
bool getState() const
bool getState() const override
{ {
return doesImageKeepProportions (component); return doesImageKeepProportions (component);
} }


+ 6
- 6
extras/Projucer/Source/ComponentEditor/Components/jucer_JucerComponentHandler.h View File

@@ -128,7 +128,7 @@ public:
oldState = comp->getFilename(); oldState = comp->getFilename();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setFilename (newState); getComponent()->setFilename (newState);
@@ -136,7 +136,7 @@ public:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setFilename (oldState); getComponent()->setFilename (oldState);
@@ -206,13 +206,13 @@ private:
{ {
} }
void buttonClicked()
void buttonClicked() override
{ {
if (ProjectContentComponent* const pcc = findParentComponentOfClass<ProjectContentComponent>()) if (ProjectContentComponent* const pcc = findParentComponentOfClass<ProjectContentComponent>())
pcc->showEditorForFile (component->findFile(), true); pcc->showEditorForFile (component->findFile(), true);
} }
String getButtonText() const
String getButtonText() const override
{ {
return "Open file for editing"; return "Open file for editing";
} }
@@ -249,7 +249,7 @@ private:
oldValue = comp->getConstructorParams(); oldValue = comp->getConstructorParams();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setConstructorParams (newValue); getComponent()->setConstructorParams (newValue);
@@ -258,7 +258,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setConstructorParams (oldValue); getComponent()->setConstructorParams (oldValue);


+ 20
- 20
extras/Projucer/Source/ComponentEditor/Components/jucer_LabelHandler.h View File

@@ -236,7 +236,7 @@ private:
oldState = comp->getText(); oldState = comp->getText();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setText (newState, dontSendNotification); getComponent()->setText (newState, dontSendNotification);
@@ -244,7 +244,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setText (oldState, dontSendNotification); getComponent()->setText (oldState, dontSendNotification);
@@ -268,13 +268,13 @@ private:
choices.add ("edit on double-click"); choices.add ("edit on double-click");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
document.perform (new LabelEditableChangeAction (component, *document.getComponentLayout(), newIndex), document.perform (new LabelEditableChangeAction (component, *document.getComponentLayout(), newIndex),
"Change Label editability"); "Change Label editability");
} }
int getIndex() const
int getIndex() const override
{ {
return component->isEditableOnSingleClick() return component->isEditableOnSingleClick()
? 1 ? 1
@@ -294,7 +294,7 @@ private:
: (comp->isEditableOnDoubleClick() ? 2 : 0); : (comp->isEditableOnDoubleClick() ? 2 : 0);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setEditable (newState == 1, newState >= 1, getComponent()->doesLossOfFocusDiscardChanges()); getComponent()->setEditable (newState == 1, newState >= 1, getComponent()->doesLossOfFocusDiscardChanges());
@@ -303,7 +303,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setEditable (oldState == 1, oldState >= 1, getComponent()->doesLossOfFocusDiscardChanges()); getComponent()->setEditable (oldState == 1, oldState >= 1, getComponent()->doesLossOfFocusDiscardChanges());
@@ -327,13 +327,13 @@ private:
choices.add ("loss of focus commits changes"); choices.add ("loss of focus commits changes");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
document.perform (new LabelFocusLossChangeAction (component, *document.getComponentLayout(), newIndex == 0), document.perform (new LabelFocusLossChangeAction (component, *document.getComponentLayout(), newIndex == 0),
"Change Label focus behaviour"); "Change Label focus behaviour");
} }
int getIndex() const
int getIndex() const override
{ {
return component->doesLossOfFocusDiscardChanges() ? 0 : 1; return component->doesLossOfFocusDiscardChanges() ? 0 : 1;
} }
@@ -349,7 +349,7 @@ private:
oldState = comp->doesLossOfFocusDiscardChanges(); oldState = comp->doesLossOfFocusDiscardChanges();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setEditable (getComponent()->isEditableOnSingleClick(), getComponent()->setEditable (getComponent()->isEditableOnSingleClick(),
@@ -359,7 +359,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setEditable (getComponent()->isEditableOnSingleClick(), getComponent()->setEditable (getComponent()->isEditableOnSingleClick(),
@@ -418,7 +418,7 @@ private:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setJustificationType (newState); getComponent()->setJustificationType (newState);
@@ -426,7 +426,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setJustificationType (oldState); getComponent()->setJustificationType (oldState);
@@ -483,7 +483,7 @@ private:
oldState = comp->getProperties().getWithDefault ("typefaceName", FontPropertyComponent::getDefaultFont()); oldState = comp->getProperties().getWithDefault ("typefaceName", FontPropertyComponent::getDefaultFont());
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->getProperties().set ("typefaceName", newState); getComponent()->getProperties().set ("typefaceName", newState);
@@ -492,7 +492,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->getProperties().set ("typefaceName", oldState); getComponent()->getProperties().set ("typefaceName", oldState);
@@ -552,7 +552,7 @@ private:
oldState = comp->getFont().getHeight(); oldState = comp->getFont().getHeight();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
Font f (getComponent()->getFont()); Font f (getComponent()->getFont());
@@ -562,7 +562,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
Font f (getComponent()->getFont()); Font f (getComponent()->getFont());
@@ -678,7 +678,7 @@ private:
oldState = comp->getFont(); oldState = comp->getFont();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setFont (newState); getComponent()->setFont (newState);
@@ -686,7 +686,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setFont (oldState); getComponent()->setFont (oldState);
@@ -748,7 +748,7 @@ private:
oldState = comp->getFont().getExtraKerningFactor(); oldState = comp->getFont().getExtraKerningFactor();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
Font f (getComponent()->getFont()); Font f (getComponent()->getFont());
@@ -758,7 +758,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
Font f (getComponent()->getFont()); Font f (getComponent()->getFont());


+ 36
- 37
extras/Projucer/Source/ComponentEditor/Components/jucer_TabbedComponentHandler.h View File

@@ -418,7 +418,7 @@ private:
choices.add ("Tabs at right"); choices.add ("Tabs at right");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
const TabbedButtonBar::Orientation orientations[] = { TabbedButtonBar::TabsAtTop, const TabbedButtonBar::Orientation orientations[] = { TabbedButtonBar::TabsAtTop,
TabbedButtonBar::TabsAtBottom, TabbedButtonBar::TabsAtBottom,
@@ -429,7 +429,7 @@ private:
"Change TabComponent orientation"); "Change TabComponent orientation");
} }
int getIndex() const
int getIndex() const override
{ {
switch (component->getOrientation()) switch (component->getOrientation())
{ {
@@ -454,7 +454,7 @@ private:
oldState = comp->getOrientation(); oldState = comp->getOrientation();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setOrientation (newState); getComponent()->setOrientation (newState);
@@ -462,7 +462,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setOrientation (oldState); getComponent()->setOrientation (oldState);
@@ -485,13 +485,13 @@ private:
choices.add ("Tab " + String (i) + ": \"" + comp->getTabNames() [i] + "\""); choices.add ("Tab " + String (i) + ": \"" + comp->getTabNames() [i] + "\"");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
document.perform (new InitialTabChangeAction (component, *document.getComponentLayout(), newIndex), document.perform (new InitialTabChangeAction (component, *document.getComponentLayout(), newIndex),
"Change initial tab"); "Change initial tab");
} }
int getIndex() const
int getIndex() const override
{ {
return component->getCurrentTabIndex(); return component->getCurrentTabIndex();
} }
@@ -507,7 +507,7 @@ private:
oldValue = comp->getCurrentTabIndex(); oldValue = comp->getCurrentTabIndex();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setCurrentTabIndex (newValue); getComponent()->setCurrentTabIndex (newValue);
@@ -515,7 +515,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setCurrentTabIndex (oldValue); getComponent()->setCurrentTabIndex (oldValue);
@@ -578,7 +578,7 @@ private:
oldState = comp->getTabBarDepth(); oldState = comp->getTabBarDepth();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTabBarDepth (newState); getComponent()->setTabBarDepth (newState);
@@ -586,7 +586,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTabBarDepth (oldState); getComponent()->setTabBarDepth (oldState);
@@ -609,13 +609,13 @@ private:
{ {
} }
void buttonClicked()
void buttonClicked() override
{ {
document.perform (new AddTabAction (component, *document.getComponentLayout()), document.perform (new AddTabAction (component, *document.getComponentLayout()),
"Add a new tab"); "Add a new tab");
} }
String getButtonText() const
String getButtonText() const override
{ {
return "Create a new tab"; return "Create a new tab";
} }
@@ -632,7 +632,7 @@ private:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
addNewTab (getComponent()); addNewTab (getComponent());
@@ -641,7 +641,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->removeTab (getComponent()->getNumTabs() - 1); getComponent()->removeTab (getComponent()->getNumTabs() - 1);
@@ -663,7 +663,7 @@ private:
{ {
} }
void buttonClicked()
void buttonClicked() override
{ {
const StringArray names (component->getTabNames()); const StringArray names (component->getTabNames());
@@ -681,7 +681,7 @@ private:
}); });
} }
String getButtonText() const
String getButtonText() const override
{ {
return "Delete a tab..."; return "Delete a tab...";
} }
@@ -700,7 +700,7 @@ private:
previousState = getTabState (comp, indexToRemove); previousState = getTabState (comp, indexToRemove);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
@@ -710,7 +710,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
addNewTab (getComponent(), indexToRemove); addNewTab (getComponent(), indexToRemove);
@@ -761,7 +761,7 @@ private:
oldValue = comp->getTabNames() [tabIndex]; oldValue = comp->getTabNames() [tabIndex];
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTabName (tabIndex, newValue); getComponent()->setTabName (tabIndex, newValue);
@@ -769,7 +769,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTabName (tabIndex, oldValue); getComponent()->setTabName (tabIndex, oldValue);
@@ -839,7 +839,7 @@ private:
oldValue = comp->getTabBackgroundColour (tabIndex); oldValue = comp->getTabBackgroundColour (tabIndex);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTabBackgroundColour (tabIndex, newValue); getComponent()->setTabBackgroundColour (tabIndex, newValue);
@@ -847,7 +847,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setTabBackgroundColour (tabIndex, oldValue); getComponent()->setTabBackgroundColour (tabIndex, oldValue);
@@ -873,13 +873,13 @@ private:
choices.add ("Named content component"); choices.add ("Named content component");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
document.perform (new TabContentTypeChangeAction (component, *document.getComponentLayout(), tabIndex, newIndex == 0), document.perform (new TabContentTypeChangeAction (component, *document.getComponentLayout(), tabIndex, newIndex == 0),
"Change tab content type"); "Change tab content type");
} }
int getIndex() const
int getIndex() const override
{ {
return isTabUsingJucerComp (component, tabIndex) ? 0 : 1; return isTabUsingJucerComp (component, tabIndex) ? 0 : 1;
} }
@@ -898,7 +898,7 @@ private:
oldValue = isTabUsingJucerComp (comp, tabIndex); oldValue = isTabUsingJucerComp (comp, tabIndex);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
setTabUsingJucerComp (getComponent(), tabIndex, newValue); setTabUsingJucerComp (getComponent(), tabIndex, newValue);
@@ -907,7 +907,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
setTabUsingJucerComp (getComponent(), tabIndex, oldValue); setTabUsingJucerComp (getComponent(), tabIndex, oldValue);
@@ -973,7 +973,7 @@ private:
oldState = getTabJucerFile (comp, tabIndex); oldState = getTabJucerFile (comp, tabIndex);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
setTabJucerFile (getComponent(), tabIndex, newState); setTabJucerFile (getComponent(), tabIndex, newState);
@@ -981,7 +981,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
setTabJucerFile (getComponent(), tabIndex, oldState); setTabJucerFile (getComponent(), tabIndex, oldState);
@@ -1029,7 +1029,7 @@ private:
oldValue = getTabClassName (comp, tabIndex); oldValue = getTabClassName (comp, tabIndex);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
setTabClassName (getComponent(), tabIndex, newValue); setTabClassName (getComponent(), tabIndex, newValue);
@@ -1038,7 +1038,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
setTabClassName (getComponent(), tabIndex, oldValue); setTabClassName (getComponent(), tabIndex, oldValue);
@@ -1087,7 +1087,7 @@ private:
oldValue = getTabConstructorParams (comp, tabIndex); oldValue = getTabConstructorParams (comp, tabIndex);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
setTabConstructorParams (getComponent(), tabIndex, newValue); setTabConstructorParams (getComponent(), tabIndex, newValue);
@@ -1096,7 +1096,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
setTabConstructorParams (getComponent(), tabIndex, oldValue); setTabConstructorParams (getComponent(), tabIndex, oldValue);
@@ -1122,10 +1122,9 @@ private:
tabIndex (tabIndex_), tabIndex (tabIndex_),
totalNumTabs (totalNumTabs_) totalNumTabs (totalNumTabs_)
{ {
} }
void buttonClicked()
void buttonClicked() override
{ {
PopupMenu m; PopupMenu m;
m.addItem (1, "Move this tab up", tabIndex > 0); m.addItem (1, "Move this tab up", tabIndex > 0);
@@ -1140,7 +1139,7 @@ private:
}); });
} }
String getButtonText() const
String getButtonText() const override
{ {
return "Move this tab..."; return "Move this tab...";
} }
@@ -1176,13 +1175,13 @@ private:
changed(); changed();
} }
bool perform()
bool perform() override
{ {
move (oldIndex, newIndex); move (oldIndex, newIndex);
return true; return true;
} }
bool undo()
bool undo() override
{ {
move (newIndex, oldIndex); move (newIndex, oldIndex);
return true; return true;


+ 22
- 22
extras/Projucer/Source/ComponentEditor/Components/jucer_TextEditorHandler.h View File

@@ -143,13 +143,13 @@ private:
choices.add ("multi-line, return key disabled"); choices.add ("multi-line, return key disabled");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
document.perform (new TextEditorMultilineChangeAction (component, *document.getComponentLayout(), newIndex), document.perform (new TextEditorMultilineChangeAction (component, *document.getComponentLayout(), newIndex),
"Change TextEditor multiline mode"); "Change TextEditor multiline mode");
} }
int getIndex() const
int getIndex() const override
{ {
return component->isMultiLine() ? (component->getReturnKeyStartsNewLine() ? 1 : 2) : 0; return component->isMultiLine() ? (component->getReturnKeyStartsNewLine() ? 1 : 2) : 0;
} }
@@ -165,7 +165,7 @@ private:
oldState = comp->isMultiLine() ? (comp->getReturnKeyStartsNewLine() ? 1 : 2) : 0; oldState = comp->isMultiLine() ? (comp->getReturnKeyStartsNewLine() ? 1 : 2) : 0;
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setMultiLine (newState > 0); getComponent()->setMultiLine (newState > 0);
@@ -174,7 +174,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setMultiLine (oldState > 0); getComponent()->setMultiLine (oldState > 0);
@@ -196,13 +196,13 @@ private:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.perform (new TextEditorReadonlyChangeAction (component, *document.getComponentLayout(), ! newState), document.perform (new TextEditorReadonlyChangeAction (component, *document.getComponentLayout(), ! newState),
"Change TextEditor read-only mode"); "Change TextEditor read-only mode");
} }
bool getState() const { return ! component->isReadOnly(); }
bool getState() const override { return ! component->isReadOnly(); }
private: private:
class TextEditorReadonlyChangeAction : public ComponentUndoableAction <TextEditor> class TextEditorReadonlyChangeAction : public ComponentUndoableAction <TextEditor>
@@ -215,7 +215,7 @@ private:
oldState = comp->isReadOnly(); oldState = comp->isReadOnly();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setReadOnly (newState); getComponent()->setReadOnly (newState);
@@ -223,7 +223,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setReadOnly (oldState); getComponent()->setReadOnly (oldState);
@@ -244,13 +244,13 @@ private:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.perform (new TextEditorScrollbarChangeAction (component, *document.getComponentLayout(), newState), document.perform (new TextEditorScrollbarChangeAction (component, *document.getComponentLayout(), newState),
"Change TextEditor scrollbars"); "Change TextEditor scrollbars");
} }
bool getState() const { return component->areScrollbarsShown(); }
bool getState() const override { return component->areScrollbarsShown(); }
private: private:
class TextEditorScrollbarChangeAction : public ComponentUndoableAction <TextEditor> class TextEditorScrollbarChangeAction : public ComponentUndoableAction <TextEditor>
@@ -263,7 +263,7 @@ private:
oldState = comp->areScrollbarsShown(); oldState = comp->areScrollbarsShown();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setScrollbarsShown (newState); getComponent()->setScrollbarsShown (newState);
@@ -271,7 +271,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setScrollbarsShown (oldState); getComponent()->setScrollbarsShown (oldState);
@@ -292,13 +292,13 @@ private:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.perform (new TextEditorCaretChangeAction (component, *document.getComponentLayout(), newState), document.perform (new TextEditorCaretChangeAction (component, *document.getComponentLayout(), newState),
"Change TextEditor caret"); "Change TextEditor caret");
} }
bool getState() const { return component->isCaretVisible(); }
bool getState() const override { return component->isCaretVisible(); }
private: private:
class TextEditorCaretChangeAction : public ComponentUndoableAction <TextEditor> class TextEditorCaretChangeAction : public ComponentUndoableAction <TextEditor>
@@ -311,7 +311,7 @@ private:
oldState = comp->isCaretVisible(); oldState = comp->isCaretVisible();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setCaretVisible (newState); getComponent()->setCaretVisible (newState);
@@ -319,7 +319,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setCaretVisible (oldState); getComponent()->setCaretVisible (oldState);
@@ -340,13 +340,13 @@ private:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.perform (new TextEditorPopupMenuChangeAction (component, *document.getComponentLayout(), newState), document.perform (new TextEditorPopupMenuChangeAction (component, *document.getComponentLayout(), newState),
"Change TextEditor popup menu"); "Change TextEditor popup menu");
} }
bool getState() const { return component->isPopupMenuEnabled(); }
bool getState() const override { return component->isPopupMenuEnabled(); }
private: private:
class TextEditorPopupMenuChangeAction : public ComponentUndoableAction <TextEditor> class TextEditorPopupMenuChangeAction : public ComponentUndoableAction <TextEditor>
@@ -359,7 +359,7 @@ private:
oldState = comp->isPopupMenuEnabled(); oldState = comp->isPopupMenuEnabled();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setPopupMenuEnabled (newState); getComponent()->setPopupMenuEnabled (newState);
@@ -367,7 +367,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setPopupMenuEnabled (oldState); getComponent()->setPopupMenuEnabled (oldState);
@@ -409,7 +409,7 @@ private:
oldState = comp->getProperties() ["initialText"]; oldState = comp->getProperties() ["initialText"];
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setText (newState, false); getComponent()->setText (newState, false);
@@ -418,7 +418,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setText (oldState, false); getComponent()->setText (oldState, false);


+ 4
- 4
extras/Projucer/Source/ComponentEditor/Components/jucer_ToggleButtonHandler.h View File

@@ -102,13 +102,13 @@ private:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.perform (new ToggleStateChangeAction (component, *document.getComponentLayout(), newState), document.perform (new ToggleStateChangeAction (component, *document.getComponentLayout(), newState),
"Change ToggleButton state"); "Change ToggleButton state");
} }
bool getState() const
bool getState() const override
{ {
return component->getToggleState(); return component->getToggleState();
} }
@@ -124,7 +124,7 @@ private:
oldState = comp->getToggleState(); oldState = comp->getToggleState();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setToggleState (newState, dontSendNotification); getComponent()->setToggleState (newState, dontSendNotification);
@@ -132,7 +132,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setToggleState (oldState, dontSendNotification); getComponent()->setToggleState (oldState, dontSendNotification);


+ 8
- 8
extras/Projucer/Source/ComponentEditor/Components/jucer_TreeViewHandler.h View File

@@ -168,13 +168,13 @@ private:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.perform (new TreeviewRootChangeAction (component, *document.getComponentLayout(), newState), document.perform (new TreeviewRootChangeAction (component, *document.getComponentLayout(), newState),
"Change TreeView root item"); "Change TreeView root item");
} }
bool getState() const
bool getState() const override
{ {
return component->isRootItemVisible(); return component->isRootItemVisible();
} }
@@ -190,7 +190,7 @@ private:
oldState = comp->isRootItemVisible(); oldState = comp->isRootItemVisible();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setRootItemVisible (newState); getComponent()->setRootItemVisible (newState);
@@ -198,7 +198,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setRootItemVisible (oldState); getComponent()->setRootItemVisible (oldState);
@@ -221,13 +221,13 @@ private:
choices.add ("Items closed by default"); choices.add ("Items closed by default");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
document.perform (new TreeviewOpennessChangeAction (component, *document.getComponentLayout(), newIndex == 0), document.perform (new TreeviewOpennessChangeAction (component, *document.getComponentLayout(), newIndex == 0),
"Change TreeView openness"); "Change TreeView openness");
} }
int getIndex() const
int getIndex() const override
{ {
return component->areItemsOpenByDefault() ? 0 : 1; return component->areItemsOpenByDefault() ? 0 : 1;
} }
@@ -243,7 +243,7 @@ private:
oldState = comp->areItemsOpenByDefault(); oldState = comp->areItemsOpenByDefault();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setDefaultOpenness (newState); getComponent()->setDefaultOpenness (newState);
@@ -251,7 +251,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setDefaultOpenness (oldState); getComponent()->setDefaultOpenness (oldState);


+ 17
- 17
extras/Projucer/Source/ComponentEditor/Components/jucer_ViewportHandler.h View File

@@ -266,7 +266,7 @@ private:
{ {
} }
void parentHierarchyChanged()
void parentHierarchyChanged() override
{ {
Viewport::parentHierarchyChanged(); Viewport::parentHierarchyChanged();
updateViewportContentComp (this); updateViewportContentComp (this);
@@ -301,13 +301,13 @@ private:
{ {
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.perform (new ViewportScrollbarChangeAction (component, *document.getComponentLayout(), vertical, newState), document.perform (new ViewportScrollbarChangeAction (component, *document.getComponentLayout(), vertical, newState),
"Change Viewport scrollbar"); "Change Viewport scrollbar");
} }
bool getState() const
bool getState() const override
{ {
return vertical ? component->isVerticalScrollBarShown() return vertical ? component->isVerticalScrollBarShown()
: component->isHorizontalScrollBarShown(); : component->isHorizontalScrollBarShown();
@@ -328,7 +328,7 @@ private:
: comp->isHorizontalScrollBarShown(); : comp->isHorizontalScrollBarShown();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
if (vertical) if (vertical)
@@ -340,7 +340,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
if (vertical) if (vertical)
@@ -407,7 +407,7 @@ private:
oldState = comp->getScrollBarThickness(); oldState = comp->getScrollBarThickness();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setScrollBarThickness (newState); getComponent()->setScrollBarThickness (newState);
@@ -415,7 +415,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setScrollBarThickness (newState); getComponent()->setScrollBarThickness (newState);
@@ -439,13 +439,13 @@ private:
choices.add ("Named content component"); choices.add ("Named content component");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
document.perform (new ViewportContentTypeChangeAction (component, *document.getComponentLayout(), newIndex), document.perform (new ViewportContentTypeChangeAction (component, *document.getComponentLayout(), newIndex),
"Change Viewport content type"); "Change Viewport content type");
} }
int getIndex() const
int getIndex() const override
{ {
return getViewportContentType (component); return getViewportContentType (component);
} }
@@ -461,7 +461,7 @@ private:
oldValue = getViewportContentType (comp); oldValue = getViewportContentType (comp);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
setViewportContentType (getComponent(), newValue); setViewportContentType (getComponent(), newValue);
@@ -470,7 +470,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
setViewportContentType (getComponent(), oldValue); setViewportContentType (getComponent(), oldValue);
@@ -538,7 +538,7 @@ private:
oldState = getViewportJucerComponentFile (comp); oldState = getViewportJucerComponentFile (comp);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
setViewportJucerComponentFile (getComponent(), newState); setViewportJucerComponentFile (getComponent(), newState);
@@ -546,7 +546,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
setViewportJucerComponentFile (getComponent(), oldState); setViewportJucerComponentFile (getComponent(), oldState);
@@ -589,7 +589,7 @@ private:
oldValue = getViewportGenericComponentClass (comp); oldValue = getViewportGenericComponentClass (comp);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
setViewportGenericComponentClass (getComponent(), newValue); setViewportGenericComponentClass (getComponent(), newValue);
@@ -598,7 +598,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
setViewportGenericComponentClass (getComponent(), oldValue); setViewportGenericComponentClass (getComponent(), oldValue);
@@ -642,7 +642,7 @@ private:
oldValue = getViewportConstructorParams (comp); oldValue = getViewportConstructorParams (comp);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
setViewportConstructorParams (getComponent(), newValue); setViewportConstructorParams (getComponent(), newValue);
@@ -651,7 +651,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
setViewportConstructorParams (getComponent(), oldValue); setViewportConstructorParams (getComponent(), oldValue);


+ 4
- 4
extras/Projucer/Source/ComponentEditor/Documents/jucer_ButtonDocument.cpp View File

@@ -233,23 +233,23 @@ public:
document.addChangeListener (this); document.addChangeListener (this);
} }
~ButtonStatePaintEnabledProperty()
~ButtonStatePaintEnabledProperty() override
{ {
document.removeChangeListener (this); document.removeChangeListener (this);
} }
void setState (bool newState)
void setState (bool newState) override
{ {
document.setStatePaintRoutineEnabled (stateMethod, newState); document.setStatePaintRoutineEnabled (stateMethod, newState);
} }
bool getState() const
bool getState() const override
{ {
return document.isStatePaintRoutineEnabled (stateMethod); return document.isStatePaintRoutineEnabled (stateMethod);
} }
private: private:
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{ {
refresh(); refresh();
} }


+ 14
- 14
extras/Projucer/Source/ComponentEditor/Documents/jucer_ButtonDocument.h View File

@@ -32,38 +32,38 @@ class ButtonDocument : public JucerDocument
{ {
public: public:
ButtonDocument (SourceCodeDocument* cpp); ButtonDocument (SourceCodeDocument* cpp);
~ButtonDocument();
~ButtonDocument() override;
//============================================================================== //==============================================================================
String getTypeName() const;
String getTypeName() const override;
JucerDocument* createCopy();
Component* createTestComponent (bool alwaysFillBackground);
JucerDocument* createCopy() override;
Component* createTestComponent (bool alwaysFillBackground) override;
int getNumPaintRoutines() const;
StringArray getPaintRoutineNames() const;
PaintRoutine* getPaintRoutine (int index) const;
int getNumPaintRoutines() const override;
StringArray getPaintRoutineNames() const override;
PaintRoutine* getPaintRoutine (int index) const override;
void setStatePaintRoutineEnabled (int index, bool b); void setStatePaintRoutineEnabled (int index, bool b);
bool isStatePaintRoutineEnabled (int index) const; bool isStatePaintRoutineEnabled (int index) const;
int chooseBestEnabledPaintRoutine (int paintRoutineWanted) const; int chooseBestEnabledPaintRoutine (int paintRoutineWanted) const;
ComponentLayout* getComponentLayout() const { return nullptr; }
ComponentLayout* getComponentLayout() const override { return nullptr; }
void addExtraClassProperties (PropertyPanel&);
void addExtraClassProperties (PropertyPanel&) override;
//============================================================================== //==============================================================================
std::unique_ptr<XmlElement> createXml() const;
bool loadFromXml (const XmlElement&);
std::unique_ptr<XmlElement> createXml() const override;
bool loadFromXml (const XmlElement&) override;
void fillInGeneratedCode (GeneratedCode& code) const;
void fillInPaintCode (GeneratedCode& code) const;
void fillInGeneratedCode (GeneratedCode& code) const override;
void fillInPaintCode (GeneratedCode& code) const override;
void getOptionalMethods (StringArray& baseClasses, void getOptionalMethods (StringArray& baseClasses,
StringArray& returnValues, StringArray& returnValues,
StringArray& methods, StringArray& methods,
StringArray& initialContents) const;
StringArray& initialContents) const override;
//============================================================================== //==============================================================================
std::unique_ptr<PaintRoutine> paintRoutines[7]; std::unique_ptr<PaintRoutine> paintRoutines[7];


+ 12
- 12
extras/Projucer/Source/ComponentEditor/Documents/jucer_ComponentDocument.h View File

@@ -32,26 +32,26 @@ class ComponentDocument : public JucerDocument
{ {
public: public:
ComponentDocument (SourceCodeDocument* cpp); ComponentDocument (SourceCodeDocument* cpp);
~ComponentDocument();
~ComponentDocument() override;
//============================================================================== //==============================================================================
String getTypeName() const;
String getTypeName() const override;
JucerDocument* createCopy();
Component* createTestComponent (bool alwaysFillBackground);
JucerDocument* createCopy() override;
Component* createTestComponent (bool alwaysFillBackground) override;
int getNumPaintRoutines() const { return 1; }
StringArray getPaintRoutineNames() const { return StringArray ("Graphics"); }
PaintRoutine* getPaintRoutine (int index) const { return index == 0 ? backgroundGraphics.get() : nullptr; }
int getNumPaintRoutines() const override { return 1; }
StringArray getPaintRoutineNames() const override { return StringArray ("Graphics"); }
PaintRoutine* getPaintRoutine (int index) const override { return index == 0 ? backgroundGraphics.get() : nullptr; }
ComponentLayout* getComponentLayout() const { return components.get(); }
ComponentLayout* getComponentLayout() const override { return components.get(); }
//============================================================================== //==============================================================================
std::unique_ptr<XmlElement> createXml() const;
bool loadFromXml (const XmlElement& xml);
std::unique_ptr<XmlElement> createXml() const override;
bool loadFromXml (const XmlElement& xml) override;
void fillInGeneratedCode (GeneratedCode& code) const;
void applyCustomPaintSnippets (StringArray&);
void fillInGeneratedCode (GeneratedCode& code) const override;
void applyCustomPaintSnippets (StringArray&) override;
private: private:
std::unique_ptr<ComponentLayout> components; std::unique_ptr<ComponentLayout> components;


+ 26
- 26
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_ColouredElement.cpp View File

@@ -49,7 +49,7 @@ public:
choices.add ("Image Brush"); choices.add ("Image Brush");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill
: listener.owner->getFillType()); : listener.owner->getFillType());
@@ -69,7 +69,7 @@ public:
listener.owner->setStrokeFill (fill, true); listener.owner->setStrokeFill (fill, true);
} }
int getIndex() const
int getIndex() const override
{ {
switch (isForStroke ? listener.owner->getStrokeType().fill.mode switch (isForStroke ? listener.owner->getStrokeType().fill.mode
: listener.owner->getFillType().mode) : listener.owner->getFillType().mode)
@@ -178,7 +178,7 @@ public:
listener.setPropertyToRefresh (*this); listener.setPropertyToRefresh (*this);
} }
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{ {
JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill
: listener.owner->getFillType()); : listener.owner->getFillType());
@@ -194,7 +194,7 @@ public:
listener.owner->setStrokeFill (fill, true); listener.owner->setStrokeFill (fill, true);
} }
RelativePositionedRectangle getPosition() const
RelativePositionedRectangle getPosition() const override
{ {
const JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill const JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill
: listener.owner->getFillType()); : listener.owner->getFillType());
@@ -220,8 +220,8 @@ public:
} }
//============================================================================== //==============================================================================
void setState (bool newState) { listener.owner->enableStroke (newState, true); }
bool getState() const { return listener.owner->isStrokeEnabled(); }
void setState (bool newState) override { listener.owner->enableStroke (newState, true); }
bool getState() const override { return listener.owner->isStrokeEnabled(); }
ElementListener<ColouredElement> listener; ElementListener<ColouredElement> listener;
}; };
@@ -237,7 +237,7 @@ public:
listener.setPropertyToRefresh (*this); listener.setPropertyToRefresh (*this);
} }
void setValue (double newValue)
void setValue (double newValue) override
{ {
listener.owner->getDocument()->getUndoManager().undoCurrentTransactionOnly(); listener.owner->getDocument()->getUndoManager().undoCurrentTransactionOnly();
@@ -247,7 +247,7 @@ public:
true); true);
} }
double getValue() const { return listener.owner->getStrokeType().stroke.getStrokeThickness(); }
double getValue() const override { return listener.owner->getStrokeType().stroke.getStrokeThickness(); }
ElementListener<ColouredElement> listener; ElementListener<ColouredElement> listener;
}; };
@@ -267,7 +267,7 @@ public:
choices.add ("beveled"); choices.add ("beveled");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
const PathStrokeType::JointStyle joints[] = { PathStrokeType::mitered, const PathStrokeType::JointStyle joints[] = { PathStrokeType::mitered,
PathStrokeType::curved, PathStrokeType::curved,
@@ -285,7 +285,7 @@ public:
true); true);
} }
int getIndex() const
int getIndex() const override
{ {
switch (listener.owner->getStrokeType().stroke.getJointStyle()) switch (listener.owner->getStrokeType().stroke.getJointStyle())
{ {
@@ -316,7 +316,7 @@ public:
choices.add ("round"); choices.add ("round");
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
const PathStrokeType::EndCapStyle ends[] = { PathStrokeType::butt, const PathStrokeType::EndCapStyle ends[] = { PathStrokeType::butt,
PathStrokeType::square, PathStrokeType::square,
@@ -334,7 +334,7 @@ public:
true); true);
} }
int getIndex() const
int getIndex() const override
{ {
switch (listener.owner->getStrokeType().stroke.getEndStyle()) switch (listener.owner->getStrokeType().stroke.getEndStyle())
{ {
@@ -362,7 +362,7 @@ public:
} }
//============================================================================== //==============================================================================
void setResource (const String& newName)
void setResource (const String& newName) override
{ {
if (element != nullptr) if (element != nullptr)
{ {
@@ -383,7 +383,7 @@ public:
} }
} }
String getResource() const
String getResource() const override
{ {
if (element == nullptr) if (element == nullptr)
return {}; return {};
@@ -414,7 +414,7 @@ public:
listener.setPropertyToRefresh (*this); listener.setPropertyToRefresh (*this);
} }
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{ {
if (isForStroke) if (isForStroke)
{ {
@@ -430,7 +430,7 @@ public:
} }
} }
RelativePositionedRectangle getPosition() const
RelativePositionedRectangle getPosition() const override
{ {
if (isForStroke) if (isForStroke)
return listener.owner->getStrokeType().fill.imageAnchor; return listener.owner->getStrokeType().fill.imageAnchor;
@@ -455,7 +455,7 @@ public:
listener.setPropertyToRefresh (*this); listener.setPropertyToRefresh (*this);
} }
void setValue (double newValue)
void setValue (double newValue) override
{ {
if (listener.owner != nullptr) if (listener.owner != nullptr)
{ {
@@ -478,7 +478,7 @@ public:
} }
} }
double getValue() const
double getValue() const override
{ {
if (listener.owner == nullptr) if (listener.owner == nullptr)
return 0; return 0;
@@ -616,14 +616,14 @@ public:
oldState = element->getFillType(); oldState = element->getFillType();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setFillType (newState, false); getElement()->setFillType (newState, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setFillType (oldState, false); getElement()->setFillType (oldState, false);
@@ -675,14 +675,14 @@ public:
oldState = element->isStrokeEnabled(); oldState = element->isStrokeEnabled();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->enableStroke (newState, false); getElement()->enableStroke (newState, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->enableStroke (oldState, false); getElement()->enableStroke (oldState, false);
@@ -732,14 +732,14 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setStrokeType (newState, false); getElement()->setStrokeType (newState, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setStrokeType (oldState, false); getElement()->setStrokeType (oldState, false);
@@ -778,14 +778,14 @@ public:
oldState = element->getStrokeType().fill; oldState = element->getStrokeType().fill;
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setStrokeFill (newState, false); getElement()->setStrokeFill (newState, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setStrokeFill (oldState, false); getElement()->setStrokeFill (oldState, false);


+ 3
- 3
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_GradientPointComponent.h View File

@@ -41,7 +41,7 @@ public:
{ {
} }
RelativePositionedRectangle getPosition()
RelativePositionedRectangle getPosition() override
{ {
ColouredElement* e = dynamic_cast<ColouredElement*> (owner); ColouredElement* e = dynamic_cast<ColouredElement*> (owner);
@@ -53,7 +53,7 @@ public:
: e->getFillType().gradPos2; : e->getFillType().gradPos2;
} }
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{ {
ColouredElement* e = dynamic_cast<ColouredElement*> (owner); ColouredElement* e = dynamic_cast<ColouredElement*> (owner);
@@ -81,7 +81,7 @@ public:
} }
} }
void updatePosition()
void updatePosition() override
{ {
PointComponent::updatePosition(); PointComponent::updatePosition();


+ 4
- 4
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_ImageResourceProperty.h View File

@@ -59,7 +59,7 @@ public:
document.addChangeListener (this); document.addChangeListener (this);
} }
~ImageResourceProperty()
~ImageResourceProperty() override
{ {
document.removeChangeListener (this); document.removeChangeListener (this);
} }
@@ -70,7 +70,7 @@ public:
virtual String getResource() const = 0; virtual String getResource() const = 0;
//============================================================================== //==============================================================================
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
if (newIndex == 0) if (newIndex == 0)
{ {
@@ -94,7 +94,7 @@ public:
} }
} }
int getIndex() const
int getIndex() const override
{ {
if (getResource().isEmpty()) if (getResource().isEmpty())
return -1; return -1;
@@ -102,7 +102,7 @@ public:
return choices.indexOf (getResource()); return choices.indexOf (getResource());
} }
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{ {
refresh(); refresh();
} }


+ 8
- 8
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElement.cpp View File

@@ -101,14 +101,14 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setPosition (newState, false); getElement()->setPosition (newState, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setPosition (oldState, false); getElement()->setPosition (oldState, false);
@@ -128,14 +128,14 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setBounds (newBounds); getElement()->setBounds (newBounds);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setBounds (oldBounds); getElement()->setBounds (oldBounds);
@@ -159,7 +159,7 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
@@ -170,7 +170,7 @@ public:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
@@ -309,7 +309,7 @@ public:
listener.setPropertyToRefresh (*this); listener.setPropertyToRefresh (*this);
} }
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{ {
if (element->getOwner()->getSelectedElements().getNumSelected() > 1) if (element->getOwner()->getSelectedElements().getNumSelected() > 1)
positionOtherSelectedElements (getPosition(), newPos); positionOtherSelectedElements (getPosition(), newPos);
@@ -317,7 +317,7 @@ public:
listener.owner->setPosition (newPos, true); listener.owner->setPosition (newPos, true);
} }
RelativePositionedRectangle getPosition() const
RelativePositionedRectangle getPosition() const override
{ {
return listener.owner->getPosition(); return listener.owner->getPosition();
} }


+ 2
- 2
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementEllipse.h View File

@@ -158,12 +158,12 @@ private:
{ {
} }
void buttonClicked()
void buttonClicked() override
{ {
element->convertToPath(); element->convertToPath();
} }
String getButtonText() const
String getButtonText() const override
{ {
return "convert to a path"; return "convert to a path";
} }


+ 2
- 2
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementGroup.h View File

@@ -73,8 +73,8 @@ private:
{ {
UngroupProperty (PaintElementGroup* const); UngroupProperty (PaintElementGroup* const);
void buttonClicked();
String getButtonText() const;
void buttonClicked() override;
String getButtonText() const override;
PaintElementGroup* element; PaintElementGroup* element;
}; };


+ 14
- 14
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementImage.h View File

@@ -58,8 +58,8 @@ public:
public: public:
SetResourceAction (PaintElementImage* const, const String&); SetResourceAction (PaintElementImage* const, const String&);
bool perform();
bool undo();
bool perform() override;
bool undo() override;
private: private:
String newResource, oldResource; String newResource, oldResource;
@@ -75,8 +75,8 @@ public:
public: public:
SetOpacityAction (PaintElementImage* const, double); SetOpacityAction (PaintElementImage* const, double);
bool perform();
bool undo();
bool perform() override;
bool undo() override;
private: private:
double newOpacity, oldOpacity; double newOpacity, oldOpacity;
@@ -96,8 +96,8 @@ public:
public: public:
SetStretchModeAction (PaintElementImage* const, StretchMode); SetStretchModeAction (PaintElementImage* const, StretchMode);
bool perform();
bool undo();
bool perform() override;
bool undo() override;
private: private:
StretchMode newValue, oldValue; StretchMode newValue, oldValue;
@@ -124,8 +124,8 @@ private:
public: public:
ImageElementResourceProperty (PaintElementImage* const); ImageElementResourceProperty (PaintElementImage* const);
void setResource (const String&);
String getResource() const;
void setResource (const String&) override;
String getResource() const override;
}; };
//============================================================================== //==============================================================================
@@ -134,8 +134,8 @@ private:
public: public:
OpacityProperty (PaintElementImage* const); OpacityProperty (PaintElementImage* const);
void setValue (double);
double getValue() const;
void setValue (double) override;
double getValue() const override;
ElementListener<PaintElementImage> listener; ElementListener<PaintElementImage> listener;
}; };
@@ -145,8 +145,8 @@ private:
public: public:
StretchModeProperty (PaintElementImage* const); StretchModeProperty (PaintElementImage* const);
void setIndex (int);
int getIndex() const;
void setIndex (int) override;
int getIndex() const override;
ElementListener<PaintElementImage> listener; ElementListener<PaintElementImage> listener;
}; };
@@ -156,8 +156,8 @@ private:
public: public:
ResetSizeProperty (PaintElementImage* const); ResetSizeProperty (PaintElementImage* const);
void buttonClicked();
String getButtonText() const;
void buttonClicked() override;
String getButtonText() const override;
private: private:
PaintElementImage* const element; PaintElementImage* const element;


+ 17
- 17
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementPath.cpp View File

@@ -52,12 +52,12 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
return changeTo (newValue); return changeTo (newValue);
} }
bool undo()
bool undo() override
{ {
return changeTo (oldValue); return changeTo (oldValue);
} }
@@ -748,14 +748,14 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setNonZeroWinding (newValue, false); getElement()->setNonZeroWinding (newValue, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setNonZeroWinding (oldValue, false); getElement()->setNonZeroWinding (oldValue, false);
@@ -846,7 +846,7 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
@@ -862,7 +862,7 @@ public:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
@@ -952,7 +952,7 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
@@ -963,7 +963,7 @@ public:
return path != nullptr; return path != nullptr;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
@@ -1292,17 +1292,17 @@ public:
owner->getDocument()->addChangeListener (this); owner->getDocument()->addChangeListener (this);
} }
~PathPointPositionProperty()
~PathPointPositionProperty() override
{ {
owner->getDocument()->removeChangeListener (this); owner->getDocument()->removeChangeListener (this);
} }
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{ {
owner->setPoint (index, pointNumber, newPos, true); owner->setPoint (index, pointNumber, newPos, true);
} }
RelativePositionedRectangle getPosition() const
RelativePositionedRectangle getPosition() const override
{ {
return owner->getPoint (index, pointNumber); return owner->getPoint (index, pointNumber);
} }
@@ -1328,22 +1328,22 @@ public:
choices.add ("Subpath is open-ended"); choices.add ("Subpath is open-ended");
} }
~PathPointClosedProperty()
~PathPointClosedProperty() override
{ {
owner->getDocument()->removeChangeListener (this); owner->getDocument()->removeChangeListener (this);
} }
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{ {
refresh(); refresh();
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
owner->setSubpathClosed (index, newIndex == 0, true); owner->setSubpathClosed (index, newIndex == 0, true);
} }
int getIndex() const
int getIndex() const override
{ {
return owner->isSubpathClosed (index) ? 0 : 1; return owner->isSubpathClosed (index) ? 0 : 1;
} }
@@ -1364,12 +1364,12 @@ public:
{ {
} }
void buttonClicked()
void buttonClicked() override
{ {
owner->addPoint (index, true); owner->addPoint (index, true);
} }
String getButtonText() const { return "Add new point"; }
String getButtonText() const override { return "Add new point"; }
private: private:
PaintElementPath* const owner; PaintElementPath* const owner;


+ 7
- 7
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementPath.h View File

@@ -152,17 +152,17 @@ public:
PathPointComponent (PaintElementPath* const path_, PathPointComponent (PaintElementPath* const path_,
int index, int pointNumber); int index, int pointNumber);
~PathPointComponent();
~PathPointComponent() override;
void updatePosition();
void updatePosition() override;
void showPopupMenu(); void showPopupMenu();
void paint (Graphics& g);
void mouseDown (const MouseEvent& e);
void mouseDrag (const MouseEvent& e);
void mouseUp (const MouseEvent& e);
void paint (Graphics& g) override;
void mouseDown (const MouseEvent& e) override;
void mouseDrag (const MouseEvent& e) override;
void mouseUp (const MouseEvent& e) override;
void changeListenerCallback (ChangeBroadcaster*);
void changeListenerCallback (ChangeBroadcaster*) override;
private: private:
PaintElementPath* const path; PaintElementPath* const path;


+ 2
- 2
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementRectangle.h View File

@@ -168,12 +168,12 @@ private:
{ {
} }
void buttonClicked()
void buttonClicked() override
{ {
element->convertToPath(); element->convertToPath();
} }
String getButtonText() const
String getButtonText() const override
{ {
return "convert to a path"; return "convert to a path";
} }


+ 4
- 4
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementRoundedRectangle.h View File

@@ -75,14 +75,14 @@ public:
oldSize = element->getCornerSize(); oldSize = element->getCornerSize();
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setCornerSize (newSize, false); getElement()->setCornerSize (newSize, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setCornerSize (oldSize, false); getElement()->setCornerSize (oldSize, false);
@@ -251,12 +251,12 @@ private:
{ {
} }
void buttonClicked()
void buttonClicked() override
{ {
element->convertToPath(); element->convertToPath();
} }
String getButtonText() const
String getButtonText() const override
{ {
return "convert to a path"; return "convert to a path";
} }


+ 18
- 18
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementText.h View File

@@ -176,14 +176,14 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setText (newText, false); getElement()->setText (newText, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setText (oldText, false); getElement()->setText (oldText, false);
@@ -224,14 +224,14 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setFont (newFont, false); getElement()->setFont (newFont, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setFont (oldFont, false); getElement()->setFont (oldFont, false);
@@ -270,14 +270,14 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setTypefaceName (newValue, false); getElement()->setTypefaceName (newValue, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setTypefaceName (oldValue, false); getElement()->setTypefaceName (oldValue, false);
@@ -317,14 +317,14 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setJustification (newValue, false); getElement()->setJustification (newValue, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getElement()->setJustification (oldValue, false); getElement()->setJustification (oldValue, false);
@@ -430,16 +430,16 @@ private:
element->getDocument()->addChangeListener (this); element->getDocument()->addChangeListener (this);
} }
~FontNameProperty()
~FontNameProperty() override
{ {
element->getDocument()->removeChangeListener (this); element->getDocument()->removeChangeListener (this);
} }
void setTypefaceName (const String& newFontName) { element->setTypefaceName (newFontName, true); }
String getTypefaceName() const { return element->getTypefaceName(); }
void setTypefaceName (const String& newFontName) override { element->setTypefaceName (newFontName, true); }
String getTypefaceName() const override { return element->getTypefaceName(); }
private: private:
void changeListenerCallback (ChangeBroadcaster*) { refresh(); }
void changeListenerCallback (ChangeBroadcaster*) override { refresh(); }
PaintElementText* const element; PaintElementText* const element;
}; };
@@ -458,7 +458,7 @@ private:
updateStylesList (element->getTypefaceName()); updateStylesList (element->getTypefaceName());
} }
~FontStyleProperty()
~FontStyleProperty() override
{ {
element->getDocument()->removeChangeListener (this); element->getDocument()->removeChangeListener (this);
} }
@@ -485,7 +485,7 @@ private:
refresh(); refresh();
} }
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
Font f (element->getFont()); Font f (element->getFont());
@@ -505,7 +505,7 @@ private:
element->setFont (f, true); element->setFont (f, true);
} }
int getIndex() const
int getIndex() const override
{ {
auto f = element->getFont(); auto f = element->getFont();
@@ -526,7 +526,7 @@ private:
} }
private: private:
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{ {
updateStylesList (element->getTypefaceName()); updateStylesList (element->getTypefaceName());
} }
@@ -656,12 +656,12 @@ private:
{ {
} }
void buttonClicked()
void buttonClicked() override
{ {
element->convertToPath(); element->convertToPath();
} }
String getButtonText() const
String getButtonText() const override
{ {
return "convert text to a path"; return "convert text to a path";
} }


+ 1
- 1
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementUndoableAction.h View File

@@ -78,7 +78,7 @@ public:
} }
} }
int getSizeInUnits() { return 2; }
int getSizeInUnits() override { return 2; }
protected: protected:
PaintRoutine& routine; PaintRoutine& routine;


+ 2
- 2
extras/Projucer/Source/ComponentEditor/Properties/jucer_ComponentBooleanProperty.h View File

@@ -44,12 +44,12 @@ public:
document.addChangeListener (this); document.addChangeListener (this);
} }
~ComponentBooleanProperty()
~ComponentBooleanProperty() override
{ {
document.removeChangeListener (this); document.removeChangeListener (this);
} }
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{ {
refresh(); refresh();
} }


+ 2
- 2
extras/Projucer/Source/ComponentEditor/Properties/jucer_ComponentChoiceProperty.h View File

@@ -42,12 +42,12 @@ public:
document.addChangeListener (this); document.addChangeListener (this);
} }
~ComponentChoiceProperty()
~ComponentChoiceProperty() override
{ {
document.removeChangeListener (this); document.removeChangeListener (this);
} }
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{ {
refresh(); refresh();
} }


+ 7
- 7
extras/Projucer/Source/ComponentEditor/Properties/jucer_ComponentColourProperty.h View File

@@ -44,12 +44,12 @@ public:
document.addChangeListener (this); document.addChangeListener (this);
} }
~ComponentColourProperty()
~ComponentColourProperty() override
{ {
document.removeChangeListener (this); document.removeChangeListener (this);
} }
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{ {
refresh(); refresh();
} }
@@ -76,12 +76,12 @@ public:
} }
//============================================================================== //==============================================================================
Colour getColour() const
Colour getColour() const override
{ {
return component->findColour (colourId); return component->findColour (colourId);
} }
void setColour (Colour newColour)
void setColour (Colour newColour) override
{ {
if (component->findColour (colourId) != newColour) if (component->findColour (colourId) != newColour)
{ {
@@ -96,7 +96,7 @@ public:
} }
} }
void resetToDefault()
void resetToDefault() override
{ {
document.getUndoManager().undoCurrentTransactionOnly(); document.getUndoManager().undoCurrentTransactionOnly();
@@ -126,7 +126,7 @@ private:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
@@ -142,7 +142,7 @@ private:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();


+ 2
- 2
extras/Projucer/Source/ComponentEditor/Properties/jucer_ComponentTextProperty.h View File

@@ -44,12 +44,12 @@ public:
document.addChangeListener (this); document.addChangeListener (this);
} }
~ComponentTextProperty()
~ComponentTextProperty() override
{ {
document.removeChangeListener (this); document.removeChangeListener (this);
} }
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{ {
refresh(); refresh();
} }


+ 2
- 2
extras/Projucer/Source/ComponentEditor/Properties/jucer_FontPropertyComponent.h View File

@@ -63,7 +63,7 @@ public:
virtual String getTypefaceName() const = 0; virtual String getTypefaceName() const = 0;
//============================================================================== //==============================================================================
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
String type (choices [newIndex]); String type (choices [newIndex]);
@@ -74,7 +74,7 @@ public:
setTypefaceName (type); setTypefaceName (type);
} }
int getIndex() const
int getIndex() const override
{ {
return choices.indexOf (getTypefaceName()); return choices.indexOf (getTypefaceName());
} }


+ 2
- 2
extras/Projucer/Source/ComponentEditor/Properties/jucer_JustificationProperty.h View File

@@ -58,7 +58,7 @@ public:
virtual Justification getJustification() const = 0; virtual Justification getJustification() const = 0;
//============================================================================== //==============================================================================
void setIndex (int newIndex)
void setIndex (int newIndex) override
{ {
const int types[] = { Justification::centred, const int types[] = { Justification::centred,
Justification::centredLeft, Justification::centredLeft,
@@ -77,7 +77,7 @@ public:
} }
} }
int getIndex() const
int getIndex() const override
{ {
const int types[] = { Justification::centred, const int types[] = { Justification::centred,
Justification::centredLeft, Justification::centredLeft,


+ 3
- 3
extras/Projucer/Source/ComponentEditor/Properties/jucer_PositionPropertyBase.h View File

@@ -175,7 +175,7 @@ public:
} }
} }
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{ {
refresh(); refresh();
} }
@@ -392,7 +392,7 @@ public:
}); });
} }
void resized()
void resized() override
{ {
const Rectangle<int> r (getLookAndFeel().getPropertyComponentContentPosition (*this)); const Rectangle<int> r (getLookAndFeel().getPropertyComponentContentPosition (*this));
@@ -402,7 +402,7 @@ public:
textEditor->setBounds (r.getX(), r.getY(), button.getX() - r.getX(), r.getHeight()); textEditor->setBounds (r.getX(), r.getY(), button.getX() - r.getX(), r.getHeight());
} }
void refresh()
void refresh() override
{ {
textEditor->setText (getText(), dontSendNotification); textEditor->setText (getText(), dontSendNotification);
} }


+ 3
- 3
extras/Projucer/Source/ComponentEditor/UI/jucer_ComponentLayoutPanel.h View File

@@ -41,17 +41,17 @@ public:
{ {
} }
~ComponentLayoutPanel()
~ComponentLayoutPanel() override
{ {
deleteAllChildren(); deleteAllChildren();
} }
void updatePropertiesList()
void updatePropertiesList() override
{ {
((LayoutPropsPanel*) propsPanel)->updateList(); ((LayoutPropsPanel*) propsPanel)->updateList();
} }
Rectangle<int> getComponentArea() const
Rectangle<int> getComponentArea() const override
{ {
return ((ComponentLayoutEditor*) editor)->getComponentArea(); return ((ComponentLayoutEditor*) editor)->getComponentArea();
} }


+ 5
- 5
extras/Projucer/Source/ComponentEditor/UI/jucer_EditingPanelBase.cpp View File

@@ -37,7 +37,7 @@ public:
updateBounds (content.get()); updateBounds (content.get());
} }
void childBoundsChanged (Component* child)
void childBoundsChanged (Component* child) override
{ {
updateBounds (child); updateBounds (child);
} }
@@ -69,7 +69,7 @@ public:
{ {
} }
void mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel)
void mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel) override
{ {
if (e.mods.isCtrlDown() || e.mods.isAltDown() || e.mods.isCommandDown()) if (e.mods.isCtrlDown() || e.mods.isAltDown() || e.mods.isCommandDown())
mouseMagnify (e, 1.0f / (1.0f - wheel.deltaY)); mouseMagnify (e, 1.0f / (1.0f - wheel.deltaY));
@@ -77,7 +77,7 @@ public:
Viewport::mouseWheelMove (e, wheel); Viewport::mouseWheelMove (e, wheel);
} }
void mouseMagnify (const MouseEvent& e, float factor)
void mouseMagnify (const MouseEvent& e, float factor) override
{ {
panel->setZoom (panel->getZoom() * factor, e.x, e.y); panel->setZoom (panel->getZoom() * factor, e.x, e.y);
} }
@@ -116,7 +116,7 @@ private:
setAlwaysOnTop (true); setAlwaysOnTop (true);
} }
void mouseDown (const MouseEvent&)
void mouseDown (const MouseEvent&) override
{ {
if (Viewport* viewport = findParentComponentOfClass<Viewport>()) if (Viewport* viewport = findParentComponentOfClass<Viewport>())
{ {
@@ -125,7 +125,7 @@ private:
} }
} }
void mouseDrag (const MouseEvent& e)
void mouseDrag (const MouseEvent& e) override
{ {
if (Viewport* viewport = findParentComponentOfClass<Viewport>()) if (Viewport* viewport = findParentComponentOfClass<Viewport>())
viewport->setViewPosition (jlimit (0, jmax (0, viewport->getViewedComponent()->getWidth() - viewport->getViewWidth()), viewport->setViewPosition (jlimit (0, jmax (0, viewport->getViewedComponent()->getWidth() - viewport->getViewWidth()),


+ 2
- 2
extras/Projucer/Source/ComponentEditor/UI/jucer_JucerDocumentEditor.cpp View File

@@ -294,8 +294,8 @@ private:
choices.add ("Keep component size fixed"); choices.add ("Keep component size fixed");
} }
void setIndex (int newIndex) { document.setFixedSize (newIndex != 0); }
int getIndex() const { return document.isFixedSize() ? 1 : 0; }
void setIndex (int newIndex) override { document.setFixedSize (newIndex != 0); }
int getIndex() const override { return document.isFixedSize() ? 1 : 0; }
}; };
//============================================================================== //==============================================================================


+ 13
- 13
extras/Projucer/Source/ComponentEditor/UI/jucer_PaintRoutineEditor.h View File

@@ -41,25 +41,25 @@ public:
PaintRoutineEditor (PaintRoutine& graphics, PaintRoutineEditor (PaintRoutine& graphics,
JucerDocument& document, JucerDocument& document,
JucerDocumentEditor* const docHolder); JucerDocumentEditor* const docHolder);
~PaintRoutineEditor();
~PaintRoutineEditor() override;
//============================================================================== //==============================================================================
void paint (Graphics& g);
void paintOverChildren (Graphics& g);
void resized();
void changeListenerCallback (ChangeBroadcaster*);
void paint (Graphics& g) override;
void paintOverChildren (Graphics& g) override;
void resized() override;
void changeListenerCallback (ChangeBroadcaster*) override;
void mouseDown (const MouseEvent& e);
void mouseDrag (const MouseEvent& e);
void mouseUp (const MouseEvent& e);
void visibilityChanged();
void mouseDown (const MouseEvent& e) override;
void mouseDrag (const MouseEvent& e) override;
void mouseUp (const MouseEvent& e) override;
void visibilityChanged() override;
void findLassoItemsInArea (Array <PaintElement*>& results, const Rectangle<int>& area);
void findLassoItemsInArea (Array <PaintElement*>& results, const Rectangle<int>& area) override;
SelectedItemSet <PaintElement*>& getLassoSelection();
SelectedItemSet <PaintElement*>& getLassoSelection() override;
bool isInterestedInFileDrag (const StringArray& files);
void filesDropped (const StringArray& filenames, int x, int y);
bool isInterestedInFileDrag (const StringArray& files) override;
void filesDropped (const StringArray& filenames, int x, int y) override;
Rectangle<int> getComponentArea() const; Rectangle<int> getComponentArea() const;


+ 3
- 3
extras/Projucer/Source/ComponentEditor/UI/jucer_PaintRoutinePanel.h View File

@@ -33,12 +33,12 @@ class PaintRoutinePanel : public EditingPanelBase
{ {
public: public:
PaintRoutinePanel (JucerDocument&, PaintRoutine&, JucerDocumentEditor*); PaintRoutinePanel (JucerDocument&, PaintRoutine&, JucerDocumentEditor*);
~PaintRoutinePanel();
~PaintRoutinePanel() override;
PaintRoutine& getPaintRoutine() const noexcept { return routine; } PaintRoutine& getPaintRoutine() const noexcept { return routine; }
void updatePropertiesList();
Rectangle<int> getComponentArea() const;
void updatePropertiesList() override;
Rectangle<int> getComponentArea() const override;
private: private:
PaintRoutine& routine; PaintRoutine& routine;


+ 1
- 1
extras/Projucer/Source/ComponentEditor/UI/jucer_ResourceEditorPanel.cpp View File

@@ -49,7 +49,7 @@ public:
reloadButton.setVisible (document.getResources() [row] != nullptr); reloadButton.setVisible (document.getResources() [row] != nullptr);
} }
void resized()
void resized() override
{ {
reloadButton.setBoundsInset (BorderSize<int> (2)); reloadButton.setBoundsInset (BorderSize<int> (2));
} }


+ 11
- 11
extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp View File

@@ -78,7 +78,7 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
Component* const newComp = layout.addComponentFromXml (*xml, false); Component* const newComp = layout.addComponentFromXml (*xml, false);
@@ -89,14 +89,14 @@ public:
return indexRef >= 0; return indexRef >= 0;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
layout.removeComponent (layout.getComponent (indexRef), false); layout.removeComponent (layout.getComponent (indexRef), false);
return true; return true;
} }
int getSizeInUnits() { return 10; }
int getSizeInUnits() override { return 10; }
int& indexRef; int& indexRef;
@@ -130,14 +130,14 @@ public:
oldIndex = l.indexOfComponent (comp); oldIndex = l.indexOfComponent (comp);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
layout.removeComponent (getComponent(), false); layout.removeComponent (getComponent(), false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
Component* c = layout.addComponentFromXml (*xml, false); Component* c = layout.addComponentFromXml (*xml, false);
jassert (c != nullptr); jassert (c != nullptr);
@@ -183,7 +183,7 @@ public:
oldIndex = l.indexOfComponent (comp); oldIndex = l.indexOfComponent (comp);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
Component* comp = layout.getComponent (oldIndex); Component* comp = layout.getComponent (oldIndex);
@@ -192,7 +192,7 @@ public:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
layout.moveComponentZOrder (newIndex, oldIndex); layout.moveComponentZOrder (newIndex, oldIndex);
@@ -599,14 +599,14 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
layout.setComponentPosition (getComponent(), newPos, false); layout.setComponentPosition (getComponent(), newPos, false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
layout.setComponentPosition (getComponent(), oldPos, false); layout.setComponentPosition (getComponent(), oldPos, false);
@@ -630,7 +630,7 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setBounds (newBounds); getComponent()->setBounds (newBounds);
@@ -639,7 +639,7 @@ public:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
getComponent()->setBounds (oldBounds); getComponent()->setBounds (oldBounds);


+ 8
- 8
extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp View File

@@ -89,7 +89,7 @@ public:
{ {
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
PaintElement* newElement = routine.addElementFromXml (*xml, -1, false); PaintElement* newElement = routine.addElementFromXml (*xml, -1, false);
@@ -100,14 +100,14 @@ public:
return indexAdded >= 0; return indexAdded >= 0;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
routine.removeElement (routine.getElement (indexAdded), false); routine.removeElement (routine.getElement (indexAdded), false);
return true; return true;
} }
int getSizeInUnits() { return 10; }
int getSizeInUnits() override { return 10; }
int indexAdded; int indexAdded;
@@ -172,21 +172,21 @@ public:
oldIndex = routine.indexOfElement (element); oldIndex = routine.indexOfElement (element);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
routine.removeElement (getElement(), false); routine.removeElement (getElement(), false);
return true; return true;
} }
bool undo()
bool undo() override
{ {
PaintElement* newElement = routine.addElementFromXml (*xml, oldIndex, false); PaintElement* newElement = routine.addElementFromXml (*xml, oldIndex, false);
showCorrectTab(); showCorrectTab();
return newElement != nullptr; return newElement != nullptr;
} }
int getSizeInUnits() { return 10; }
int getSizeInUnits() override { return 10; }
private: private:
std::unique_ptr<XmlElement> xml; std::unique_ptr<XmlElement> xml;
@@ -228,7 +228,7 @@ public:
oldIndex = routine.indexOfElement (element); oldIndex = routine.indexOfElement (element);
} }
bool perform()
bool perform() override
{ {
showCorrectTab(); showCorrectTab();
@@ -238,7 +238,7 @@ public:
return true; return true;
} }
bool undo()
bool undo() override
{ {
showCorrectTab(); showCorrectTab();
routine.moveElementZOrder (newIndex, oldIndex); routine.moveElementZOrder (newIndex, oldIndex);


+ 1
- 1
extras/Projucer/Source/Project/jucer_Project.h View File

@@ -131,7 +131,7 @@ public:
virtual void canCreateMessageBox (CreatorFunction) = 0; virtual void canCreateMessageBox (CreatorFunction) = 0;
}; };
void handleAsyncUpdate()
void handleAsyncUpdate() override
{ {
schedule(); schedule();
} }


+ 1
- 1
extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_LabelPropertyComponent.h View File

@@ -59,7 +59,7 @@ private:
//============================================================================== //==============================================================================
struct LabelLookAndFeel final : public ProjucerLookAndFeel struct LabelLookAndFeel final : public ProjucerLookAndFeel
{ {
void drawPropertyComponentLabel (Graphics&, int, int, PropertyComponent&) {}
void drawPropertyComponentLabel (Graphics&, int, int, PropertyComponent&) override {}
}; };
void lookAndFeelChanged() override void lookAndFeelChanged() override


+ 7
- 7
modules/juce_audio_devices/native/juce_ALSA_linux.cpp View File

@@ -979,7 +979,7 @@ public:
#endif #endif
} }
~ALSAAudioIODeviceType()
~ALSAAudioIODeviceType() override
{ {
#if ! JUCE_ALSA_LOGGING #if ! JUCE_ALSA_LOGGING
snd_lib_error_set_handler (nullptr); snd_lib_error_set_handler (nullptr);
@@ -989,7 +989,7 @@ public:
} }
//============================================================================== //==============================================================================
void scanForDevices()
void scanForDevices() override
{ {
if (hasScanned) if (hasScanned)
return; return;
@@ -1011,14 +1011,14 @@ public:
outputNames.appendNumbersToDuplicates (false, true); outputNames.appendNumbersToDuplicates (false, true);
} }
StringArray getDeviceNames (bool wantInputNames) const
StringArray getDeviceNames (bool wantInputNames) const override
{ {
jassert (hasScanned); // need to call scanForDevices() before doing this jassert (hasScanned); // need to call scanForDevices() before doing this
return wantInputNames ? inputNames : outputNames; return wantInputNames ? inputNames : outputNames;
} }
int getDefaultDeviceIndex (bool forInput) const
int getDefaultDeviceIndex (bool forInput) const override
{ {
jassert (hasScanned); // need to call scanForDevices() before doing this jassert (hasScanned); // need to call scanForDevices() before doing this
@@ -1026,9 +1026,9 @@ public:
return idx >= 0 ? idx : 0; return idx >= 0 ? idx : 0;
} }
bool hasSeparateInputsAndOutputs() const { return true; }
bool hasSeparateInputsAndOutputs() const override { return true; }
int getIndexOfDevice (AudioIODevice* device, bool asInput) const
int getIndexOfDevice (AudioIODevice* device, bool asInput) const override
{ {
jassert (hasScanned); // need to call scanForDevices() before doing this jassert (hasScanned); // need to call scanForDevices() before doing this
@@ -1040,7 +1040,7 @@ public:
} }
AudioIODevice* createDevice (const String& outputDeviceName, AudioIODevice* createDevice (const String& outputDeviceName,
const String& inputDeviceName)
const String& inputDeviceName) override
{ {
jassert (hasScanned); // need to call scanForDevices() before doing this jassert (hasScanned); // need to call scanForDevices() before doing this


+ 15
- 15
modules/juce_audio_devices/native/juce_WASAPI_windows.cpp View File

@@ -564,13 +564,13 @@ private:
{ {
SessionEventCallback (WASAPIDeviceBase& d) : owner (d) {} SessionEventCallback (WASAPIDeviceBase& d) : owner (d) {}
JUCE_COMRESULT OnDisplayNameChanged (LPCWSTR, LPCGUID) { return S_OK; }
JUCE_COMRESULT OnIconPathChanged (LPCWSTR, LPCGUID) { return S_OK; }
JUCE_COMRESULT OnSimpleVolumeChanged (float, BOOL, LPCGUID) { return S_OK; }
JUCE_COMRESULT OnChannelVolumeChanged (DWORD, float*, DWORD, LPCGUID) { return S_OK; }
JUCE_COMRESULT OnGroupingParamChanged (LPCGUID, LPCGUID) { return S_OK; }
JUCE_COMRESULT OnDisplayNameChanged (LPCWSTR, LPCGUID) override { return S_OK; }
JUCE_COMRESULT OnIconPathChanged (LPCWSTR, LPCGUID) override { return S_OK; }
JUCE_COMRESULT OnSimpleVolumeChanged (float, BOOL, LPCGUID) override { return S_OK; }
JUCE_COMRESULT OnChannelVolumeChanged (DWORD, float*, DWORD, LPCGUID) override { return S_OK; }
JUCE_COMRESULT OnGroupingParamChanged (LPCGUID, LPCGUID) override { return S_OK; }
JUCE_COMRESULT OnStateChanged (AudioSessionState state)
JUCE_COMRESULT OnStateChanged (AudioSessionState state) override
{ {
switch (state) switch (state)
{ {
@@ -588,7 +588,7 @@ private:
return S_OK; return S_OK;
} }
JUCE_COMRESULT OnSessionDisconnected (AudioSessionDisconnectReason reason)
JUCE_COMRESULT OnSessionDisconnected (AudioSessionDisconnectReason reason) override
{ {
if (reason == DisconnectReasonFormatChanged) if (reason == DisconnectReasonFormatChanged)
owner.deviceSampleRateChanged(); owner.deviceSampleRateChanged();
@@ -833,7 +833,7 @@ private:
return result; return result;
} }
DWORD getStreamFlags()
DWORD getStreamFlags() const
{ {
DWORD streamFlags = 0x40000; /*AUDCLNT_STREAMFLAGS_EVENTCALLBACK*/ DWORD streamFlags = 0x40000; /*AUDCLNT_STREAMFLAGS_EVENTCALLBACK*/
@@ -1199,8 +1199,8 @@ private:
//============================================================================== //==============================================================================
class WASAPIAudioIODevice final : public AudioIODevice, class WASAPIAudioIODevice final : public AudioIODevice,
public Thread,
private AsyncUpdater
public Thread,
private AsyncUpdater
{ {
public: public:
WASAPIAudioIODevice (const String& deviceName, WASAPIAudioIODevice (const String& deviceName,
@@ -1821,11 +1821,11 @@ private:
explicit ChangeNotificationClient (WASAPIAudioIODeviceType* d) explicit ChangeNotificationClient (WASAPIAudioIODeviceType* d)
: ComBaseClassHelper (0), device (d) {} : ComBaseClassHelper (0), device (d) {}
JUCE_COMRESULT OnDeviceAdded (LPCWSTR) { return notify(); }
JUCE_COMRESULT OnDeviceRemoved (LPCWSTR) { return notify(); }
JUCE_COMRESULT OnDeviceStateChanged (LPCWSTR, DWORD) { return notify(); }
JUCE_COMRESULT OnDefaultDeviceChanged (EDataFlow, ERole, LPCWSTR) { return notify(); }
JUCE_COMRESULT OnPropertyValueChanged (LPCWSTR, const PROPERTYKEY) { return notify(); }
JUCE_COMRESULT OnDeviceAdded (LPCWSTR) override { return notify(); }
JUCE_COMRESULT OnDeviceRemoved (LPCWSTR) override { return notify(); }
JUCE_COMRESULT OnDeviceStateChanged (LPCWSTR, DWORD) override { return notify(); }
JUCE_COMRESULT OnDefaultDeviceChanged (EDataFlow, ERole, LPCWSTR) override { return notify(); }
JUCE_COMRESULT OnPropertyValueChanged (LPCWSTR, const PROPERTYKEY) override { return notify(); }
private: private:
WeakReference<WASAPIAudioIODeviceType> device; WeakReference<WASAPIAudioIODeviceType> device;


+ 13
- 13
modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp View File

@@ -37,15 +37,15 @@ public:
{ {
} }
JUCE_COMRESULT Commit (DWORD) { return S_OK; }
JUCE_COMRESULT Write (const void*, ULONG, ULONG*) { return E_NOTIMPL; }
JUCE_COMRESULT Clone (IStream**) { return E_NOTIMPL; }
JUCE_COMRESULT SetSize (ULARGE_INTEGER) { return E_NOTIMPL; }
JUCE_COMRESULT Revert() { return E_NOTIMPL; }
JUCE_COMRESULT LockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT UnlockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT Read (void* dest, ULONG numBytes, ULONG* bytesRead)
JUCE_COMRESULT Commit (DWORD) override { return S_OK; }
JUCE_COMRESULT Write (const void*, ULONG, ULONG*) override { return E_NOTIMPL; }
JUCE_COMRESULT Clone (IStream**) override { return E_NOTIMPL; }
JUCE_COMRESULT SetSize (ULARGE_INTEGER) override { return E_NOTIMPL; }
JUCE_COMRESULT Revert() override { return E_NOTIMPL; }
JUCE_COMRESULT LockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT UnlockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT Read (void* dest, ULONG numBytes, ULONG* bytesRead) override
{ {
auto numRead = source.read (dest, (size_t) numBytes); auto numRead = source.read (dest, (size_t) numBytes);
@@ -55,7 +55,7 @@ public:
return (numRead == (int) numBytes) ? S_OK : S_FALSE; return (numRead == (int) numBytes) ? S_OK : S_FALSE;
} }
JUCE_COMRESULT Seek (LARGE_INTEGER position, DWORD origin, ULARGE_INTEGER* resultPosition)
JUCE_COMRESULT Seek (LARGE_INTEGER position, DWORD origin, ULARGE_INTEGER* resultPosition) override
{ {
auto newPos = (int64) position.QuadPart; auto newPos = (int64) position.QuadPart;
@@ -80,7 +80,7 @@ public:
} }
JUCE_COMRESULT CopyTo (IStream* destStream, ULARGE_INTEGER numBytesToDo, JUCE_COMRESULT CopyTo (IStream* destStream, ULARGE_INTEGER numBytesToDo,
ULARGE_INTEGER* bytesRead, ULARGE_INTEGER* bytesWritten)
ULARGE_INTEGER* bytesRead, ULARGE_INTEGER* bytesWritten) override
{ {
uint64 totalCopied = 0; uint64 totalCopied = 0;
auto numBytes = (int64) numBytesToDo.QuadPart; auto numBytes = (int64) numBytesToDo.QuadPart;
@@ -105,7 +105,7 @@ public:
return S_OK; return S_OK;
} }
JUCE_COMRESULT Stat (STATSTG* stat, DWORD)
JUCE_COMRESULT Stat (STATSTG* stat, DWORD) override
{ {
if (stat == nullptr) if (stat == nullptr)
return STG_E_INVALIDPOINTER; return STG_E_INVALIDPOINTER;
@@ -319,7 +319,7 @@ WindowsMediaAudioFormat::WindowsMediaAudioFormat()
{ {
} }
WindowsMediaAudioFormat::~WindowsMediaAudioFormat() {}
WindowsMediaAudioFormat::~WindowsMediaAudioFormat() = default;
Array<int> WindowsMediaAudioFormat::getPossibleSampleRates() { return {}; } Array<int> WindowsMediaAudioFormat::getPossibleSampleRates() { return {}; }
Array<int> WindowsMediaAudioFormat::getPossibleBitDepths() { return {}; } Array<int> WindowsMediaAudioFormat::getPossibleBitDepths() { return {}; }


+ 1
- 1
modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp View File

@@ -613,7 +613,7 @@ private:
{ {
ScanJob (Scanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {} ScanJob (Scanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {}
JobStatus runJob()
JobStatus runJob() override
{ {
while (scanner.doNextScan() && ! shouldExit()) while (scanner.doNextScan() && ! shouldExit())
{} {}


+ 19
- 17
modules/juce_audio_utils/native/juce_AudioCDBurner_windows.cpp View File

@@ -87,7 +87,7 @@ namespace CDBurnerHelpers
} }
//============================================================================== //==============================================================================
class AudioCDBurner::Pimpl : public ComBaseClassHelper <IDiscMasterProgressEvents>,
class AudioCDBurner::Pimpl : public ComBaseClassHelper<IDiscMasterProgressEvents>,
public Timer public Timer
{ {
public: public:
@@ -104,8 +104,6 @@ public:
startTimer (2000); startTimer (2000);
} }
~Pimpl() {}
void releaseObjects() void releaseObjects()
{ {
discRecorder->Close(); discRecorder->Close();
@@ -116,7 +114,7 @@ public:
Release(); Release();
} }
JUCE_COMRESULT QueryCancel (boolean* pbCancel)
JUCE_COMRESULT QueryCancel (boolean* pbCancel) override
{ {
if (listener != nullptr && ! shouldCancel) if (listener != nullptr && ! shouldCancel)
shouldCancel = listener->audioCDBurnProgress (progress); shouldCancel = listener->audioCDBurnProgress (progress);
@@ -126,7 +124,7 @@ public:
return S_OK; return S_OK;
} }
JUCE_COMRESULT NotifyBlockProgress (long nCompleted, long nTotal)
JUCE_COMRESULT NotifyBlockProgress (long nCompleted, long nTotal) override
{ {
progress = nCompleted / (float) nTotal; progress = nCompleted / (float) nTotal;
shouldCancel = listener != nullptr && listener->audioCDBurnProgress (progress); shouldCancel = listener != nullptr && listener->audioCDBurnProgress (progress);
@@ -134,13 +132,13 @@ public:
return E_NOTIMPL; return E_NOTIMPL;
} }
JUCE_COMRESULT NotifyPnPActivity (void) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyAddProgress (long /*nCompletedSteps*/, long /*nTotalSteps*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyTrackProgress (long /*nCurrentTrack*/, long /*nTotalTracks*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyPreparingBurn (long /*nEstimatedSeconds*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyClosingDisc (long /*nEstimatedSeconds*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyBurnComplete (HRESULT /*status*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyEraseComplete (HRESULT /*status*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyPnPActivity (void) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyAddProgress (long /*nCompletedSteps*/, long /*nTotalSteps*/) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyTrackProgress (long /*nCurrentTrack*/, long /*nTotalTracks*/) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyPreparingBurn (long /*nEstimatedSeconds*/) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyClosingDisc (long /*nEstimatedSeconds*/) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyBurnComplete (HRESULT /*status*/) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyEraseComplete (HRESULT /*status*/) override { return E_NOTIMPL; }
class ScopedDiscOpener class ScopedDiscOpener
{ {
@@ -173,30 +171,34 @@ public:
return readOnlyDiskPresent; return readOnlyDiskPresent;
} }
int getIntProperty (const LPOLESTR name, const int defaultReturn) const
int getIntProperty (const wchar_t* name, const int defaultReturn) const
{ {
std::wstring copy { name };
ComSmartPtr<IPropertyStorage> prop; ComSmartPtr<IPropertyStorage> prop;
if (FAILED (discRecorder->GetRecorderProperties (prop.resetAndGetPointerAddress()))) if (FAILED (discRecorder->GetRecorderProperties (prop.resetAndGetPointerAddress())))
return defaultReturn; return defaultReturn;
PROPSPEC iPropSpec; PROPSPEC iPropSpec;
iPropSpec.ulKind = PRSPEC_LPWSTR; iPropSpec.ulKind = PRSPEC_LPWSTR;
iPropSpec.lpwstr = name;
iPropSpec.lpwstr = copy.data();
PROPVARIANT iPropVariant; PROPVARIANT iPropVariant;
return FAILED (prop->ReadMultiple (1, &iPropSpec, &iPropVariant)) return FAILED (prop->ReadMultiple (1, &iPropSpec, &iPropVariant))
? defaultReturn : (int) iPropVariant.lVal; ? defaultReturn : (int) iPropVariant.lVal;
} }
bool setIntProperty (const LPOLESTR name, const int value) const
bool setIntProperty (const wchar_t* name, const int value) const
{ {
std::wstring copy { name };
ComSmartPtr<IPropertyStorage> prop; ComSmartPtr<IPropertyStorage> prop;
if (FAILED (discRecorder->GetRecorderProperties (prop.resetAndGetPointerAddress()))) if (FAILED (discRecorder->GetRecorderProperties (prop.resetAndGetPointerAddress())))
return false; return false;
PROPSPEC iPropSpec; PROPSPEC iPropSpec;
iPropSpec.ulKind = PRSPEC_LPWSTR; iPropSpec.ulKind = PRSPEC_LPWSTR;
iPropSpec.lpwstr = name;
iPropSpec.lpwstr = copy.data();
PROPVARIANT iPropVariant; PROPVARIANT iPropVariant;
if (FAILED (prop->ReadMultiple (1, &iPropSpec, &iPropVariant))) if (FAILED (prop->ReadMultiple (1, &iPropSpec, &iPropVariant)))
@@ -389,7 +391,7 @@ bool AudioCDBurner::addAudioTrack (AudioSource* audioSource, int numSamples)
buffer.clear (bytesPerBlock); buffer.clear (bytesPerBlock);
AudioData::interleaveSamples (AudioData::NonInterleavedSource<AudioData::Float32, AudioData::NativeEndian> { sourceBuffer.getArrayOfReadPointers(), 2 }, AudioData::interleaveSamples (AudioData::NonInterleavedSource<AudioData::Float32, AudioData::NativeEndian> { sourceBuffer.getArrayOfReadPointers(), 2 },
AudioData::InterleavedDest<AudioData::Int16, Audiodata::LittleEndian> { reinterpret_cast<uint16*> (buffer), 2 },
AudioData::InterleavedDest<AudioData::Int16, AudioData::LittleEndian> { reinterpret_cast<uint16*> (buffer.get()), 2 },
samplesPerBlock); samplesPerBlock);
hr = pimpl->redbook->AddAudioTrackBlocks (buffer, bytesPerBlock); hr = pimpl->redbook->AddAudioTrackBlocks (buffer, bytesPerBlock);


+ 8
- 8
modules/juce_audio_utils/native/juce_AudioCDReader_windows.cpp View File

@@ -324,9 +324,9 @@ void findCDDevices (Array<CDDeviceDescription>& list)
if (h != INVALID_HANDLE_VALUE) if (h != INVALID_HANDLE_VALUE)
{ {
char buffer[100] = { 0 };
char buffer[100]{};
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER p = { 0 };
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER p{};
p.spt.Length = sizeof (SCSI_PASS_THROUGH); p.spt.Length = sizeof (SCSI_PASS_THROUGH);
p.spt.CdbLength = 6; p.spt.CdbLength = 6;
p.spt.SenseInfoLength = 24; p.spt.SenseInfoLength = 24;
@@ -348,7 +348,7 @@ void findCDDevices (Array<CDDeviceDescription>& list)
dev.scsiDriveLetter = driveLetter; dev.scsiDriveLetter = driveLetter;
dev.createDescription (buffer); dev.createDescription (buffer);
SCSI_ADDRESS scsiAddr = { 0 };
SCSI_ADDRESS scsiAddr{};
scsiAddr.Length = sizeof (scsiAddr); scsiAddr.Length = sizeof (scsiAddr);
if (DeviceIoControl (h, IOCTL_SCSI_GET_ADDRESS, if (DeviceIoControl (h, IOCTL_SCSI_GET_ADDRESS,
@@ -371,7 +371,7 @@ void findCDDevices (Array<CDDeviceDescription>& list)
DWORD performScsiPassThroughCommand (SRB_ExecSCSICmd* const srb, const char driveLetter, DWORD performScsiPassThroughCommand (SRB_ExecSCSICmd* const srb, const char driveLetter,
HANDLE& deviceHandle, const bool retryOnFailure) HANDLE& deviceHandle, const bool retryOnFailure)
{ {
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER s = { 0 };
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER s{};
s.spt.Length = sizeof (SCSI_PASS_THROUGH); s.spt.Length = sizeof (SCSI_PASS_THROUGH);
s.spt.CdbLength = srb->SRB_CDBLen; s.spt.CdbLength = srb->SRB_CDBLen;
@@ -798,7 +798,7 @@ int CDController::getLastIndex()
//============================================================================== //==============================================================================
bool CDDeviceHandle::readTOC (TOC* lpToc) bool CDDeviceHandle::readTOC (TOC* lpToc)
{ {
SRB_ExecSCSICmd s = { 0 };
SRB_ExecSCSICmd s{};
s.SRB_Cmd = SC_EXEC_SCSI_CMD; s.SRB_Cmd = SC_EXEC_SCSI_CMD;
s.SRB_HaID = info.ha; s.SRB_HaID = info.ha;
s.SRB_Target = info.tgt; s.SRB_Target = info.tgt;
@@ -872,7 +872,7 @@ void CDDeviceHandle::openDrawer (bool shouldBeOpen)
} }
} }
SRB_ExecSCSICmd s = { 0 };
SRB_ExecSCSICmd s{};
s.SRB_Cmd = SC_EXEC_SCSI_CMD; s.SRB_Cmd = SC_EXEC_SCSI_CMD;
s.SRB_HaID = info.ha; s.SRB_HaID = info.ha;
s.SRB_Target = info.tgt; s.SRB_Target = info.tgt;
@@ -1134,7 +1134,7 @@ bool AudioCDReader::readSamples (int* const* destSamples, int numDestChannels, i
bool AudioCDReader::isCDStillPresent() const bool AudioCDReader::isCDStillPresent() const
{ {
using namespace CDReaderHelpers; using namespace CDReaderHelpers;
TOC toc = { 0 };
TOC toc{};
return static_cast<CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc); return static_cast<CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc);
} }
@@ -1144,7 +1144,7 @@ void AudioCDReader::refreshTrackLengths()
trackStartSamples.clear(); trackStartSamples.clear();
zeromem (audioTracks, sizeof (audioTracks)); zeromem (audioTracks, sizeof (audioTracks));
TOC toc = { 0 };
TOC toc{};
if (static_cast<CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc)) if (static_cast<CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc))
{ {


+ 2
- 1
modules/juce_box2d/juce_box2d.cpp View File

@@ -44,7 +44,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wcast-align",
"-Wswitch-default", "-Wswitch-default",
"-Wswitch-enum", "-Wswitch-enum",
"-Wunused-but-set-variable", "-Wunused-but-set-variable",
"-Wzero-as-null-pointer-constant")
"-Wzero-as-null-pointer-constant",
"-Wsuggest-override")
#include <cstdarg> #include <cstdarg>


+ 2
- 1
modules/juce_box2d/juce_box2d.h View File

@@ -61,7 +61,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wconversion",
"-Wmaybe-uninitialized", "-Wmaybe-uninitialized",
"-Wshadow-field", "-Wshadow-field",
"-Wsign-conversion", "-Wsign-conversion",
"-Wzero-as-null-pointer-constant")
"-Wzero-as-null-pointer-constant",
"-Wsuggest-override")
#include <climits> #include <climits>
#include <cfloat> #include <cfloat>


+ 2
- 2
modules/juce_core/containers/juce_AbstractFifo.cpp View File

@@ -183,12 +183,12 @@ public:
startThread(); startThread();
} }
~WriteThread()
~WriteThread() override
{ {
stopThread (5000); stopThread (5000);
} }
void run()
void run() override
{ {
int n = 0; int n = 0;


+ 74
- 74
modules/juce_core/maths/juce_Expression.cpp View File

@@ -110,13 +110,13 @@ struct Expression::Helpers
Constant (double val, bool resolutionTarget) Constant (double val, bool resolutionTarget)
: value (val), isResolutionTarget (resolutionTarget) {} : value (val), isResolutionTarget (resolutionTarget) {}
Type getType() const noexcept { return constantType; }
Term* clone() const { return new Constant (value, isResolutionTarget); }
TermPtr resolve (const Scope&, int) { return *this; }
double toDouble() const { return value; }
TermPtr negated() { return *new Constant (-value, isResolutionTarget); }
Type getType() const noexcept override { return constantType; }
Term* clone() const override { return new Constant (value, isResolutionTarget); }
TermPtr resolve (const Scope&, int) override { return *this; }
double toDouble() const override { return value; }
TermPtr negated() override { return *new Constant (-value, isResolutionTarget); }
String toString() const
String toString() const override
{ {
String s (value); String s (value);
if (isResolutionTarget) if (isResolutionTarget)
@@ -138,25 +138,25 @@ struct Expression::Helpers
jassert (left != nullptr && right != nullptr); jassert (left != nullptr && right != nullptr);
} }
int getInputIndexFor (const Term* possibleInput) const
int getInputIndexFor (const Term* possibleInput) const override
{ {
return possibleInput == left ? 0 : (possibleInput == right ? 1 : -1); return possibleInput == left ? 0 : (possibleInput == right ? 1 : -1);
} }
Type getType() const noexcept { return operatorType; }
int getNumInputs() const { return 2; }
Term* getInput (int index) const { return index == 0 ? left.get() : (index == 1 ? right.get() : nullptr); }
Type getType() const noexcept override { return operatorType; }
int getNumInputs() const override { return 2; }
Term* getInput (int index) const override { return index == 0 ? left.get() : (index == 1 ? right.get() : nullptr); }
virtual double performFunction (double left, double right) const = 0; virtual double performFunction (double left, double right) const = 0;
virtual void writeOperator (String& dest) const = 0; virtual void writeOperator (String& dest) const = 0;
TermPtr resolve (const Scope& scope, int recursionDepth)
TermPtr resolve (const Scope& scope, int recursionDepth) override
{ {
return *new Constant (performFunction (left ->resolve (scope, recursionDepth)->toDouble(), return *new Constant (performFunction (left ->resolve (scope, recursionDepth)->toDouble(),
right->resolve (scope, recursionDepth)->toDouble()), false); right->resolve (scope, recursionDepth)->toDouble()), false);
} }
String toString() const
String toString() const override
{ {
String s; String s;
auto ourPrecendence = getOperatorPrecedence(); auto ourPrecendence = getOperatorPrecedence();
@@ -198,25 +198,25 @@ struct Expression::Helpers
public: public:
explicit SymbolTerm (const String& sym) : symbol (sym) {} explicit SymbolTerm (const String& sym) : symbol (sym) {}
TermPtr resolve (const Scope& scope, int recursionDepth)
TermPtr resolve (const Scope& scope, int recursionDepth) override
{ {
checkRecursionDepth (recursionDepth); checkRecursionDepth (recursionDepth);
return scope.getSymbolValue (symbol).term->resolve (scope, recursionDepth + 1); return scope.getSymbolValue (symbol).term->resolve (scope, recursionDepth + 1);
} }
Type getType() const noexcept { return symbolType; }
Term* clone() const { return new SymbolTerm (symbol); }
String toString() const { return symbol; }
String getName() const { return symbol; }
Type getType() const noexcept override { return symbolType; }
Term* clone() const override { return new SymbolTerm (symbol); }
String toString() const override { return symbol; }
String getName() const override { return symbol; }
void visitAllSymbols (SymbolVisitor& visitor, const Scope& scope, int recursionDepth)
void visitAllSymbols (SymbolVisitor& visitor, const Scope& scope, int recursionDepth) override
{ {
checkRecursionDepth (recursionDepth); checkRecursionDepth (recursionDepth);
visitor.useSymbol (Symbol (scope.getScopeUID(), symbol)); visitor.useSymbol (Symbol (scope.getScopeUID(), symbol));
scope.getSymbolValue (symbol).term->visitAllSymbols (visitor, scope, recursionDepth + 1); scope.getSymbolValue (symbol).term->visitAllSymbols (visitor, scope, recursionDepth + 1);
} }
void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int /*recursionDepth*/)
void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int /*recursionDepth*/) override
{ {
if (oldSymbol.symbolName == symbol && scope.getScopeUID() == oldSymbol.scopeUID) if (oldSymbol.symbolName == symbol && scope.getScopeUID() == oldSymbol.scopeUID)
symbol = newName; symbol = newName;
@@ -235,13 +235,13 @@ struct Expression::Helpers
: functionName (name), parameters (params) : functionName (name), parameters (params)
{} {}
Type getType() const noexcept { return functionType; }
Term* clone() const { return new Function (functionName, parameters); }
int getNumInputs() const { return parameters.size(); }
Term* getInput (int i) const { return parameters.getReference (i).term.get(); }
String getName() const { return functionName; }
Type getType() const noexcept override { return functionType; }
Term* clone() const override { return new Function (functionName, parameters); }
int getNumInputs() const override { return parameters.size(); }
Term* getInput (int i) const override { return parameters.getReference (i).term.get(); }
String getName() const override { return functionName; }
TermPtr resolve (const Scope& scope, int recursionDepth)
TermPtr resolve (const Scope& scope, int recursionDepth) override
{ {
checkRecursionDepth (recursionDepth); checkRecursionDepth (recursionDepth);
double result = 0; double result = 0;
@@ -264,7 +264,7 @@ struct Expression::Helpers
return *new Constant (result, false); return *new Constant (result, false);
} }
int getInputIndexFor (const Term* possibleInput) const
int getInputIndexFor (const Term* possibleInput) const override
{ {
for (int i = 0; i < parameters.size(); ++i) for (int i = 0; i < parameters.size(); ++i)
if (parameters.getReference (i).term == possibleInput) if (parameters.getReference (i).term == possibleInput)
@@ -273,7 +273,7 @@ struct Expression::Helpers
return -1; return -1;
} }
String toString() const
String toString() const override
{ {
if (parameters.size() == 0) if (parameters.size() == 0)
return functionName + "()"; return functionName + "()";
@@ -302,7 +302,7 @@ struct Expression::Helpers
public: public:
DotOperator (SymbolTerm* l, TermPtr r) : BinaryTerm (TermPtr (l), r) {} DotOperator (SymbolTerm* l, TermPtr r) : BinaryTerm (TermPtr (l), r) {}
TermPtr resolve (const Scope& scope, int recursionDepth)
TermPtr resolve (const Scope& scope, int recursionDepth) override
{ {
checkRecursionDepth (recursionDepth); checkRecursionDepth (recursionDepth);
@@ -311,13 +311,13 @@ struct Expression::Helpers
return visitor.output; return visitor.output;
} }
Term* clone() const { return new DotOperator (getSymbol(), *right); }
String getName() const { return "."; }
int getOperatorPrecedence() const { return 1; }
void writeOperator (String& dest) const { dest << '.'; }
double performFunction (double, double) const { return 0.0; }
Term* clone() const override { return new DotOperator (getSymbol(), *right); }
String getName() const override { return "."; }
int getOperatorPrecedence() const override { return 1; }
void writeOperator (String& dest) const override { dest << '.'; }
double performFunction (double, double) const override { return 0.0; }
void visitAllSymbols (SymbolVisitor& visitor, const Scope& scope, int recursionDepth)
void visitAllSymbols (SymbolVisitor& visitor, const Scope& scope, int recursionDepth) override
{ {
checkRecursionDepth (recursionDepth); checkRecursionDepth (recursionDepth);
visitor.useSymbol (Symbol (scope.getScopeUID(), getSymbol()->symbol)); visitor.useSymbol (Symbol (scope.getScopeUID(), getSymbol()->symbol));
@@ -331,7 +331,7 @@ struct Expression::Helpers
catch (...) {} catch (...) {}
} }
void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int recursionDepth)
void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int recursionDepth) override
{ {
checkRecursionDepth (recursionDepth); checkRecursionDepth (recursionDepth);
getSymbol()->renameSymbol (oldSymbol, newName, scope, recursionDepth); getSymbol()->renameSymbol (oldSymbol, newName, scope, recursionDepth);
@@ -353,7 +353,7 @@ struct Expression::Helpers
EvaluationVisitor (const TermPtr& t, const int recursion) EvaluationVisitor (const TermPtr& t, const int recursion)
: input (t), output (t), recursionCount (recursion) {} : input (t), output (t), recursionCount (recursion) {}
void visit (const Scope& scope) { output = input->resolve (scope, recursionCount); }
void visit (const Scope& scope) override { output = input->resolve (scope, recursionCount); }
const TermPtr input; const TermPtr input;
TermPtr output; TermPtr output;
@@ -369,7 +369,7 @@ struct Expression::Helpers
SymbolVisitingVisitor (const TermPtr& t, SymbolVisitor& v, const int recursion) SymbolVisitingVisitor (const TermPtr& t, SymbolVisitor& v, const int recursion)
: input (t), visitor (v), recursionCount (recursion) {} : input (t), visitor (v), recursionCount (recursion) {}
void visit (const Scope& scope) { input->visitAllSymbols (visitor, scope, recursionCount); }
void visit (const Scope& scope) override { input->visitAllSymbols (visitor, scope, recursionCount); }
private: private:
const TermPtr input; const TermPtr input;
@@ -385,7 +385,7 @@ struct Expression::Helpers
SymbolRenamingVisitor (const TermPtr& t, const Expression::Symbol& symbol_, const String& newName_, const int recursionCount_) SymbolRenamingVisitor (const TermPtr& t, const Expression::Symbol& symbol_, const String& newName_, const int recursionCount_)
: input (t), symbol (symbol_), newName (newName_), recursionCount (recursionCount_) {} : input (t), symbol (symbol_), newName (newName_), recursionCount (recursionCount_) {}
void visit (const Scope& scope) { input->renameSymbol (symbol, newName, scope, recursionCount); }
void visit (const Scope& scope) override { input->renameSymbol (symbol, newName, scope, recursionCount); }
private: private:
const TermPtr input; const TermPtr input;
@@ -410,21 +410,21 @@ struct Expression::Helpers
jassert (t != nullptr); jassert (t != nullptr);
} }
Type getType() const noexcept { return operatorType; }
int getInputIndexFor (const Term* possibleInput) const { return possibleInput == input ? 0 : -1; }
int getNumInputs() const { return 1; }
Term* getInput (int index) const { return index == 0 ? input.get() : nullptr; }
Term* clone() const { return new Negate (*input->clone()); }
Type getType() const noexcept override { return operatorType; }
int getInputIndexFor (const Term* possibleInput) const override { return possibleInput == input ? 0 : -1; }
int getNumInputs() const override { return 1; }
Term* getInput (int index) const override { return index == 0 ? input.get() : nullptr; }
Term* clone() const override { return new Negate (*input->clone()); }
TermPtr resolve (const Scope& scope, int recursionDepth)
TermPtr resolve (const Scope& scope, int recursionDepth) override
{ {
return *new Constant (-input->resolve (scope, recursionDepth)->toDouble(), false); return *new Constant (-input->resolve (scope, recursionDepth)->toDouble(), false);
} }
String getName() const { return "-"; }
TermPtr negated() { return input; }
String getName() const override { return "-"; }
TermPtr negated() override { return input; }
TermPtr createTermToEvaluateInput (const Scope& scope, [[maybe_unused]] const Term* t, double overallTarget, Term* topLevelTerm) const
TermPtr createTermToEvaluateInput (const Scope& scope, [[maybe_unused]] const Term* t, double overallTarget, Term* topLevelTerm) const override
{ {
jassert (t == input); jassert (t == input);
@@ -434,7 +434,7 @@ struct Expression::Helpers
: dest->createTermToEvaluateInput (scope, this, overallTarget, topLevelTerm)); : dest->createTermToEvaluateInput (scope, this, overallTarget, topLevelTerm));
} }
String toString() const
String toString() const override
{ {
if (input->getOperatorPrecedence() > 0) if (input->getOperatorPrecedence() > 0)
return "-(" + input->toString() + ")"; return "-(" + input->toString() + ")";
@@ -452,13 +452,13 @@ struct Expression::Helpers
public: public:
Add (TermPtr l, TermPtr r) : BinaryTerm (l, r) {} Add (TermPtr l, TermPtr r) : BinaryTerm (l, r) {}
Term* clone() const { return new Add (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const { return lhs + rhs; }
int getOperatorPrecedence() const { return 3; }
String getName() const { return "+"; }
void writeOperator (String& dest) const { dest << " + "; }
Term* clone() const override { return new Add (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const override { return lhs + rhs; }
int getOperatorPrecedence() const override { return 3; }
String getName() const override { return "+"; }
void writeOperator (String& dest) const override { dest << " + "; }
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const override
{ {
if (auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm)) if (auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm))
return *new Subtract (newDest, *(input == left ? right : left)->clone()); return *new Subtract (newDest, *(input == left ? right : left)->clone());
@@ -476,13 +476,13 @@ struct Expression::Helpers
public: public:
Subtract (TermPtr l, TermPtr r) : BinaryTerm (l, r) {} Subtract (TermPtr l, TermPtr r) : BinaryTerm (l, r) {}
Term* clone() const { return new Subtract (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const { return lhs - rhs; }
int getOperatorPrecedence() const { return 3; }
String getName() const { return "-"; }
void writeOperator (String& dest) const { dest << " - "; }
Term* clone() const override { return new Subtract (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const override { return lhs - rhs; }
int getOperatorPrecedence() const override { return 3; }
String getName() const override { return "-"; }
void writeOperator (String& dest) const override { dest << " - "; }
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const override
{ {
if (auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm)) if (auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm))
{ {
@@ -505,13 +505,13 @@ struct Expression::Helpers
public: public:
Multiply (TermPtr l, TermPtr r) : BinaryTerm (l, r) {} Multiply (TermPtr l, TermPtr r) : BinaryTerm (l, r) {}
Term* clone() const { return new Multiply (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const { return lhs * rhs; }
String getName() const { return "*"; }
void writeOperator (String& dest) const { dest << " * "; }
int getOperatorPrecedence() const { return 2; }
Term* clone() const override { return new Multiply (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const override { return lhs * rhs; }
String getName() const override { return "*"; }
void writeOperator (String& dest) const override { dest << " * "; }
int getOperatorPrecedence() const override { return 2; }
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const override
{ {
if (auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm)) if (auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm))
return *new Divide (newDest, *(input == left ? right : left)->clone()); return *new Divide (newDest, *(input == left ? right : left)->clone());
@@ -528,13 +528,13 @@ struct Expression::Helpers
public: public:
Divide (TermPtr l, TermPtr r) : BinaryTerm (l, r) {} Divide (TermPtr l, TermPtr r) : BinaryTerm (l, r) {}
Term* clone() const { return new Divide (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const { return lhs / rhs; }
String getName() const { return "/"; }
void writeOperator (String& dest) const { dest << " / "; }
int getOperatorPrecedence() const { return 2; }
Term* clone() const override { return new Divide (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const override { return lhs / rhs; }
String getName() const override { return "/"; }
void writeOperator (String& dest) const override { dest << " / "; }
int getOperatorPrecedence() const override { return 2; }
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const override
{ {
auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm); auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm);
@@ -625,7 +625,7 @@ struct Expression::Helpers
{ {
public: public:
SymbolCheckVisitor (const Symbol& s) : symbol (s) {} SymbolCheckVisitor (const Symbol& s) : symbol (s) {}
void useSymbol (const Symbol& s) { wasFound = wasFound || s == symbol; }
void useSymbol (const Symbol& s) override { wasFound = wasFound || s == symbol; }
bool wasFound = false; bool wasFound = false;
@@ -640,7 +640,7 @@ struct Expression::Helpers
{ {
public: public:
SymbolListVisitor (Array<Symbol>& list_) : list (list_) {} SymbolListVisitor (Array<Symbol>& list_) : list (list_) {}
void useSymbol (const Symbol& s) { list.addIfNotAlreadyThere (s); }
void useSymbol (const Symbol& s) override { list.addIfNotAlreadyThere (s); }
private: private:
Array<Symbol>& list; Array<Symbol>& list;


+ 4
- 4
modules/juce_core/native/juce_ComSmartPtr_windows.h View File

@@ -167,13 +167,13 @@ public:
ComBaseClassHelperBase (unsigned int initialRefCount) : refCount (initialRefCount) {} ComBaseClassHelperBase (unsigned int initialRefCount) : refCount (initialRefCount) {}
virtual ~ComBaseClassHelperBase() = default; virtual ~ComBaseClassHelperBase() = default;
ULONG STDMETHODCALLTYPE AddRef() { return ++refCount; }
ULONG STDMETHODCALLTYPE Release() { auto r = --refCount; if (r == 0) delete this; return r; }
ULONG STDMETHODCALLTYPE AddRef() override { return ++refCount; }
ULONG STDMETHODCALLTYPE Release() override { auto r = --refCount; if (r == 0) delete this; return r; }
protected: protected:
ULONG refCount; ULONG refCount;
JUCE_COMRESULT QueryInterface (REFIID refId, void** result)
JUCE_COMRESULT QueryInterface (REFIID refId, void** result) override
{ {
if (refId == __uuidof (IUnknown)) if (refId == __uuidof (IUnknown))
return castToType<First> (result); return castToType<First> (result);
@@ -203,7 +203,7 @@ public:
explicit ComBaseClassHelper (unsigned int initialRefCount = 1) explicit ComBaseClassHelper (unsigned int initialRefCount = 1)
: ComBaseClassHelperBase<ComClasses...> (initialRefCount) {} : ComBaseClassHelperBase<ComClasses...> (initialRefCount) {}
JUCE_COMRESULT QueryInterface (REFIID refId, void** result)
JUCE_COMRESULT QueryInterface (REFIID refId, void** result) override
{ {
const std::tuple<IID, void*> bases[] const std::tuple<IID, void*> bases[]
{ {


+ 1
- 1
modules/juce_dsp/containers/juce_SIMDRegister_test.cpp View File

@@ -845,7 +845,7 @@ public:
TheTest::run (*this, random, Tag<int64_t>{}); TheTest::run (*this, random, Tag<int64_t>{});
} }
void runTest()
void runTest() override
{ {
runTestForAllTypes ("InitializationTest", InitializationTest{}); runTestForAllTypes ("InitializationTest", InitializationTest{});


+ 6
- 6
modules/juce_graphics/native/juce_DirectWriteTypeface_windows.cpp View File

@@ -212,11 +212,11 @@ public:
bool loadedOk() const noexcept { return dwFontFace != nullptr; } bool loadedOk() const noexcept { return dwFontFace != nullptr; }
BOOL isFontFound() const noexcept { return fontFound; } BOOL isFontFound() const noexcept { return fontFound; }
float getAscent() const { return ascent; }
float getDescent() const { return 1.0f - ascent; }
float getHeightToPointsFactor() const { return heightToPointsFactor; }
float getAscent() const override { return ascent; }
float getDescent() const override { return 1.0f - ascent; }
float getHeightToPointsFactor() const override { return heightToPointsFactor; }
float getStringWidth (const String& text)
float getStringWidth (const String& text) override
{ {
auto textUTF32 = text.toUTF32(); auto textUTF32 = text.toUTF32();
auto len = textUTF32.length(); auto len = textUTF32.length();
@@ -235,7 +235,7 @@ public:
return x * unitsToHeightScaleFactor; return x * unitsToHeightScaleFactor;
} }
void getGlyphPositions (const String& text, Array<int>& resultGlyphs, Array<float>& xOffsets)
void getGlyphPositions (const String& text, Array<int>& resultGlyphs, Array<float>& xOffsets) override
{ {
xOffsets.add (0); xOffsets.add (0);
@@ -257,7 +257,7 @@ public:
} }
} }
bool getOutlineForGlyph (int glyphNumber, Path& path)
bool getOutlineForGlyph (int glyphNumber, Path& path) override
{ {
jassert (path.isEmpty()); // we might need to apply a transform to the path, so this must be empty jassert (path.isEmpty()); // we might need to apply a transform to the path, so this must be empty
auto glyphIndex = (UINT16) glyphNumber; auto glyphIndex = (UINT16) glyphNumber;


+ 1
- 1
modules/juce_graphics/native/juce_Fonts_freetype.cpp View File

@@ -335,7 +335,7 @@ public:
L' '); L' ');
} }
bool loadGlyphIfPossible (const juce_wchar character)
bool loadGlyphIfPossible (const juce_wchar character) override
{ {
if (faceWrapper != nullptr) if (faceWrapper != nullptr)
{ {


+ 7
- 7
modules/juce_graphics/native/juce_Fonts_windows.cpp View File

@@ -334,7 +334,7 @@ public:
loadFont(); loadFont();
} }
~WindowsTypeface()
~WindowsTypeface() override
{ {
SelectObject (dc, previousFontH); // Replacing the previous font before deleting the DC avoids a warning in BoundsChecker SelectObject (dc, previousFontH); // Replacing the previous font before deleting the DC avoids a warning in BoundsChecker
DeleteDC (dc); DeleteDC (dc);
@@ -346,11 +346,11 @@ public:
RemoveFontMemResourceEx (memoryFont); RemoveFontMemResourceEx (memoryFont);
} }
float getAscent() const { return ascent; }
float getDescent() const { return 1.0f - ascent; }
float getHeightToPointsFactor() const { return heightToPointsFactor; }
float getAscent() const override { return ascent; }
float getDescent() const override { return 1.0f - ascent; }
float getHeightToPointsFactor() const override { return heightToPointsFactor; }
float getStringWidth (const String& text)
float getStringWidth (const String& text) override
{ {
auto utf16 = text.toUTF16(); auto utf16 = text.toUTF16();
auto numChars = utf16.length(); auto numChars = utf16.length();
@@ -367,7 +367,7 @@ public:
return x; return x;
} }
void getGlyphPositions (const String& text, Array<int>& resultGlyphs, Array<float>& xOffsets)
void getGlyphPositions (const String& text, Array<int>& resultGlyphs, Array<float>& xOffsets) override
{ {
auto utf16 = text.toUTF16(); auto utf16 = text.toUTF16();
auto numChars = utf16.length(); auto numChars = utf16.length();
@@ -391,7 +391,7 @@ public:
xOffsets.add (x); xOffsets.add (x);
} }
bool getOutlineForGlyph (int glyphNumber, Path& glyphPath)
bool getOutlineForGlyph (int glyphNumber, Path& glyphPath) override
{ {
if (glyphNumber < 0) if (glyphNumber < 0)
glyphNumber = defaultGlyph; glyphNumber = defaultGlyph;


+ 3
- 3
modules/juce_gui_basics/layout/juce_TabbedComponent.cpp View File

@@ -60,12 +60,12 @@ struct TabbedComponent::ButtonBar final : public TabbedButtonBar
{ {
} }
void currentTabChanged (int newCurrentTabIndex, const String& newTabName)
void currentTabChanged (int newCurrentTabIndex, const String& newTabName) override
{ {
owner.changeCallback (newCurrentTabIndex, newTabName); owner.changeCallback (newCurrentTabIndex, newTabName);
} }
void popupMenuClickOnTab (int tabIndex, const String& tabName)
void popupMenuClickOnTab (int tabIndex, const String& tabName) override
{ {
owner.popupMenuClickOnTab (tabIndex, tabName); owner.popupMenuClickOnTab (tabIndex, tabName);
} }
@@ -75,7 +75,7 @@ struct TabbedComponent::ButtonBar final : public TabbedButtonBar
return owner.tabs->getTabBackgroundColour (tabIndex); return owner.tabs->getTabBackgroundColour (tabIndex);
} }
TabBarButton* createTabButton (const String& tabName, int tabIndex)
TabBarButton* createTabButton (const String& tabName, int tabIndex) override
{ {
return owner.createTabButton (tabName, tabIndex); return owner.createTabButton (tabName, tabIndex);
} }


+ 12
- 12
modules/juce_gui_basics/native/juce_DragAndDrop_windows.cpp View File

@@ -31,7 +31,7 @@ namespace DragAndDropHelpers
//============================================================================== //==============================================================================
struct JuceDropSource final : public ComBaseClassHelper<IDropSource> struct JuceDropSource final : public ComBaseClassHelper<IDropSource>
{ {
JuceDropSource() {}
JuceDropSource() = default;
JUCE_COMRESULT QueryContinueDrag (BOOL escapePressed, DWORD keys) override JUCE_COMRESULT QueryContinueDrag (BOOL escapePressed, DWORD keys) override
{ {
@@ -123,7 +123,7 @@ namespace DragAndDropHelpers
}; };
//============================================================================== //==============================================================================
class JuceDataObject final : public ComBaseClassHelper <IDataObject>
class JuceDataObject final : public ComBaseClassHelper<IDataObject>
{ {
public: public:
JuceDataObject (const FORMATETC* f, const STGMEDIUM* m) JuceDataObject (const FORMATETC* f, const STGMEDIUM* m)
@@ -131,12 +131,12 @@ namespace DragAndDropHelpers
{ {
} }
~JuceDataObject()
~JuceDataObject() override
{ {
jassert (refCount == 0); jassert (refCount == 0);
} }
JUCE_COMRESULT GetData (FORMATETC* pFormatEtc, STGMEDIUM* pMedium)
JUCE_COMRESULT GetData (FORMATETC* pFormatEtc, STGMEDIUM* pMedium) override
{ {
if ((pFormatEtc->tymed & format->tymed) != 0 if ((pFormatEtc->tymed & format->tymed) != 0
&& pFormatEtc->cfFormat == format->cfFormat && pFormatEtc->cfFormat == format->cfFormat
@@ -164,7 +164,7 @@ namespace DragAndDropHelpers
return DV_E_FORMATETC; return DV_E_FORMATETC;
} }
JUCE_COMRESULT QueryGetData (FORMATETC* f)
JUCE_COMRESULT QueryGetData (FORMATETC* f) override
{ {
if (f == nullptr) if (f == nullptr)
return E_INVALIDARG; return E_INVALIDARG;
@@ -177,13 +177,13 @@ namespace DragAndDropHelpers
return DV_E_FORMATETC; return DV_E_FORMATETC;
} }
JUCE_COMRESULT GetCanonicalFormatEtc (FORMATETC*, FORMATETC* pFormatEtcOut)
JUCE_COMRESULT GetCanonicalFormatEtc (FORMATETC*, FORMATETC* pFormatEtcOut) override
{ {
pFormatEtcOut->ptd = nullptr; pFormatEtcOut->ptd = nullptr;
return E_NOTIMPL; return E_NOTIMPL;
} }
JUCE_COMRESULT EnumFormatEtc (DWORD direction, IEnumFORMATETC** result)
JUCE_COMRESULT EnumFormatEtc (DWORD direction, IEnumFORMATETC** result) override
{ {
if (result == nullptr) if (result == nullptr)
return E_POINTER; return E_POINTER;
@@ -198,11 +198,11 @@ namespace DragAndDropHelpers
return E_NOTIMPL; return E_NOTIMPL;
} }
JUCE_COMRESULT GetDataHere (FORMATETC*, STGMEDIUM*) { return DATA_E_FORMATETC; }
JUCE_COMRESULT SetData (FORMATETC*, STGMEDIUM*, BOOL) { return E_NOTIMPL; }
JUCE_COMRESULT DAdvise (FORMATETC*, DWORD, IAdviseSink*, DWORD*) { return OLE_E_ADVISENOTSUPPORTED; }
JUCE_COMRESULT DUnadvise (DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT EnumDAdvise (IEnumSTATDATA**) { return OLE_E_ADVISENOTSUPPORTED; }
JUCE_COMRESULT GetDataHere (FORMATETC*, STGMEDIUM*) override { return DATA_E_FORMATETC; }
JUCE_COMRESULT SetData (FORMATETC*, STGMEDIUM*, BOOL) override { return E_NOTIMPL; }
JUCE_COMRESULT DAdvise (FORMATETC*, DWORD, IAdviseSink*, DWORD*) override { return OLE_E_ADVISENOTSUPPORTED; }
JUCE_COMRESULT DUnadvise (DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT EnumDAdvise (IEnumSTATDATA**) override { return OLE_E_ADVISENOTSUPPORTED; }
private: private:
const FORMATETC* const format; const FORMATETC* const format;


+ 1
- 1
modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp View File

@@ -121,7 +121,7 @@ class RelativeRectangleLocalScope final : public Expression::Scope
public: public:
RelativeRectangleLocalScope (const RelativeRectangle& rect_) : rect (rect_) {} RelativeRectangleLocalScope (const RelativeRectangle& rect_) : rect (rect_) {}
Expression getSymbolValue (const String& symbol) const
Expression getSymbolValue (const String& symbol) const override
{ {
switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol)) switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol))
{ {


+ 2
- 2
modules/juce_gui_basics/widgets/juce_TableListBox.cpp View File

@@ -318,7 +318,7 @@ class TableListBox::Header final : public TableHeaderComponent
public: public:
Header (TableListBox& tlb) : owner (tlb) {} Header (TableListBox& tlb) : owner (tlb) {}
void addMenuItems (PopupMenu& menu, int columnIdClicked)
void addMenuItems (PopupMenu& menu, int columnIdClicked) override
{ {
if (owner.isAutoSizeMenuOptionShown()) if (owner.isAutoSizeMenuOptionShown())
{ {
@@ -330,7 +330,7 @@ public:
TableHeaderComponent::addMenuItems (menu, columnIdClicked); TableHeaderComponent::addMenuItems (menu, columnIdClicked);
} }
void reactToMenuItem (int menuReturnId, int columnIdClicked)
void reactToMenuItem (int menuReturnId, int columnIdClicked) override
{ {
switch (menuReturnId) switch (menuReturnId)
{ {


+ 50
- 50
modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp View File

@@ -37,23 +37,23 @@ namespace ActiveXHelpers
//============================================================================== //==============================================================================
struct JuceIStorage final : public ComBaseClassHelper<IStorage> struct JuceIStorage final : public ComBaseClassHelper<IStorage>
{ {
JuceIStorage() {}
JUCE_COMRESULT CreateStream (const WCHAR*, DWORD, DWORD, DWORD, IStream**) { return E_NOTIMPL; }
JUCE_COMRESULT OpenStream (const WCHAR*, void*, DWORD, DWORD, IStream**) { return E_NOTIMPL; }
JUCE_COMRESULT CreateStorage (const WCHAR*, DWORD, DWORD, DWORD, IStorage**) { return E_NOTIMPL; }
JUCE_COMRESULT OpenStorage (const WCHAR*, IStorage*, DWORD, SNB, DWORD, IStorage**) { return E_NOTIMPL; }
JUCE_COMRESULT CopyTo (DWORD, IID const*, SNB, IStorage*) { return E_NOTIMPL; }
JUCE_COMRESULT MoveElementTo (const OLECHAR*,IStorage*, const OLECHAR*, DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT Commit (DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT Revert() { return E_NOTIMPL; }
JUCE_COMRESULT EnumElements (DWORD, void*, DWORD, IEnumSTATSTG**) { return E_NOTIMPL; }
JUCE_COMRESULT DestroyElement (const OLECHAR*) { return E_NOTIMPL; }
JUCE_COMRESULT RenameElement (const WCHAR*, const WCHAR*) { return E_NOTIMPL; }
JUCE_COMRESULT SetElementTimes (const WCHAR*, FILETIME const*, FILETIME const*, FILETIME const*) { return E_NOTIMPL; }
JUCE_COMRESULT SetClass (REFCLSID) { return S_OK; }
JUCE_COMRESULT SetStateBits (DWORD, DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT Stat (STATSTG*, DWORD) { return E_NOTIMPL; }
JuceIStorage() = default;
JUCE_COMRESULT CreateStream (const WCHAR*, DWORD, DWORD, DWORD, IStream**) override { return E_NOTIMPL; }
JUCE_COMRESULT OpenStream (const WCHAR*, void*, DWORD, DWORD, IStream**) override { return E_NOTIMPL; }
JUCE_COMRESULT CreateStorage (const WCHAR*, DWORD, DWORD, DWORD, IStorage**) override { return E_NOTIMPL; }
JUCE_COMRESULT OpenStorage (const WCHAR*, IStorage*, DWORD, SNB, DWORD, IStorage**) override { return E_NOTIMPL; }
JUCE_COMRESULT CopyTo (DWORD, IID const*, SNB, IStorage*) override { return E_NOTIMPL; }
JUCE_COMRESULT MoveElementTo (const OLECHAR*,IStorage*, const OLECHAR*, DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT Commit (DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT Revert() override { return E_NOTIMPL; }
JUCE_COMRESULT EnumElements (DWORD, void*, DWORD, IEnumSTATSTG**) override { return E_NOTIMPL; }
JUCE_COMRESULT DestroyElement (const OLECHAR*) override { return E_NOTIMPL; }
JUCE_COMRESULT RenameElement (const WCHAR*, const WCHAR*) override { return E_NOTIMPL; }
JUCE_COMRESULT SetElementTimes (const WCHAR*, FILETIME const*, FILETIME const*, FILETIME const*) override { return E_NOTIMPL; }
JUCE_COMRESULT SetClass (REFCLSID) override { return S_OK; }
JUCE_COMRESULT SetStateBits (DWORD, DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT Stat (STATSTG*, DWORD) override { return E_NOTIMPL; }
}; };
//============================================================================== //==============================================================================
@@ -61,18 +61,18 @@ namespace ActiveXHelpers
{ {
JuceOleInPlaceFrame (HWND hwnd) : window (hwnd) {} JuceOleInPlaceFrame (HWND hwnd) : window (hwnd) {}
JUCE_COMRESULT GetWindow (HWND* lphwnd) { *lphwnd = window; return S_OK; }
JUCE_COMRESULT ContextSensitiveHelp (BOOL) { return E_NOTIMPL; }
JUCE_COMRESULT GetBorder (LPRECT) { return E_NOTIMPL; }
JUCE_COMRESULT RequestBorderSpace (LPCBORDERWIDTHS) { return E_NOTIMPL; }
JUCE_COMRESULT SetBorderSpace (LPCBORDERWIDTHS) { return E_NOTIMPL; }
JUCE_COMRESULT SetActiveObject (IOleInPlaceActiveObject* a, LPCOLESTR) { activeObject = a; return S_OK; }
JUCE_COMRESULT InsertMenus (HMENU, LPOLEMENUGROUPWIDTHS) { return E_NOTIMPL; }
JUCE_COMRESULT SetMenu (HMENU, HOLEMENU, HWND) { return S_OK; }
JUCE_COMRESULT RemoveMenus (HMENU) { return E_NOTIMPL; }
JUCE_COMRESULT SetStatusText (LPCOLESTR) { return S_OK; }
JUCE_COMRESULT EnableModeless (BOOL) { return S_OK; }
JUCE_COMRESULT TranslateAccelerator (LPMSG, WORD) { return E_NOTIMPL; }
JUCE_COMRESULT GetWindow (HWND* lphwnd) override { *lphwnd = window; return S_OK; }
JUCE_COMRESULT ContextSensitiveHelp (BOOL) override { return E_NOTIMPL; }
JUCE_COMRESULT GetBorder (LPRECT) override { return E_NOTIMPL; }
JUCE_COMRESULT RequestBorderSpace (LPCBORDERWIDTHS) override { return E_NOTIMPL; }
JUCE_COMRESULT SetBorderSpace (LPCBORDERWIDTHS) override { return E_NOTIMPL; }
JUCE_COMRESULT SetActiveObject (IOleInPlaceActiveObject* a, LPCOLESTR) override { activeObject = a; return S_OK; }
JUCE_COMRESULT InsertMenus (HMENU, LPOLEMENUGROUPWIDTHS) override { return E_NOTIMPL; }
JUCE_COMRESULT SetMenu (HMENU, HOLEMENU, HWND) override { return S_OK; }
JUCE_COMRESULT RemoveMenus (HMENU) override { return E_NOTIMPL; }
JUCE_COMRESULT SetStatusText (LPCOLESTR) override { return S_OK; }
JUCE_COMRESULT EnableModeless (BOOL) override { return S_OK; }
JUCE_COMRESULT TranslateAccelerator (LPMSG, WORD) override { return E_NOTIMPL; }
HRESULT OfferKeyTranslation (LPMSG lpmsg) HRESULT OfferKeyTranslation (LPMSG lpmsg)
{ {
@@ -94,18 +94,18 @@ namespace ActiveXHelpers
frame (new JuceOleInPlaceFrame (window)) frame (new JuceOleInPlaceFrame (window))
{} {}
~JuceIOleInPlaceSite()
~JuceIOleInPlaceSite() override
{ {
frame->Release(); frame->Release();
} }
JUCE_COMRESULT GetWindow (HWND* lphwnd) { *lphwnd = window; return S_OK; }
JUCE_COMRESULT ContextSensitiveHelp (BOOL) { return E_NOTIMPL; }
JUCE_COMRESULT CanInPlaceActivate() { return S_OK; }
JUCE_COMRESULT OnInPlaceActivate() { return S_OK; }
JUCE_COMRESULT OnUIActivate() { return S_OK; }
JUCE_COMRESULT GetWindow (HWND* lphwnd) override { *lphwnd = window; return S_OK; }
JUCE_COMRESULT ContextSensitiveHelp (BOOL) override { return E_NOTIMPL; }
JUCE_COMRESULT CanInPlaceActivate() override { return S_OK; }
JUCE_COMRESULT OnInPlaceActivate() override { return S_OK; }
JUCE_COMRESULT OnUIActivate() override { return S_OK; }
JUCE_COMRESULT GetWindowContext (LPOLEINPLACEFRAME* lplpFrame, LPOLEINPLACEUIWINDOW* lplpDoc, LPRECT, LPRECT, LPOLEINPLACEFRAMEINFO lpFrameInfo)
JUCE_COMRESULT GetWindowContext (LPOLEINPLACEFRAME* lplpFrame, LPOLEINPLACEUIWINDOW* lplpDoc, LPRECT, LPRECT, LPOLEINPLACEFRAMEINFO lpFrameInfo) override
{ {
/* Note: If you call AddRef on the frame here, then some types of object (e.g. web browser control) cause leaks.. /* Note: If you call AddRef on the frame here, then some types of object (e.g. web browser control) cause leaks..
If you don't call AddRef then others crash (e.g. QuickTime).. Bit of a catch-22, so letting it leak is probably preferable. If you don't call AddRef then others crash (e.g. QuickTime).. Bit of a catch-22, so letting it leak is probably preferable.
@@ -119,12 +119,12 @@ namespace ActiveXHelpers
return S_OK; return S_OK;
} }
JUCE_COMRESULT Scroll (SIZE) { return E_NOTIMPL; }
JUCE_COMRESULT OnUIDeactivate (BOOL) { return S_OK; }
JUCE_COMRESULT OnInPlaceDeactivate() { return S_OK; }
JUCE_COMRESULT DiscardUndoState() { return E_NOTIMPL; }
JUCE_COMRESULT DeactivateAndUndo() { return E_NOTIMPL; }
JUCE_COMRESULT OnPosRectChange (LPCRECT) { return S_OK; }
JUCE_COMRESULT Scroll (SIZE) override { return E_NOTIMPL; }
JUCE_COMRESULT OnUIDeactivate (BOOL) override { return S_OK; }
JUCE_COMRESULT OnInPlaceDeactivate() override { return S_OK; }
JUCE_COMRESULT DiscardUndoState() override { return E_NOTIMPL; }
JUCE_COMRESULT DeactivateAndUndo() override { return E_NOTIMPL; }
JUCE_COMRESULT OnPosRectChange (LPCRECT) override { return S_OK; }
LRESULT offerEventToActiveXControl (::MSG& msg) LRESULT offerEventToActiveXControl (::MSG& msg)
{ {
@@ -144,7 +144,7 @@ namespace ActiveXHelpers
JuceIOleClientSite (HWND window) : inplaceSite (new JuceIOleInPlaceSite (window)) JuceIOleClientSite (HWND window) : inplaceSite (new JuceIOleInPlaceSite (window))
{} {}
~JuceIOleClientSite()
~JuceIOleClientSite() override
{ {
inplaceSite->Release(); inplaceSite->Release();
@@ -155,7 +155,7 @@ namespace ActiveXHelpers
} }
} }
JUCE_COMRESULT QueryInterface (REFIID type, void** result)
JUCE_COMRESULT QueryInterface (REFIID type, void** result) override
{ {
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token") JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
@@ -177,12 +177,12 @@ namespace ActiveXHelpers
JUCE_END_IGNORE_WARNINGS_GCC_LIKE JUCE_END_IGNORE_WARNINGS_GCC_LIKE
} }
JUCE_COMRESULT SaveObject() { return E_NOTIMPL; }
JUCE_COMRESULT GetMoniker (DWORD, DWORD, IMoniker**) { return E_NOTIMPL; }
JUCE_COMRESULT GetContainer (LPOLECONTAINER* ppContainer) { *ppContainer = nullptr; return E_NOINTERFACE; }
JUCE_COMRESULT ShowObject() { return S_OK; }
JUCE_COMRESULT OnShowWindow (BOOL) { return E_NOTIMPL; }
JUCE_COMRESULT RequestNewObjectLayout() { return E_NOTIMPL; }
JUCE_COMRESULT SaveObject() override { return E_NOTIMPL; }
JUCE_COMRESULT GetMoniker (DWORD, DWORD, IMoniker**) override { return E_NOTIMPL; }
JUCE_COMRESULT GetContainer (LPOLECONTAINER* ppContainer) override { *ppContainer = nullptr; return E_NOINTERFACE; }
JUCE_COMRESULT ShowObject() override { return S_OK; }
JUCE_COMRESULT OnShowWindow (BOOL) override { return E_NOTIMPL; }
JUCE_COMRESULT RequestNewObjectLayout() override { return E_NOTIMPL; }
LRESULT offerEventToActiveXControl (::MSG& msg) LRESULT offerEventToActiveXControl (::MSG& msg)
{ {


+ 1
- 1
modules/juce_opengl/opengl/juce_OpenGLContext.cpp View File

@@ -670,7 +670,7 @@ public:
: originalWorker (std::move (workerToUse)) : originalWorker (std::move (workerToUse))
{} {}
void operator() (OpenGLContext& calleeContext)
void operator() (OpenGLContext& calleeContext) override
{ {
if (originalWorker != nullptr) if (originalWorker != nullptr)
(*originalWorker) (calleeContext); (*originalWorker) (calleeContext);


+ 3
- 3
modules/juce_osc/osc/juce_OSCAddress.cpp View File

@@ -406,7 +406,7 @@ public:
: UnitTest ("OSCAddress class", UnitTestCategories::osc) : UnitTest ("OSCAddress class", UnitTestCategories::osc)
{} {}
void runTest()
void runTest() override
{ {
beginTest ("construction and parsing"); beginTest ("construction and parsing");
{ {
@@ -452,7 +452,7 @@ public:
: UnitTest ("OSCAddressPattern class", UnitTestCategories::osc) : UnitTest ("OSCAddressPattern class", UnitTestCategories::osc)
{} {}
void runTest()
void runTest() override
{ {
beginTest ("construction and parsing"); beginTest ("construction and parsing");
{ {
@@ -593,7 +593,7 @@ public:
: UnitTest ("OSCAddress class / pattern matching", UnitTestCategories::osc) : UnitTest ("OSCAddress class / pattern matching", UnitTestCategories::osc)
{} {}
void runTest()
void runTest() override
{ {
beginTest ("basic string matching"); beginTest ("basic string matching");
{ {


+ 1
- 1
modules/juce_osc/osc/juce_OSCArgument.cpp View File

@@ -102,7 +102,7 @@ public:
return block; return block;
} }
void runTest()
void runTest() override
{ {
runTestInitialisation(); runTestInitialisation();
} }


+ 2
- 2
modules/juce_osc/osc/juce_OSCBundle.cpp View File

@@ -119,7 +119,7 @@ public:
: UnitTest ("OSCBundle class", UnitTestCategories::osc) : UnitTest ("OSCBundle class", UnitTestCategories::osc)
{} {}
void runTest()
void runTest() override
{ {
beginTest ("Construction"); beginTest ("Construction");
{ {
@@ -224,7 +224,7 @@ public:
: UnitTest ("OSCBundle::Element class", UnitTestCategories::osc) : UnitTest ("OSCBundle::Element class", UnitTestCategories::osc)
{} {}
void runTest()
void runTest() override
{ {
beginTest ("Construction from OSCMessage"); beginTest ("Construction from OSCMessage");
{ {


+ 1
- 1
modules/juce_osc/osc/juce_OSCMessage.cpp View File

@@ -107,7 +107,7 @@ public:
: UnitTest ("OSCMessage class", UnitTestCategories::osc) : UnitTest ("OSCMessage class", UnitTestCategories::osc)
{} {}
void runTest()
void runTest() override
{ {
beginTest ("Basic usage"); beginTest ("Basic usage");
{ {


+ 1
- 1
modules/juce_osc/osc/juce_OSCReceiver.cpp View File

@@ -670,7 +670,7 @@ public:
: UnitTest ("OSCInputStream class", UnitTestCategories::osc) : UnitTest ("OSCInputStream class", UnitTestCategories::osc)
{} {}
void runTest()
void runTest() override
{ {
beginTest ("reading OSC addresses"); beginTest ("reading OSC addresses");
{ {


+ 2
- 2
modules/juce_osc/osc/juce_OSCSender.cpp View File

@@ -343,7 +343,7 @@ public:
: UnitTest ("OSCBinaryWriter class", UnitTestCategories::osc) : UnitTest ("OSCBinaryWriter class", UnitTestCategories::osc)
{} {}
void runTest()
void runTest() override
{ {
beginTest ("writing OSC addresses"); beginTest ("writing OSC addresses");
{ {
@@ -672,7 +672,7 @@ public:
: UnitTest ("OSCRoundTripTests class", UnitTestCategories::osc) : UnitTest ("OSCRoundTripTests class", UnitTestCategories::osc)
{} {}
void runTest()
void runTest() override
{ {
beginTest ("Empty OSC message"); beginTest ("Empty OSC message");
{ {


+ 1
- 1
modules/juce_osc/osc/juce_OSCTimeTag.cpp View File

@@ -83,7 +83,7 @@ public:
: UnitTest ("OSCTimeTag class", UnitTestCategories::osc) : UnitTest ("OSCTimeTag class", UnitTestCategories::osc)
{} {}
void runTest()
void runTest() override
{ {
beginTest ("Basics"); beginTest ("Basics");


+ 3
- 3
modules/juce_video/native/juce_CameraDevice_windows.h View File

@@ -530,7 +530,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
GrabberCallback (Pimpl& p) GrabberCallback (Pimpl& p)
: ComBaseClassHelperBase (0), owner (p) {} : ComBaseClassHelperBase (0), owner (p) {}
JUCE_COMRESULT QueryInterface (REFIID refId, void** result)
JUCE_COMRESULT QueryInterface (REFIID refId, void** result) override
{ {
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token") JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
if (refId == __uuidof (ComTypes::ISampleGrabberCB)) if (refId == __uuidof (ComTypes::ISampleGrabberCB))
@@ -540,9 +540,9 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
return ComBaseClassHelperBase<ComTypes::ISampleGrabberCB>::QueryInterface (refId, result); return ComBaseClassHelperBase<ComTypes::ISampleGrabberCB>::QueryInterface (refId, result);
} }
JUCE_COMRESULT SampleCB (double, ComTypes::IMediaSample*) { return E_FAIL; }
JUCE_COMRESULT SampleCB (double, ComTypes::IMediaSample*) override { return E_FAIL; }
JUCE_COMRESULT BufferCB (double time, BYTE* buffer, long bufferSize)
JUCE_COMRESULT BufferCB (double time, BYTE* buffer, long bufferSize) override
{ {
owner.handleFrame (time, buffer, bufferSize); owner.handleFrame (time, buffer, bufferSize);
return S_OK; return S_OK;


Loading…
Cancel
Save