From 45b56e2e206c51c03995415574eaff653ca70e44 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 20 Aug 2013 17:27:41 +0100 Subject: [PATCH] Minor clean-ups around the Justification class. --- .../components/jucer_ComboBoxHandler.h | 6 +-- .../components/jucer_GroupComponentHandler.h | 6 +-- .../components/jucer_LabelHandler.h | 6 +-- .../paintelements/jucer_PaintElementText.h | 12 ++--- .../properties/jucer_JustificationProperty.h | 5 +-- .../fonts/juce_GlyphArrangement.cpp | 8 ++-- .../fonts/juce_GlyphArrangement.h | 21 ++++----- modules/juce_graphics/juce_graphics.cpp | 1 - .../placement/juce_Justification.cpp | 44 ------------------- .../placement/juce_Justification.h | 21 +++++---- .../juce_gui_basics/menus/juce_PopupMenu.cpp | 29 ++++++------ 11 files changed, 57 insertions(+), 102 deletions(-) delete mode 100644 modules/juce_graphics/placement/juce_Justification.cpp diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h index 1893a675d0..0154d7067a 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h @@ -231,13 +231,13 @@ private: { } - void setJustification (const Justification& newJustification) + void setJustification (Justification newJustification) { document.perform (new ComboJustifyChangeAction (component, *document.getComponentLayout(), newJustification), "Change combo box justification"); } - const Justification getJustification() const { return component->getJustificationType(); } + Justification getJustification() const { return component->getJustificationType(); } private: ComboBox* const component; @@ -246,7 +246,7 @@ private: class ComboJustifyChangeAction : public ComponentUndoableAction { public: - ComboJustifyChangeAction (ComboBox* const comp, ComponentLayout& layout, const Justification& newState_) + ComboJustifyChangeAction (ComboBox* const comp, ComponentLayout& layout, Justification newState_) : ComponentUndoableAction (comp, layout), newState (newState_), oldState (comp->getJustificationType()) diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h index ea319faace..ff7723b842 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h @@ -176,13 +176,13 @@ private: document.removeChangeListener (this); } - void setJustification (const Justification& newJustification) + void setJustification (Justification newJustification) { document.perform (new GroupJustifyChangeAction (group, *document.getComponentLayout(), newJustification), "Change text label position"); } - const Justification getJustification() const + Justification getJustification() const { return group->getTextLabelPosition(); } @@ -196,7 +196,7 @@ private: class GroupJustifyChangeAction : public ComponentUndoableAction { public: - GroupJustifyChangeAction (GroupComponent* const comp, ComponentLayout& layout, const Justification& newState_) + GroupJustifyChangeAction (GroupComponent* const comp, ComponentLayout& layout, Justification newState_) : ComponentUndoableAction (comp, layout), newState (newState_), oldState (comp->getTextLabelPosition()) diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_LabelHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_LabelHandler.h index ebe9ce47b9..16d832193b 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_LabelHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_LabelHandler.h @@ -370,13 +370,13 @@ private: document.removeChangeListener (this); } - void setJustification (const Justification& newJustification) + void setJustification (Justification newJustification) { document.perform (new LabelJustifyChangeAction (label, *document.getComponentLayout(), newJustification), "Change Label justification"); } - const Justification getJustification() const + Justification getJustification() const { return label->getJustificationType(); } @@ -390,7 +390,7 @@ private: class LabelJustifyChangeAction : public ComponentUndoableAction