diff --git a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp index 078e75de61..3f608112de 100644 --- a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp +++ b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp @@ -308,7 +308,7 @@ namespace CodeHelpers return "Colour (0x" + hexString8Digits ((int) col.getARGB()) + ')'; } - String justificationToCode (const Justification& justification) + String justificationToCode (Justification justification) { switch (justification.getFlags()) { diff --git a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h index c3f9df0ddb..d3f63b49ae 100644 --- a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h +++ b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h @@ -42,7 +42,7 @@ namespace CodeHelpers String boolLiteral (bool value); String colourToCode (Colour col); - String justificationToCode (const Justification&); + String justificationToCode (Justification); String alignFunctionCallParams (const String& call, const StringArray& parameters, int maxLineLength); diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.cpp b/modules/juce_graphics/contexts/juce_GraphicsContext.cpp index 05775072fc..06dd6d33a0 100644 --- a/modules/juce_graphics/contexts/juce_GraphicsContext.cpp +++ b/modules/juce_graphics/contexts/juce_GraphicsContext.cpp @@ -222,7 +222,7 @@ Font Graphics::getCurrentFont() const //============================================================================== void Graphics::drawSingleLineText (const String& text, const int startX, const int baselineY, - const Justification& justification) const + Justification justification) const { if (text.isNotEmpty() && startX < context.getClipBounds().getRight()) @@ -266,7 +266,7 @@ void Graphics::drawMultiLineText (const String& text, const int startX, } void Graphics::drawText (const String& text, const Rectangle& area, - const Justification& justificationType, + Justification justificationType, const bool useEllipsesIfTooBig) const { if (text.isNotEmpty() && context.clipRegionIntersects (area)) @@ -285,14 +285,14 @@ void Graphics::drawText (const String& text, const Rectangle& area, } void Graphics::drawText (const String& text, const int x, const int y, const int width, const int height, - const Justification& justificationType, + Justification justificationType, const bool useEllipsesIfTooBig) const { drawText (text, Rectangle (x, y, width, height), justificationType, useEllipsesIfTooBig); } void Graphics::drawFittedText (const String& text, const Rectangle& area, - const Justification& justification, + Justification justification, const int maximumNumberOfLines, const float minimumHorizontalScale) const { @@ -311,7 +311,7 @@ void Graphics::drawFittedText (const String& text, const Rectangle& area, } void Graphics::drawFittedText (const String& text, const int x, const int y, const int width, const int height, - const Justification& justification, + Justification justification, const int maximumNumberOfLines, const float minimumHorizontalScale) const { diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.h b/modules/juce_graphics/contexts/juce_GraphicsContext.h index 816afc412b..a0ae117a7c 100644 --- a/modules/juce_graphics/contexts/juce_GraphicsContext.h +++ b/modules/juce_graphics/contexts/juce_GraphicsContext.h @@ -144,7 +144,7 @@ public: */ void drawSingleLineText (const String& text, int startX, int baselineY, - const Justification& justification = Justification::left) const; + Justification justification = Justification::left) const; /** Draws text across multiple lines. @@ -169,7 +169,7 @@ public: */ void drawText (const String& text, int x, int y, int width, int height, - const Justification& justificationType, + Justification justificationType, bool useEllipsesIfTooBig) const; /** Draws a line of text within a specified rectangle. @@ -183,7 +183,7 @@ public: */ void drawText (const String& text, const Rectangle& area, - const Justification& justificationType, + Justification justificationType, bool useEllipsesIfTooBig) const; /** Tries to draw a text string inside a given space. @@ -207,7 +207,7 @@ public: */ void drawFittedText (const String& text, int x, int y, int width, int height, - const Justification& justificationFlags, + Justification justificationFlags, int maximumNumberOfLines, float minimumHorizontalScale = 0.7f) const; @@ -232,7 +232,7 @@ public: */ void drawFittedText (const String& text, const Rectangle& area, - const Justification& justificationFlags, + Justification justificationFlags, int maximumNumberOfLines, float minimumHorizontalScale = 0.7f) const; diff --git a/modules/juce_graphics/fonts/juce_AttributedString.cpp b/modules/juce_graphics/fonts/juce_AttributedString.cpp index b4716fafd2..d5999c8e94 100644 --- a/modules/juce_graphics/fonts/juce_AttributedString.cpp +++ b/modules/juce_graphics/fonts/juce_AttributedString.cpp @@ -170,7 +170,7 @@ void AttributedString::clear() attributes.clear(); } -void AttributedString::setJustification (const Justification& newJustification) noexcept +void AttributedString::setJustification (Justification newJustification) noexcept { justification = newJustification; } diff --git a/modules/juce_graphics/fonts/juce_AttributedString.h b/modules/juce_graphics/fonts/juce_AttributedString.h index f9f1dd4dd2..00f0c084da 100644 --- a/modules/juce_graphics/fonts/juce_AttributedString.h +++ b/modules/juce_graphics/fonts/juce_AttributedString.h @@ -102,7 +102,7 @@ public: /** Sets the justification that should be used for laying-out the text. This may include both vertical and horizontal flags. */ - void setJustification (const Justification& newJustification) noexcept; + void setJustification (Justification newJustification) noexcept; //============================================================================== /** Types of word-wrap behaviour. diff --git a/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp b/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp index 46d4746dea..d5d09ebee6 100644 --- a/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp +++ b/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp @@ -50,7 +50,7 @@ HyperlinkButton::~HyperlinkButton() //============================================================================== void HyperlinkButton::setFont (const Font& newFont, const bool resizeToMatchComponentHeight, - const Justification& justificationType) + Justification justificationType) { font = newFont; resizeFont = resizeToMatchComponentHeight; diff --git a/modules/juce_gui_basics/buttons/juce_HyperlinkButton.h b/modules/juce_gui_basics/buttons/juce_HyperlinkButton.h index 4563f3250f..52a5133ab1 100644 --- a/modules/juce_gui_basics/buttons/juce_HyperlinkButton.h +++ b/modules/juce_gui_basics/buttons/juce_HyperlinkButton.h @@ -63,7 +63,7 @@ public: */ void setFont (const Font& newFont, bool resizeToMatchComponentHeight, - const Justification& justificationType = Justification::horizontallyCentred); + Justification justificationType = Justification::horizontallyCentred); //============================================================================== /** A set of colour IDs to use to change the colour of various aspects of the link. diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index 4f6c97c6eb..3194624eea 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -1167,7 +1167,7 @@ void Component::setBoundsInset (const BorderSize& borders) } void Component::setBoundsToFit (int x, int y, int width, int height, - const Justification& justification, + Justification justification, const bool onlyReduceInSize) { // it's no good calling this method unless both the component and diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h index 5b22678198..9579731c93 100644 --- a/modules/juce_gui_basics/components/juce_Component.h +++ b/modules/juce_gui_basics/components/juce_Component.h @@ -565,7 +565,7 @@ public: @see setBounds */ void setBoundsToFit (int x, int y, int width, int height, - const Justification& justification, + Justification justification, bool onlyReduceInSize); /** Changes the position of the component's centre. diff --git a/modules/juce_gui_basics/drawables/juce_DrawableText.cpp b/modules/juce_gui_basics/drawables/juce_DrawableText.cpp index 1edc6cccc4..dafe3ecada 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableText.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableText.cpp @@ -83,7 +83,7 @@ void DrawableText::setFont (const Font& newFont, bool applySizeAndScale) } } -void DrawableText::setJustification (const Justification& newJustification) +void DrawableText::setJustification (Justification newJustification) { justification = newJustification; repaint(); @@ -235,7 +235,7 @@ Justification DrawableText::ValueTreeWrapper::getJustification() const return Justification ((int) state [justification]); } -void DrawableText::ValueTreeWrapper::setJustification (const Justification& newJustification, UndoManager* undoManager) +void DrawableText::ValueTreeWrapper::setJustification (Justification newJustification, UndoManager* undoManager) { state.setProperty (justification, newJustification.getFlags(), undoManager); } diff --git a/modules/juce_gui_basics/drawables/juce_DrawableText.h b/modules/juce_gui_basics/drawables/juce_DrawableText.h index 7930f77c80..20e51a9046 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableText.h +++ b/modules/juce_gui_basics/drawables/juce_DrawableText.h @@ -71,10 +71,10 @@ public: const Font& getFont() const noexcept { return font; } /** Changes the justification of the text within the bounding box. */ - void setJustification (const Justification& newJustification); + void setJustification (Justification newJustification); /** Returns the current justification. */ - const Justification& getJustification() const noexcept { return justification; } + Justification getJustification() const noexcept { return justification; } /** Returns the parallelogram that defines the text bounding box. */ const RelativeParallelogram& getBoundingBox() const noexcept { return bounds; } @@ -117,7 +117,7 @@ public: void setColour (Colour newColour, UndoManager* undoManager); Justification getJustification() const; - void setJustification (const Justification& newJustification, UndoManager* undoManager); + void setJustification (Justification newJustification, UndoManager* undoManager); Font getFont() const; void setFont (const Font& newFont, UndoManager* undoManager); diff --git a/modules/juce_gui_basics/layout/juce_GroupComponent.cpp b/modules/juce_gui_basics/layout/juce_GroupComponent.cpp index 481a071e32..867d87080c 100644 --- a/modules/juce_gui_basics/layout/juce_GroupComponent.cpp +++ b/modules/juce_gui_basics/layout/juce_GroupComponent.cpp @@ -51,7 +51,7 @@ String GroupComponent::getText() const } //============================================================================== -void GroupComponent::setTextLabelPosition (const Justification& newJustification) +void GroupComponent::setTextLabelPosition (Justification newJustification) { if (justification != newJustification) { diff --git a/modules/juce_gui_basics/layout/juce_GroupComponent.h b/modules/juce_gui_basics/layout/juce_GroupComponent.h index d2c0dfb820..251d3a7566 100644 --- a/modules/juce_gui_basics/layout/juce_GroupComponent.h +++ b/modules/juce_gui_basics/layout/juce_GroupComponent.h @@ -62,13 +62,13 @@ public: @see getTextLabelPosition */ - void setTextLabelPosition (const Justification& justification); + void setTextLabelPosition (Justification justification); /** Returns the current text label position. @see setTextLabelPosition */ - const Justification getTextLabelPosition() const noexcept { return justification; } + Justification getTextLabelPosition() const noexcept { return justification; } //============================================================================== /** A set of colour IDs to use to change the colour of various aspects of the component. diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp index ea90062af9..07006b9cb8 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp @@ -77,7 +77,7 @@ bool ComboBox::isTextEditable() const noexcept return label->isEditable(); } -void ComboBox::setJustificationType (const Justification& justification) +void ComboBox::setJustificationType (Justification justification) { label->setJustificationType (justification); } diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.h b/modules/juce_gui_basics/widgets/juce_ComboBox.h index cc5cb743dd..a77539feee 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.h +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.h @@ -82,7 +82,7 @@ public: The default is Justification::centredLeft. The text is displayed using a Label component inside the ComboBox. */ - void setJustificationType (const Justification& justification); + void setJustificationType (Justification justification); /** Returns the current justification for the text box. @see setJustificationType diff --git a/modules/juce_gui_basics/widgets/juce_Label.cpp b/modules/juce_gui_basics/widgets/juce_Label.cpp index 40d9a00b71..2f06c8d87a 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.cpp +++ b/modules/juce_gui_basics/widgets/juce_Label.cpp @@ -115,7 +115,7 @@ void Label::setEditable (const bool editOnSingleClick, setFocusContainer (editOnSingleClick || editOnDoubleClick); } -void Label::setJustificationType (const Justification& newJustification) +void Label::setJustificationType (Justification newJustification) { if (justification != newJustification) { diff --git a/modules/juce_gui_basics/widgets/juce_Label.h b/modules/juce_gui_basics/widgets/juce_Label.h index 064d7c0854..09271f6a06 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.h +++ b/modules/juce_gui_basics/widgets/juce_Label.h @@ -114,7 +114,7 @@ public: (The default is Justification::centredLeft) */ - void setJustificationType (const Justification& justification); + void setJustificationType (Justification justification); /** Returns the type of justification, as set in setJustificationType(). */ Justification getJustificationType() const noexcept { return justification; }