diff --git a/examples/Demo/Source/Demos/AnimationDemo.cpp b/examples/Demo/Source/Demos/AnimationDemo.cpp index bdbbfc5af7..54d8bd9abf 100644 --- a/examples/Demo/Source/Demos/AnimationDemo.cpp +++ b/examples/Demo/Source/Demos/AnimationDemo.cpp @@ -102,7 +102,7 @@ struct BallComponent : public Component return position.y < 400.0f && position.x >= -10.0f; } - void paint (Graphics& g) + void paint (Graphics& g) override { g.setColour (colour); g.fillEllipse (2.0f, 2.0f, getWidth() - 4.0f, getHeight() - 4.0f); diff --git a/examples/Demo/Source/Demos/Box2DDemo.cpp b/examples/Demo/Source/Demos/Box2DDemo.cpp index 2b22d95493..014f3b1534 100644 --- a/examples/Demo/Source/Demos/Box2DDemo.cpp +++ b/examples/Demo/Source/Demos/Box2DDemo.cpp @@ -136,7 +136,7 @@ struct Box2DRenderComponent : public Component setOpaque (true); } - void paint (Graphics& g) + void paint (Graphics& g) override { g.fillAll (Colours::white); diff --git a/examples/Demo/Source/Demos/GraphicsDemo.cpp b/examples/Demo/Source/Demos/GraphicsDemo.cpp index 4d1dc5d246..7ca7e6daff 100644 --- a/examples/Demo/Source/Demos/GraphicsDemo.cpp +++ b/examples/Demo/Source/Demos/GraphicsDemo.cpp @@ -569,13 +569,13 @@ public: setOpaque (true); } - void paint (Graphics& g) + void paint (Graphics& g) override { g.fillCheckerBoard (getLocalBounds(), 48, 48, Colours::lightgrey, Colours::white); } - void timerCallback() + void timerCallback() override { if (currentDemo != nullptr) currentDemo->repaint(); @@ -596,7 +596,7 @@ public: } } - void resized() + void resized() override { if (currentDemo != nullptr) currentDemo->setBounds (getLocalBounds()); diff --git a/examples/Demo/Source/Demos/LiveConstantDemo.cpp b/examples/Demo/Source/Demos/LiveConstantDemo.cpp index 61b894ee0c..8768706cd6 100644 --- a/examples/Demo/Source/Demos/LiveConstantDemo.cpp +++ b/examples/Demo/Source/Demos/LiveConstantDemo.cpp @@ -30,7 +30,7 @@ struct LiveConstantDemoComponent : public Component { LiveConstantDemoComponent() {} - void paint (Graphics& g) + void paint (Graphics& g) override { g.fillAll (JUCE_LIVE_CONSTANT (Colour (0xffe5e7a7))); diff --git a/examples/Demo/Source/Demos/WindowsDemo.cpp b/examples/Demo/Source/Demos/WindowsDemo.cpp index d75016e446..8f68f1cb51 100644 --- a/examples/Demo/Source/Demos/WindowsDemo.cpp +++ b/examples/Demo/Source/Demos/WindowsDemo.cpp @@ -110,13 +110,13 @@ public: startTimer (60); } - void paint (Graphics& g) + void paint (Graphics& g) override { g.setColour (colour); g.fillEllipse (ballBounds - getPosition().toFloat()); } - void timerCallback() + void timerCallback() override { ballBounds += direction; @@ -150,18 +150,18 @@ public: } } - void mouseDown (const MouseEvent& e) + void mouseDown (const MouseEvent& e) override { dragger.startDraggingComponent (this, e); } - void mouseDrag (const MouseEvent& e) + void mouseDrag (const MouseEvent& e) override { // as there's no titlebar we have to manage the dragging ourselves dragger.dragComponent (this, e, 0); } - void paint (Graphics& g) + void paint (Graphics& g) override { if (isOpaque()) g.fillAll (Colours::white); diff --git a/examples/audio plugin host/Source/GraphEditorPanel.cpp b/examples/audio plugin host/Source/GraphEditorPanel.cpp index 099423a3c8..1824551fe5 100644 --- a/examples/audio plugin host/Source/GraphEditorPanel.cpp +++ b/examples/audio plugin host/Source/GraphEditorPanel.cpp @@ -136,12 +136,12 @@ public: setSize (400, jlimit (25, 400, totalHeight)); } - void paint (Graphics& g) + void paint (Graphics& g) override { g.fillAll (Colours::grey); } - void resized() + void resized() override { panel.setBounds (getLocalBounds()); } @@ -253,7 +253,7 @@ public: setSize (16, 16); } - void paint (Graphics& g) + void paint (Graphics& g) override { const float w = (float) getWidth(); const float h = (float) getHeight(); @@ -267,7 +267,7 @@ public: g.fillPath (p); } - void mouseDown (const MouseEvent& e) + void mouseDown (const MouseEvent& e) override { getGraphPanel()->beginConnectorDrag (isInput ? 0 : filterID, index, @@ -276,12 +276,12 @@ public: e); } - void mouseDrag (const MouseEvent& e) + void mouseDrag (const MouseEvent& e) override { getGraphPanel()->dragConnector (e); } - void mouseUp (const MouseEvent& e) + void mouseUp (const MouseEvent& e) override { getGraphPanel()->endDraggingConnector (e); } @@ -663,7 +663,7 @@ public: } } - void paint (Graphics& g) + void paint (Graphics& g) override { if (sourceFilterChannel == FilterGraph::midiChannelNumber || destFilterChannel == FilterGraph::midiChannelNumber) @@ -678,7 +678,7 @@ public: g.fillPath (linePath); } - bool hitTest (int x, int y) + bool hitTest (int x, int y) override { if (hitPath.contains ((float) x, (float) y)) { @@ -692,12 +692,12 @@ public: return false; } - void mouseDown (const MouseEvent&) + void mouseDown (const MouseEvent&) override { dragging = false; } - void mouseDrag (const MouseEvent& e) + void mouseDrag (const MouseEvent& e) override { if (dragging) { @@ -721,13 +721,13 @@ public: } } - void mouseUp (const MouseEvent& e) + void mouseUp (const MouseEvent& e) override { if (dragging) getGraphPanel()->endDraggingConnector (e); } - void resized() + void resized() override { float x1, y1, x2, y2; getPoints (x1, y1, x2, y2); @@ -1058,14 +1058,14 @@ public: startTimer (100); } - void paint (Graphics& g) + void paint (Graphics& g) override { g.setFont (Font (getHeight() * 0.7f, Font::bold)); g.setColour (Colours::black); g.drawFittedText (tip, 10, 0, getWidth() - 12, getHeight(), Justification::centredLeft, 1); } - void timerCallback() + void timerCallback() override { Component* const underMouse = Desktop::getInstance().getMainMouseSource().getComponentUnderMouse(); TooltipClient* const ttc = dynamic_cast (underMouse); diff --git a/extras/Projucer/JuceLibraryCode/BinaryData.cpp b/extras/Projucer/JuceLibraryCode/BinaryData.cpp index 5f9d56aa38..07bb73dcfb 100644 --- a/extras/Projucer/JuceLibraryCode/BinaryData.cpp +++ b/extras/Projucer/JuceLibraryCode/BinaryData.cpp @@ -738,7 +738,7 @@ static const unsigned char temp_binary_data_10[] = " {\r\n" " }\r\n" "\r\n" -" void paint (Graphics& g)\r\n" +" void paint (Graphics& g) override\r\n" " {\r\n" " // You should replace everything in this method with your own drawing code..\r\n" "\r\n" @@ -753,7 +753,7 @@ static const unsigned char temp_binary_data_10[] = " Justification::centred, true); // draw some placeholder text\r\n" " }\r\n" "\r\n" -" void resized()\r\n" +" void resized() override\r\n" " {\r\n" " // This method is where you should set the bounds of any child\r\n" " // components that your component contains..\r\n" @@ -1229,7 +1229,7 @@ static const unsigned char temp_binary_data_19[] = " {\r\n" " }\r\n" "\r\n" -" void paint (Graphics& g)\r\n" +" void paint (Graphics& g) override\r\n" " {\r\n" " /* This demo code just fills the component's background and\r\n" " draws some placeholder text to get you started.\r\n" @@ -1249,7 +1249,7 @@ static const unsigned char temp_binary_data_19[] = " Justification::centred, true); // draw some placeholder text\r\n" " }\r\n" "\r\n" -" void resized()\r\n" +" void resized() override\r\n" " {\r\n" " // This method is where you should set the bounds of any child\r\n" " // components that your component contains..\r\n" @@ -4027,7 +4027,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw case 0xfc72fe86: numBytes = 2155; return jucer_ComponentTemplate_h; case 0x0b66646c: numBytes = 886; return jucer_ContentCompTemplate_cpp; case 0x6fa10171: numBytes = 924; return jucer_ContentCompTemplate_h; - case 0x28d496ad: numBytes = 1143; return jucer_InlineComponentTemplate_h; + case 0x28d496ad: numBytes = 1161; return jucer_InlineComponentTemplate_h; case 0x8905395b: numBytes = 470; return jucer_MainConsoleAppTemplate_cpp; case 0x5e5ea047: numBytes = 1992; return jucer_MainTemplate_NoWindow_cpp; case 0xda2391f8: numBytes = 3848; return jucer_MainTemplate_SimpleWindow_cpp; @@ -4036,7 +4036,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw case 0xe7bf237a: numBytes = 648; return jucer_NewComponentTemplate_h; case 0x02a2a077: numBytes = 262; return jucer_NewCppFileTemplate_cpp; case 0x0842c43c: numBytes = 308; return jucer_NewCppFileTemplate_h; - case 0x36e634a1: numBytes = 1626; return jucer_NewInlineComponentTemplate_h; + case 0x36e634a1: numBytes = 1644; return jucer_NewInlineComponentTemplate_h; case 0x7fbac252: numBytes = 1827; return jucer_OpenGLComponentTemplate_cpp; case 0x406db5c1: numBytes = 3117; return background_logo_svg; case 0x4a0cfd09: numBytes = 151; return background_tile_png; diff --git a/extras/Projucer/JuceLibraryCode/BinaryData.h b/extras/Projucer/JuceLibraryCode/BinaryData.h index 3ae2fe1463..a3f56a0696 100644 --- a/extras/Projucer/JuceLibraryCode/BinaryData.h +++ b/extras/Projucer/JuceLibraryCode/BinaryData.h @@ -40,7 +40,7 @@ namespace BinaryData const int jucer_ContentCompTemplate_hSize = 924; extern const char* jucer_InlineComponentTemplate_h; - const int jucer_InlineComponentTemplate_hSize = 1143; + const int jucer_InlineComponentTemplate_hSize = 1161; extern const char* jucer_MainConsoleAppTemplate_cpp; const int jucer_MainConsoleAppTemplate_cppSize = 470; @@ -67,7 +67,7 @@ namespace BinaryData const int jucer_NewCppFileTemplate_hSize = 308; extern const char* jucer_NewInlineComponentTemplate_h; - const int jucer_NewInlineComponentTemplate_hSize = 1626; + const int jucer_NewInlineComponentTemplate_hSize = 1644; extern const char* jucer_OpenGLComponentTemplate_cpp; const int jucer_OpenGLComponentTemplate_cppSize = 1827; diff --git a/extras/Projucer/Source/Application/jucer_FilePreviewComponent.h b/extras/Projucer/Source/Application/jucer_FilePreviewComponent.h index d4532d5315..a27ce64f28 100644 --- a/extras/Projucer/Source/Application/jucer_FilePreviewComponent.h +++ b/extras/Projucer/Source/Application/jucer_FilePreviewComponent.h @@ -40,7 +40,7 @@ public: tryToLoadImage(); } - void paint (Graphics& g) + void paint (Graphics& g) override { ProjucerLookAndFeel::fillWithBackgroundTexture (*this, g); diff --git a/extras/Projucer/Source/BinaryData/jucer_InlineComponentTemplate.h b/extras/Projucer/Source/BinaryData/jucer_InlineComponentTemplate.h index 30c0128db0..63454b83d8 100644 --- a/extras/Projucer/Source/BinaryData/jucer_InlineComponentTemplate.h +++ b/extras/Projucer/Source/BinaryData/jucer_InlineComponentTemplate.h @@ -13,7 +13,7 @@ public: { } - void paint (Graphics& g) + void paint (Graphics& g) override { // You should replace everything in this method with your own drawing code.. @@ -28,7 +28,7 @@ public: Justification::centred, true); // draw some placeholder text } - void resized() + void resized() override { // This method is where you should set the bounds of any child // components that your component contains.. diff --git a/extras/Projucer/Source/BinaryData/jucer_NewInlineComponentTemplate.h b/extras/Projucer/Source/BinaryData/jucer_NewInlineComponentTemplate.h index 59c4575695..1e609178fd 100644 --- a/extras/Projucer/Source/BinaryData/jucer_NewInlineComponentTemplate.h +++ b/extras/Projucer/Source/BinaryData/jucer_NewInlineComponentTemplate.h @@ -30,7 +30,7 @@ public: { } - void paint (Graphics& g) + void paint (Graphics& g) override { /* This demo code just fills the component's background and draws some placeholder text to get you started. @@ -50,7 +50,7 @@ public: Justification::centred, true); // draw some placeholder text } - void resized() + void resized() override { // This method is where you should set the bounds of any child // components that your component contains.. diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h index d03ab2c27b..6d4e9940c0 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h @@ -31,7 +31,7 @@ public: { } - void paint (Graphics& g) + void paint (Graphics& g) override { g.fillAll (Colours::white.withAlpha (0.25f)); diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h index 7be04b0658..437838bff8 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h @@ -342,7 +342,7 @@ private: setSize (2048, 2048); } - void paint (Graphics& g) + void paint (Graphics& g) override { if (jucerComp == nullptr) g.fillCheckerBoard (getLocalBounds(), 50, 50, @@ -350,7 +350,7 @@ private: Colour::greyLevel (0.8f).withAlpha (0.4f)); } - void resized() + void resized() override { if (jucerComp != nullptr) { @@ -384,7 +384,7 @@ private: resized(); } - void parentHierarchyChanged() + void parentHierarchyChanged() override { updateContent(); } diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_ViewportHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_ViewportHandler.h index aa07b89e2c..308734339f 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_ViewportHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_ViewportHandler.h @@ -266,15 +266,14 @@ private: }; //============================================================================== - class ViewportDemoContentComp : public Component + struct ViewportDemoContentComp : public Component { - public: ViewportDemoContentComp() { setSize (2048, 2048); } - void paint (Graphics& g) + void paint (Graphics& g) override { g.fillCheckerBoard (getLocalBounds(), 50, 50, Colours::lightgrey.withAlpha (0.5f), diff --git a/extras/Projucer/Source/ComponentEditor/documents/jucer_ComponentDocument.cpp b/extras/Projucer/Source/ComponentEditor/documents/jucer_ComponentDocument.cpp index ff0c0e1240..2ade1ed87e 100644 --- a/extras/Projucer/Source/ComponentEditor/documents/jucer_ComponentDocument.cpp +++ b/extras/Projucer/Source/ComponentEditor/documents/jucer_ComponentDocument.cpp @@ -111,13 +111,13 @@ public: removeChildComponent (i); } - void paint (Graphics& g) + void paint (Graphics& g) override { document->getPaintRoutine (0)->fillWithBackground (g, alwaysFillBackground); document->getPaintRoutine (0)->drawElements (g, getLocalBounds()); } - void resized() + void resized() override { if (! getBounds().isEmpty()) { diff --git a/extras/Projucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h b/extras/Projucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h index 94026fc9af..a91714abf8 100644 --- a/extras/Projucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h +++ b/extras/Projucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h @@ -41,7 +41,7 @@ public: virtual Colour getColour() const = 0; virtual void resetToDefault() = 0; - void refresh() + void refresh() override { ((ColourPropEditorComponent*) getChildComponent (0))->refresh(); } @@ -55,7 +55,7 @@ public: { } - void paint (Graphics& g) + void paint (Graphics& g) override { g.fillAll (Colours::grey); @@ -86,13 +86,13 @@ public: } } - void mouseDown (const MouseEvent&) + void mouseDown (const MouseEvent&) override { CallOutBox::launchAsynchronously (new ColourSelectorComp (this, canResetToDefault), getScreenBounds(), nullptr); } - void changeListenerCallback (ChangeBroadcaster* source) + void changeListenerCallback (ChangeBroadcaster* source) override { const ColourSelector* const cs = (const ColourSelector*) source; @@ -123,7 +123,7 @@ public: setSize (300, 400); } - void resized() + void resized() override { if (defaultButton.isVisible()) { @@ -137,7 +137,7 @@ public: } } - void buttonClicked (Button*) + void buttonClicked (Button*) override { owner->resetToDefault(); owner->refresh(); diff --git a/extras/Projucer/Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp b/extras/Projucer/Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp index beaef68124..bcca9cc535 100644 --- a/extras/Projucer/Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp +++ b/extras/Projucer/Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp @@ -43,7 +43,7 @@ public: setFocusContainer (true); } - void paint (Graphics& g) + void paint (Graphics& g) override { if (! dontFillBackground) { @@ -59,7 +59,7 @@ public: } } - void resized() + void resized() override { if (! getBounds().isEmpty()) { @@ -92,7 +92,7 @@ public: } } - void moved() + void moved() override { ((ComponentLayoutEditor*) getParentComponent())->updateOverlayPositions(); } diff --git a/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp b/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp index 7929250256..c4753bd34a 100644 --- a/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp +++ b/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp @@ -58,12 +58,12 @@ public: document.removeChangeListener (this); } - int getNumRows() + int getNumRows() override { return methods.size(); } - void paintListBoxItem (int row, Graphics& g, int width, int height, bool rowIsSelected) + void paintListBoxItem (int row, Graphics& g, int width, int height, bool rowIsSelected) override { if (row < 0 || row >= getNumRows()) return; @@ -80,7 +80,7 @@ public: getLookAndFeel().drawTickBox (g, *this, 6, 2, 18, 18, document.isOptionalMethodEnabled (methods [row]), true, false, false); } - void listBoxItemClicked (int row, const MouseEvent& e) + void listBoxItemClicked (int row, const MouseEvent& e) override { if (row < 0 || row >= getNumRows()) return; @@ -90,17 +90,17 @@ public: ! document.isOptionalMethodEnabled (methods [row])); } - void paint (Graphics& g) + void paint (Graphics& g) override { g.fillAll (Colours::white); } - void resized() + void resized() override { listBox->setBounds (getLocalBounds()); } - void refresh() + void refresh() override { baseClasses.clear(); returnValues.clear(); @@ -113,7 +113,7 @@ public: listBox->repaint(); } - void changeListenerCallback (ChangeBroadcaster*) + void changeListenerCallback (ChangeBroadcaster*) override { refresh(); } diff --git a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp index d94e0ef5d3..d51a37a1d4 100644 --- a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp +++ b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp @@ -159,7 +159,7 @@ struct LogoComponent : public Component logo = Drawable::createFromSVG (*svg); } - void paint (Graphics& g) + void paint (Graphics& g) override { g.setColour (findColour (mainBackgroundColourId).contrasting (0.3f)); diff --git a/extras/Projucer/Source/Utility/jucer_SVGPathDataComponent.h b/extras/Projucer/Source/Utility/jucer_SVGPathDataComponent.h index 61fcc8f637..af29a2c556 100644 --- a/extras/Projucer/Source/Utility/jucer_SVGPathDataComponent.h +++ b/extras/Projucer/Source/Utility/jucer_SVGPathDataComponent.h @@ -54,12 +54,12 @@ public: userText.setText (getLastText()); } - void textEditorTextChanged (TextEditor&) + void textEditorTextChanged (TextEditor&) override { update(); } - void textEditorEscapeKeyPressed (TextEditor&) + void textEditorEscapeKeyPressed (TextEditor&) override { getTopLevelComponent()->exitModalState (0); } @@ -93,7 +93,7 @@ public: repaint (previewPathArea); } - void resized() + void resized() override { Rectangle r (getLocalBounds().reduced (8)); desc.setBounds (r.removeFromTop (44)); @@ -104,7 +104,7 @@ public: resultText.setBounds (r); } - void paint (Graphics& g) + void paint (Graphics& g) override { g.setColour (Colours::white); g.fillPath (path, path.getTransformToScaleToFit (previewPathArea.reduced (4).toFloat(), true)); diff --git a/extras/Projucer/Source/Utility/jucer_TranslationTool.h b/extras/Projucer/Source/Utility/jucer_TranslationTool.h index 5624f4f616..2fa6f927b4 100644 --- a/extras/Projucer/Source/Utility/jucer_TranslationTool.h +++ b/extras/Projucer/Source/Utility/jucer_TranslationTool.h @@ -356,12 +356,12 @@ public: loadButton.addListener (this); } - void paint (Graphics& g) + void paint (Graphics& g) override { ProjucerLookAndFeel::fillWithBackgroundTexture (*this, g); } - void resized() + void resized() override { const int m = 6; const int textH = 44; @@ -401,7 +401,7 @@ private: ProjucerLookAndFeel lf; - void buttonClicked (Button* b) + void buttonClicked (Button* b) override { if (b == &generateButton) generate(); else if (b == &loadButton) loadFile();