mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Warnings: Add missing overrides
This commit is contained in:
parent
6c32c4df87
commit
047448fbce
84 changed files with 630 additions and 627 deletions
|
|
@ -74,7 +74,7 @@
|
|||
{
|
||||
ScanJob (AUScanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {}
|
||||
|
||||
JobStatus runJob()
|
||||
JobStatus runJob() override
|
||||
{
|
||||
while (scanner.doNextScan() && ! shouldExit())
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ private:
|
|||
{
|
||||
PIPCreatorLookAndFeel() {}
|
||||
|
||||
Rectangle<int> getPropertyComponentContentPosition (PropertyComponent& component)
|
||||
Rectangle<int> getPropertyComponentContentPosition (PropertyComponent& component) override
|
||||
{
|
||||
auto textW = jmin (200, component.getWidth() / 3);
|
||||
return { textW, 0, component.getWidth() - textW, component.getHeight() - 1 };
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class RecentDocumentList final : private OpenDocumentManager::DocumentCloseListe
|
|||
{
|
||||
public:
|
||||
RecentDocumentList();
|
||||
~RecentDocumentList();
|
||||
~RecentDocumentList() override;
|
||||
|
||||
void clear();
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ public:
|
|||
std::unique_ptr<XmlElement> createXML() const;
|
||||
|
||||
private:
|
||||
bool documentAboutToClose (OpenDocumentManager::Document*);
|
||||
bool documentAboutToClose (OpenDocumentManager::Document*) override;
|
||||
|
||||
Array<OpenDocumentManager::Document*> previousDocs, nextDocs;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ private:
|
|||
oldName = comp->getButtonText();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setButtonText (newName);
|
||||
|
|
@ -212,7 +212,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
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),
|
||||
"Change button callback");
|
||||
}
|
||||
|
||||
bool getState() const { return needsButtonListener (component); }
|
||||
bool getState() const override { return needsButtonListener (component); }
|
||||
|
||||
private:
|
||||
class ButtonCallbackChangeAction : public ComponentUndoableAction <Button>
|
||||
|
|
@ -251,7 +251,7 @@ private:
|
|||
oldState = needsButtonListener (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setNeedsButtonListener (getComponent(), newState);
|
||||
|
|
@ -259,7 +259,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setNeedsButtonListener (getComponent(), oldState);
|
||||
|
|
@ -301,7 +301,7 @@ private:
|
|||
oldId = comp->getRadioGroupId();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setRadioGroupId (newId);
|
||||
|
|
@ -309,7 +309,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
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),
|
||||
"Change button connected edges");
|
||||
}
|
||||
|
||||
bool getState() const
|
||||
bool getState() const override
|
||||
{
|
||||
return (component->getConnectedEdgeFlags() & flag) != 0;
|
||||
}
|
||||
|
|
@ -356,7 +356,7 @@ private:
|
|||
oldState = ((comp->getConnectedEdgeFlags() & flag) != 0);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -369,7 +369,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
|
|||
|
|
@ -197,13 +197,13 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void setState (bool newState)
|
||||
void setState (bool newState) override
|
||||
{
|
||||
document.perform (new ComboEditableChangeAction (component, *document.getComponentLayout(), newState),
|
||||
"Change combo box editability");
|
||||
}
|
||||
|
||||
bool getState() const
|
||||
bool getState() const override
|
||||
{
|
||||
return component->isTextEditable();
|
||||
}
|
||||
|
|
@ -219,7 +219,7 @@ private:
|
|||
oldState = comp->isTextEditable();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setEditableText (newState);
|
||||
|
|
@ -227,7 +227,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
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),
|
||||
"Change combo box justification");
|
||||
}
|
||||
|
||||
Justification getJustification() const { return component->getJustificationType(); }
|
||||
Justification getJustification() const override { return component->getJustificationType(); }
|
||||
|
||||
private:
|
||||
ComboBox* const component;
|
||||
|
|
@ -272,7 +272,7 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setJustificationType (newState);
|
||||
|
|
@ -280,7 +280,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setJustificationType (oldState);
|
||||
|
|
@ -322,7 +322,7 @@ private:
|
|||
oldState = comp->getProperties() ["items"];
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->getProperties().set ("items", newState);
|
||||
|
|
@ -331,7 +331,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->getProperties().set ("items", oldState);
|
||||
|
|
@ -374,7 +374,7 @@ private:
|
|||
oldState = comp->getTextWhenNothingSelected();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTextWhenNothingSelected (newState);
|
||||
|
|
@ -382,7 +382,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTextWhenNothingSelected (oldState);
|
||||
|
|
@ -424,7 +424,7 @@ private:
|
|||
oldState = comp->getTextWhenNoChoicesAvailable();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTextWhenNoChoicesAvailable (newState);
|
||||
|
|
@ -432,7 +432,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTextWhenNoChoicesAvailable (oldState);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setName (newName);
|
||||
|
|
@ -68,7 +68,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setName (oldName);
|
||||
|
|
@ -110,14 +110,14 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
layout.setComponentMemberVariableName (getComponent(), newName);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
layout.setComponentMemberVariableName (getComponent(), oldName);
|
||||
|
|
@ -159,14 +159,14 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
layout.setComponentVirtualClassName (getComponent(), newName);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
layout.setComponentVirtualClassName (getComponent(), oldName);
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ private:
|
|||
oldValue = ttc->getTooltip();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -314,7 +314,7 @@ private:
|
|||
return false;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -348,12 +348,12 @@ public:
|
|||
document.addChangeListener (this);
|
||||
}
|
||||
|
||||
~ComponentPositionProperty()
|
||||
~ComponentPositionProperty() override
|
||||
{
|
||||
document.removeChangeListener (this);
|
||||
}
|
||||
|
||||
void setPosition (const RelativePositionedRectangle& newPos)
|
||||
void setPosition (const RelativePositionedRectangle& newPos) override
|
||||
{
|
||||
auto* l = document.getComponentLayout();
|
||||
|
||||
|
|
@ -363,7 +363,7 @@ public:
|
|||
l->setComponentPosition (component, newPos, true);
|
||||
}
|
||||
|
||||
RelativePositionedRectangle getPosition() const
|
||||
RelativePositionedRectangle getPosition() const override
|
||||
{
|
||||
return ComponentTypeHandler::getComponentPosition (component);
|
||||
}
|
||||
|
|
@ -439,7 +439,7 @@ private:
|
|||
oldValue = comp->getExplicitFocusOrder();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setExplicitFocusOrder (newValue);
|
||||
|
|
@ -447,7 +447,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setExplicitFocusOrder (oldValue);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public:
|
|||
return c;
|
||||
}
|
||||
|
||||
int getSizeInUnits() { return 2; }
|
||||
int getSizeInUnits() override { return 2; }
|
||||
|
||||
protected:
|
||||
ComponentLayout& layout;
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ private:
|
|||
oldState = comp->actualClassName;
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setClassName (newState);
|
||||
|
|
@ -177,7 +177,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setClassName (oldState);
|
||||
|
|
@ -219,7 +219,7 @@ private:
|
|||
oldState = comp->constructorParams;
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setParams (newState);
|
||||
|
|
@ -227,7 +227,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setParams (oldState);
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ private:
|
|||
oldName = comp->getText();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setText (newName);
|
||||
|
|
@ -158,7 +158,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setText (oldName);
|
||||
|
|
@ -215,7 +215,7 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTextLabelPosition (newState);
|
||||
|
|
@ -223,7 +223,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTextLabelPosition (oldState);
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ private:
|
|||
oldState = comp->getURL();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setURL (newState);
|
||||
|
|
@ -135,7 +135,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setURL (oldState);
|
||||
|
|
|
|||
|
|
@ -179,12 +179,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void setResource (const String& newName)
|
||||
void setResource (const String& newName) override
|
||||
{
|
||||
setImageResource (layout, element, role, newName, true);
|
||||
}
|
||||
|
||||
String getResource() const
|
||||
String getResource() const override
|
||||
{
|
||||
return getImageResource (element, role);
|
||||
}
|
||||
|
|
@ -314,12 +314,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void setState (bool newState)
|
||||
void setState (bool newState) override
|
||||
{
|
||||
setImageKeepProportions (layout, component, newState, true);
|
||||
}
|
||||
|
||||
bool getState() const
|
||||
bool getState() const override
|
||||
{
|
||||
return doesImageKeepProportions (component);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ public:
|
|||
oldState = comp->getFilename();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setFilename (newState);
|
||||
|
|
@ -136,7 +136,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setFilename (oldState);
|
||||
|
|
@ -206,13 +206,13 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void buttonClicked()
|
||||
void buttonClicked() override
|
||||
{
|
||||
if (ProjectContentComponent* const pcc = findParentComponentOfClass<ProjectContentComponent>())
|
||||
pcc->showEditorForFile (component->findFile(), true);
|
||||
}
|
||||
|
||||
String getButtonText() const
|
||||
String getButtonText() const override
|
||||
{
|
||||
return "Open file for editing";
|
||||
}
|
||||
|
|
@ -249,7 +249,7 @@ private:
|
|||
oldValue = comp->getConstructorParams();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setConstructorParams (newValue);
|
||||
|
|
@ -258,7 +258,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setConstructorParams (oldValue);
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ private:
|
|||
oldState = comp->getText();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setText (newState, dontSendNotification);
|
||||
|
|
@ -244,7 +244,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setText (oldState, dontSendNotification);
|
||||
|
|
@ -268,13 +268,13 @@ private:
|
|||
choices.add ("edit on double-click");
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
document.perform (new LabelEditableChangeAction (component, *document.getComponentLayout(), newIndex),
|
||||
"Change Label editability");
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
return component->isEditableOnSingleClick()
|
||||
? 1
|
||||
|
|
@ -294,7 +294,7 @@ private:
|
|||
: (comp->isEditableOnDoubleClick() ? 2 : 0);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setEditable (newState == 1, newState >= 1, getComponent()->doesLossOfFocusDiscardChanges());
|
||||
|
|
@ -303,7 +303,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setEditable (oldState == 1, oldState >= 1, getComponent()->doesLossOfFocusDiscardChanges());
|
||||
|
|
@ -327,13 +327,13 @@ private:
|
|||
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),
|
||||
"Change Label focus behaviour");
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
return component->doesLossOfFocusDiscardChanges() ? 0 : 1;
|
||||
}
|
||||
|
|
@ -349,7 +349,7 @@ private:
|
|||
oldState = comp->doesLossOfFocusDiscardChanges();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setEditable (getComponent()->isEditableOnSingleClick(),
|
||||
|
|
@ -359,7 +359,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setEditable (getComponent()->isEditableOnSingleClick(),
|
||||
|
|
@ -418,7 +418,7 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setJustificationType (newState);
|
||||
|
|
@ -426,7 +426,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setJustificationType (oldState);
|
||||
|
|
@ -483,7 +483,7 @@ private:
|
|||
oldState = comp->getProperties().getWithDefault ("typefaceName", FontPropertyComponent::getDefaultFont());
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->getProperties().set ("typefaceName", newState);
|
||||
|
|
@ -492,7 +492,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->getProperties().set ("typefaceName", oldState);
|
||||
|
|
@ -552,7 +552,7 @@ private:
|
|||
oldState = comp->getFont().getHeight();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
Font f (getComponent()->getFont());
|
||||
|
|
@ -562,7 +562,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
Font f (getComponent()->getFont());
|
||||
|
|
@ -678,7 +678,7 @@ private:
|
|||
oldState = comp->getFont();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setFont (newState);
|
||||
|
|
@ -686,7 +686,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setFont (oldState);
|
||||
|
|
@ -748,7 +748,7 @@ private:
|
|||
oldState = comp->getFont().getExtraKerningFactor();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
Font f (getComponent()->getFont());
|
||||
|
|
@ -758,7 +758,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
Font f (getComponent()->getFont());
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ private:
|
|||
choices.add ("Tabs at right");
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
const TabbedButtonBar::Orientation orientations[] = { TabbedButtonBar::TabsAtTop,
|
||||
TabbedButtonBar::TabsAtBottom,
|
||||
|
|
@ -429,7 +429,7 @@ private:
|
|||
"Change TabComponent orientation");
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
switch (component->getOrientation())
|
||||
{
|
||||
|
|
@ -454,7 +454,7 @@ private:
|
|||
oldState = comp->getOrientation();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setOrientation (newState);
|
||||
|
|
@ -462,7 +462,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setOrientation (oldState);
|
||||
|
|
@ -485,13 +485,13 @@ private:
|
|||
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),
|
||||
"Change initial tab");
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
return component->getCurrentTabIndex();
|
||||
}
|
||||
|
|
@ -507,7 +507,7 @@ private:
|
|||
oldValue = comp->getCurrentTabIndex();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setCurrentTabIndex (newValue);
|
||||
|
|
@ -515,7 +515,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setCurrentTabIndex (oldValue);
|
||||
|
|
@ -578,7 +578,7 @@ private:
|
|||
oldState = comp->getTabBarDepth();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTabBarDepth (newState);
|
||||
|
|
@ -586,7 +586,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTabBarDepth (oldState);
|
||||
|
|
@ -609,13 +609,13 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void buttonClicked()
|
||||
void buttonClicked() override
|
||||
{
|
||||
document.perform (new AddTabAction (component, *document.getComponentLayout()),
|
||||
"Add a new tab");
|
||||
}
|
||||
|
||||
String getButtonText() const
|
||||
String getButtonText() const override
|
||||
{
|
||||
return "Create a new tab";
|
||||
}
|
||||
|
|
@ -632,7 +632,7 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
addNewTab (getComponent());
|
||||
|
|
@ -641,7 +641,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->removeTab (getComponent()->getNumTabs() - 1);
|
||||
|
|
@ -663,7 +663,7 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void buttonClicked()
|
||||
void buttonClicked() override
|
||||
{
|
||||
const StringArray names (component->getTabNames());
|
||||
|
||||
|
|
@ -681,7 +681,7 @@ private:
|
|||
});
|
||||
}
|
||||
|
||||
String getButtonText() const
|
||||
String getButtonText() const override
|
||||
{
|
||||
return "Delete a tab...";
|
||||
}
|
||||
|
|
@ -700,7 +700,7 @@ private:
|
|||
previousState = getTabState (comp, indexToRemove);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -710,7 +710,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
addNewTab (getComponent(), indexToRemove);
|
||||
|
|
@ -761,7 +761,7 @@ private:
|
|||
oldValue = comp->getTabNames() [tabIndex];
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTabName (tabIndex, newValue);
|
||||
|
|
@ -769,7 +769,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTabName (tabIndex, oldValue);
|
||||
|
|
@ -839,7 +839,7 @@ private:
|
|||
oldValue = comp->getTabBackgroundColour (tabIndex);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTabBackgroundColour (tabIndex, newValue);
|
||||
|
|
@ -847,7 +847,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setTabBackgroundColour (tabIndex, oldValue);
|
||||
|
|
@ -873,13 +873,13 @@ private:
|
|||
choices.add ("Named content component");
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
document.perform (new TabContentTypeChangeAction (component, *document.getComponentLayout(), tabIndex, newIndex == 0),
|
||||
"Change tab content type");
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
return isTabUsingJucerComp (component, tabIndex) ? 0 : 1;
|
||||
}
|
||||
|
|
@ -898,7 +898,7 @@ private:
|
|||
oldValue = isTabUsingJucerComp (comp, tabIndex);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setTabUsingJucerComp (getComponent(), tabIndex, newValue);
|
||||
|
|
@ -907,7 +907,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setTabUsingJucerComp (getComponent(), tabIndex, oldValue);
|
||||
|
|
@ -973,7 +973,7 @@ private:
|
|||
oldState = getTabJucerFile (comp, tabIndex);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setTabJucerFile (getComponent(), tabIndex, newState);
|
||||
|
|
@ -981,7 +981,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setTabJucerFile (getComponent(), tabIndex, oldState);
|
||||
|
|
@ -1029,7 +1029,7 @@ private:
|
|||
oldValue = getTabClassName (comp, tabIndex);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setTabClassName (getComponent(), tabIndex, newValue);
|
||||
|
|
@ -1038,7 +1038,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setTabClassName (getComponent(), tabIndex, oldValue);
|
||||
|
|
@ -1087,7 +1087,7 @@ private:
|
|||
oldValue = getTabConstructorParams (comp, tabIndex);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setTabConstructorParams (getComponent(), tabIndex, newValue);
|
||||
|
|
@ -1096,7 +1096,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setTabConstructorParams (getComponent(), tabIndex, oldValue);
|
||||
|
|
@ -1122,10 +1122,9 @@ private:
|
|||
tabIndex (tabIndex_),
|
||||
totalNumTabs (totalNumTabs_)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void buttonClicked()
|
||||
void buttonClicked() override
|
||||
{
|
||||
PopupMenu m;
|
||||
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...";
|
||||
}
|
||||
|
|
@ -1176,13 +1175,13 @@ private:
|
|||
changed();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
move (oldIndex, newIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
move (newIndex, oldIndex);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -143,13 +143,13 @@ private:
|
|||
choices.add ("multi-line, return key disabled");
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
document.perform (new TextEditorMultilineChangeAction (component, *document.getComponentLayout(), newIndex),
|
||||
"Change TextEditor multiline mode");
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
return component->isMultiLine() ? (component->getReturnKeyStartsNewLine() ? 1 : 2) : 0;
|
||||
}
|
||||
|
|
@ -165,7 +165,7 @@ private:
|
|||
oldState = comp->isMultiLine() ? (comp->getReturnKeyStartsNewLine() ? 1 : 2) : 0;
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setMultiLine (newState > 0);
|
||||
|
|
@ -174,7 +174,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
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),
|
||||
"Change TextEditor read-only mode");
|
||||
}
|
||||
|
||||
bool getState() const { return ! component->isReadOnly(); }
|
||||
bool getState() const override { return ! component->isReadOnly(); }
|
||||
|
||||
private:
|
||||
class TextEditorReadonlyChangeAction : public ComponentUndoableAction <TextEditor>
|
||||
|
|
@ -215,7 +215,7 @@ private:
|
|||
oldState = comp->isReadOnly();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setReadOnly (newState);
|
||||
|
|
@ -223,7 +223,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
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),
|
||||
"Change TextEditor scrollbars");
|
||||
}
|
||||
|
||||
bool getState() const { return component->areScrollbarsShown(); }
|
||||
bool getState() const override { return component->areScrollbarsShown(); }
|
||||
|
||||
private:
|
||||
class TextEditorScrollbarChangeAction : public ComponentUndoableAction <TextEditor>
|
||||
|
|
@ -263,7 +263,7 @@ private:
|
|||
oldState = comp->areScrollbarsShown();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setScrollbarsShown (newState);
|
||||
|
|
@ -271,7 +271,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
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),
|
||||
"Change TextEditor caret");
|
||||
}
|
||||
|
||||
bool getState() const { return component->isCaretVisible(); }
|
||||
bool getState() const override { return component->isCaretVisible(); }
|
||||
|
||||
private:
|
||||
class TextEditorCaretChangeAction : public ComponentUndoableAction <TextEditor>
|
||||
|
|
@ -311,7 +311,7 @@ private:
|
|||
oldState = comp->isCaretVisible();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setCaretVisible (newState);
|
||||
|
|
@ -319,7 +319,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
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),
|
||||
"Change TextEditor popup menu");
|
||||
}
|
||||
|
||||
bool getState() const { return component->isPopupMenuEnabled(); }
|
||||
bool getState() const override { return component->isPopupMenuEnabled(); }
|
||||
|
||||
private:
|
||||
class TextEditorPopupMenuChangeAction : public ComponentUndoableAction <TextEditor>
|
||||
|
|
@ -359,7 +359,7 @@ private:
|
|||
oldState = comp->isPopupMenuEnabled();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setPopupMenuEnabled (newState);
|
||||
|
|
@ -367,7 +367,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setPopupMenuEnabled (oldState);
|
||||
|
|
@ -409,7 +409,7 @@ private:
|
|||
oldState = comp->getProperties() ["initialText"];
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setText (newState, false);
|
||||
|
|
@ -418,7 +418,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setText (oldState, false);
|
||||
|
|
|
|||
|
|
@ -102,13 +102,13 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void setState (bool newState)
|
||||
void setState (bool newState) override
|
||||
{
|
||||
document.perform (new ToggleStateChangeAction (component, *document.getComponentLayout(), newState),
|
||||
"Change ToggleButton state");
|
||||
}
|
||||
|
||||
bool getState() const
|
||||
bool getState() const override
|
||||
{
|
||||
return component->getToggleState();
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ private:
|
|||
oldState = comp->getToggleState();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setToggleState (newState, dontSendNotification);
|
||||
|
|
@ -132,7 +132,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setToggleState (oldState, dontSendNotification);
|
||||
|
|
|
|||
|
|
@ -168,13 +168,13 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void setState (bool newState)
|
||||
void setState (bool newState) override
|
||||
{
|
||||
document.perform (new TreeviewRootChangeAction (component, *document.getComponentLayout(), newState),
|
||||
"Change TreeView root item");
|
||||
}
|
||||
|
||||
bool getState() const
|
||||
bool getState() const override
|
||||
{
|
||||
return component->isRootItemVisible();
|
||||
}
|
||||
|
|
@ -190,7 +190,7 @@ private:
|
|||
oldState = comp->isRootItemVisible();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setRootItemVisible (newState);
|
||||
|
|
@ -198,7 +198,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setRootItemVisible (oldState);
|
||||
|
|
@ -221,13 +221,13 @@ private:
|
|||
choices.add ("Items closed by default");
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
document.perform (new TreeviewOpennessChangeAction (component, *document.getComponentLayout(), newIndex == 0),
|
||||
"Change TreeView openness");
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
return component->areItemsOpenByDefault() ? 0 : 1;
|
||||
}
|
||||
|
|
@ -243,7 +243,7 @@ private:
|
|||
oldState = comp->areItemsOpenByDefault();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setDefaultOpenness (newState);
|
||||
|
|
@ -251,7 +251,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setDefaultOpenness (oldState);
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void parentHierarchyChanged()
|
||||
void parentHierarchyChanged() override
|
||||
{
|
||||
Viewport::parentHierarchyChanged();
|
||||
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),
|
||||
"Change Viewport scrollbar");
|
||||
}
|
||||
|
||||
bool getState() const
|
||||
bool getState() const override
|
||||
{
|
||||
return vertical ? component->isVerticalScrollBarShown()
|
||||
: component->isHorizontalScrollBarShown();
|
||||
|
|
@ -328,7 +328,7 @@ private:
|
|||
: comp->isHorizontalScrollBarShown();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
if (vertical)
|
||||
|
|
@ -340,7 +340,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
if (vertical)
|
||||
|
|
@ -407,7 +407,7 @@ private:
|
|||
oldState = comp->getScrollBarThickness();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setScrollBarThickness (newState);
|
||||
|
|
@ -415,7 +415,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setScrollBarThickness (newState);
|
||||
|
|
@ -439,13 +439,13 @@ private:
|
|||
choices.add ("Named content component");
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
document.perform (new ViewportContentTypeChangeAction (component, *document.getComponentLayout(), newIndex),
|
||||
"Change Viewport content type");
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
return getViewportContentType (component);
|
||||
}
|
||||
|
|
@ -461,7 +461,7 @@ private:
|
|||
oldValue = getViewportContentType (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setViewportContentType (getComponent(), newValue);
|
||||
|
|
@ -470,7 +470,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setViewportContentType (getComponent(), oldValue);
|
||||
|
|
@ -538,7 +538,7 @@ private:
|
|||
oldState = getViewportJucerComponentFile (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setViewportJucerComponentFile (getComponent(), newState);
|
||||
|
|
@ -546,7 +546,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setViewportJucerComponentFile (getComponent(), oldState);
|
||||
|
|
@ -589,7 +589,7 @@ private:
|
|||
oldValue = getViewportGenericComponentClass (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setViewportGenericComponentClass (getComponent(), newValue);
|
||||
|
|
@ -598,7 +598,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setViewportGenericComponentClass (getComponent(), oldValue);
|
||||
|
|
@ -642,7 +642,7 @@ private:
|
|||
oldValue = getViewportConstructorParams (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setViewportConstructorParams (getComponent(), newValue);
|
||||
|
|
@ -651,7 +651,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
setViewportConstructorParams (getComponent(), oldValue);
|
||||
|
|
|
|||
|
|
@ -233,23 +233,23 @@ public:
|
|||
document.addChangeListener (this);
|
||||
}
|
||||
|
||||
~ButtonStatePaintEnabledProperty()
|
||||
~ButtonStatePaintEnabledProperty() override
|
||||
{
|
||||
document.removeChangeListener (this);
|
||||
}
|
||||
|
||||
void setState (bool newState)
|
||||
void setState (bool newState) override
|
||||
{
|
||||
document.setStatePaintRoutineEnabled (stateMethod, newState);
|
||||
}
|
||||
|
||||
bool getState() const
|
||||
bool getState() const override
|
||||
{
|
||||
return document.isStatePaintRoutineEnabled (stateMethod);
|
||||
}
|
||||
|
||||
private:
|
||||
void changeListenerCallback (ChangeBroadcaster*)
|
||||
void changeListenerCallback (ChangeBroadcaster*) override
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,38 +32,38 @@ class ButtonDocument : public JucerDocument
|
|||
{
|
||||
public:
|
||||
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);
|
||||
bool isStatePaintRoutineEnabled (int index) 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,
|
||||
StringArray& returnValues,
|
||||
StringArray& methods,
|
||||
StringArray& initialContents) const;
|
||||
StringArray& initialContents) const override;
|
||||
|
||||
//==============================================================================
|
||||
std::unique_ptr<PaintRoutine> paintRoutines[7];
|
||||
|
|
|
|||
|
|
@ -32,26 +32,26 @@ class ComponentDocument : public JucerDocument
|
|||
{
|
||||
public:
|
||||
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:
|
||||
std::unique_ptr<ComponentLayout> components;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public:
|
|||
choices.add ("Image Brush");
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill
|
||||
: listener.owner->getFillType());
|
||||
|
|
@ -69,7 +69,7 @@ public:
|
|||
listener.owner->setStrokeFill (fill, true);
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
switch (isForStroke ? listener.owner->getStrokeType().fill.mode
|
||||
: listener.owner->getFillType().mode)
|
||||
|
|
@ -178,7 +178,7 @@ public:
|
|||
listener.setPropertyToRefresh (*this);
|
||||
}
|
||||
|
||||
void setPosition (const RelativePositionedRectangle& newPos)
|
||||
void setPosition (const RelativePositionedRectangle& newPos) override
|
||||
{
|
||||
JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill
|
||||
: listener.owner->getFillType());
|
||||
|
|
@ -194,7 +194,7 @@ public:
|
|||
listener.owner->setStrokeFill (fill, true);
|
||||
}
|
||||
|
||||
RelativePositionedRectangle getPosition() const
|
||||
RelativePositionedRectangle getPosition() const override
|
||||
{
|
||||
const JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill
|
||||
: 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;
|
||||
};
|
||||
|
|
@ -237,7 +237,7 @@ public:
|
|||
listener.setPropertyToRefresh (*this);
|
||||
}
|
||||
|
||||
void setValue (double newValue)
|
||||
void setValue (double newValue) override
|
||||
{
|
||||
listener.owner->getDocument()->getUndoManager().undoCurrentTransactionOnly();
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ public:
|
|||
true);
|
||||
}
|
||||
|
||||
double getValue() const { return listener.owner->getStrokeType().stroke.getStrokeThickness(); }
|
||||
double getValue() const override { return listener.owner->getStrokeType().stroke.getStrokeThickness(); }
|
||||
|
||||
ElementListener<ColouredElement> listener;
|
||||
};
|
||||
|
|
@ -267,7 +267,7 @@ public:
|
|||
choices.add ("beveled");
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
const PathStrokeType::JointStyle joints[] = { PathStrokeType::mitered,
|
||||
PathStrokeType::curved,
|
||||
|
|
@ -285,7 +285,7 @@ public:
|
|||
true);
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
switch (listener.owner->getStrokeType().stroke.getJointStyle())
|
||||
{
|
||||
|
|
@ -316,7 +316,7 @@ public:
|
|||
choices.add ("round");
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
const PathStrokeType::EndCapStyle ends[] = { PathStrokeType::butt,
|
||||
PathStrokeType::square,
|
||||
|
|
@ -334,7 +334,7 @@ public:
|
|||
true);
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
|
@ -383,7 +383,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
String getResource() const
|
||||
String getResource() const override
|
||||
{
|
||||
if (element == nullptr)
|
||||
return {};
|
||||
|
|
@ -414,7 +414,7 @@ public:
|
|||
listener.setPropertyToRefresh (*this);
|
||||
}
|
||||
|
||||
void setPosition (const RelativePositionedRectangle& newPos)
|
||||
void setPosition (const RelativePositionedRectangle& newPos) override
|
||||
{
|
||||
if (isForStroke)
|
||||
{
|
||||
|
|
@ -430,7 +430,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
RelativePositionedRectangle getPosition() const
|
||||
RelativePositionedRectangle getPosition() const override
|
||||
{
|
||||
if (isForStroke)
|
||||
return listener.owner->getStrokeType().fill.imageAnchor;
|
||||
|
|
@ -455,7 +455,7 @@ public:
|
|||
listener.setPropertyToRefresh (*this);
|
||||
}
|
||||
|
||||
void setValue (double newValue)
|
||||
void setValue (double newValue) override
|
||||
{
|
||||
if (listener.owner != nullptr)
|
||||
{
|
||||
|
|
@ -478,7 +478,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
double getValue() const
|
||||
double getValue() const override
|
||||
{
|
||||
if (listener.owner == nullptr)
|
||||
return 0;
|
||||
|
|
@ -616,14 +616,14 @@ public:
|
|||
oldState = element->getFillType();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setFillType (newState, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setFillType (oldState, false);
|
||||
|
|
@ -675,14 +675,14 @@ public:
|
|||
oldState = element->isStrokeEnabled();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->enableStroke (newState, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->enableStroke (oldState, false);
|
||||
|
|
@ -732,14 +732,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setStrokeType (newState, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setStrokeType (oldState, false);
|
||||
|
|
@ -778,14 +778,14 @@ public:
|
|||
oldState = element->getStrokeType().fill;
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setStrokeFill (newState, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setStrokeFill (oldState, false);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
RelativePositionedRectangle getPosition()
|
||||
RelativePositionedRectangle getPosition() override
|
||||
{
|
||||
ColouredElement* e = dynamic_cast<ColouredElement*> (owner);
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ public:
|
|||
: e->getFillType().gradPos2;
|
||||
}
|
||||
|
||||
void setPosition (const RelativePositionedRectangle& newPos)
|
||||
void setPosition (const RelativePositionedRectangle& newPos) override
|
||||
{
|
||||
ColouredElement* e = dynamic_cast<ColouredElement*> (owner);
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void updatePosition()
|
||||
void updatePosition() override
|
||||
{
|
||||
PointComponent::updatePosition();
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public:
|
|||
document.addChangeListener (this);
|
||||
}
|
||||
|
||||
~ImageResourceProperty()
|
||||
~ImageResourceProperty() override
|
||||
{
|
||||
document.removeChangeListener (this);
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ public:
|
|||
virtual String getResource() const = 0;
|
||||
|
||||
//==============================================================================
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
if (newIndex == 0)
|
||||
{
|
||||
|
|
@ -94,7 +94,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
if (getResource().isEmpty())
|
||||
return -1;
|
||||
|
|
@ -102,7 +102,7 @@ public:
|
|||
return choices.indexOf (getResource());
|
||||
}
|
||||
|
||||
void changeListenerCallback (ChangeBroadcaster*)
|
||||
void changeListenerCallback (ChangeBroadcaster*) override
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,14 +101,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setPosition (newState, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setPosition (oldState, false);
|
||||
|
|
@ -128,14 +128,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setBounds (newBounds);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setBounds (oldBounds);
|
||||
|
|
@ -159,7 +159,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -309,7 +309,7 @@ public:
|
|||
listener.setPropertyToRefresh (*this);
|
||||
}
|
||||
|
||||
void setPosition (const RelativePositionedRectangle& newPos)
|
||||
void setPosition (const RelativePositionedRectangle& newPos) override
|
||||
{
|
||||
if (element->getOwner()->getSelectedElements().getNumSelected() > 1)
|
||||
positionOtherSelectedElements (getPosition(), newPos);
|
||||
|
|
@ -317,7 +317,7 @@ public:
|
|||
listener.owner->setPosition (newPos, true);
|
||||
}
|
||||
|
||||
RelativePositionedRectangle getPosition() const
|
||||
RelativePositionedRectangle getPosition() const override
|
||||
{
|
||||
return listener.owner->getPosition();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,12 +158,12 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void buttonClicked()
|
||||
void buttonClicked() override
|
||||
{
|
||||
element->convertToPath();
|
||||
}
|
||||
|
||||
String getButtonText() const
|
||||
String getButtonText() const override
|
||||
{
|
||||
return "convert to a path";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ private:
|
|||
{
|
||||
UngroupProperty (PaintElementGroup* const);
|
||||
|
||||
void buttonClicked();
|
||||
String getButtonText() const;
|
||||
void buttonClicked() override;
|
||||
String getButtonText() const override;
|
||||
|
||||
PaintElementGroup* element;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ public:
|
|||
public:
|
||||
SetResourceAction (PaintElementImage* const, const String&);
|
||||
|
||||
bool perform();
|
||||
bool undo();
|
||||
bool perform() override;
|
||||
bool undo() override;
|
||||
|
||||
private:
|
||||
String newResource, oldResource;
|
||||
|
|
@ -75,8 +75,8 @@ public:
|
|||
public:
|
||||
SetOpacityAction (PaintElementImage* const, double);
|
||||
|
||||
bool perform();
|
||||
bool undo();
|
||||
bool perform() override;
|
||||
bool undo() override;
|
||||
|
||||
private:
|
||||
double newOpacity, oldOpacity;
|
||||
|
|
@ -96,8 +96,8 @@ public:
|
|||
public:
|
||||
SetStretchModeAction (PaintElementImage* const, StretchMode);
|
||||
|
||||
bool perform();
|
||||
bool undo();
|
||||
bool perform() override;
|
||||
bool undo() override;
|
||||
|
||||
private:
|
||||
StretchMode newValue, oldValue;
|
||||
|
|
@ -124,8 +124,8 @@ private:
|
|||
public:
|
||||
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:
|
||||
OpacityProperty (PaintElementImage* const);
|
||||
|
||||
void setValue (double);
|
||||
double getValue() const;
|
||||
void setValue (double) override;
|
||||
double getValue() const override;
|
||||
|
||||
ElementListener<PaintElementImage> listener;
|
||||
};
|
||||
|
|
@ -145,8 +145,8 @@ private:
|
|||
public:
|
||||
StretchModeProperty (PaintElementImage* const);
|
||||
|
||||
void setIndex (int);
|
||||
int getIndex() const;
|
||||
void setIndex (int) override;
|
||||
int getIndex() const override;
|
||||
|
||||
ElementListener<PaintElementImage> listener;
|
||||
};
|
||||
|
|
@ -156,8 +156,8 @@ private:
|
|||
public:
|
||||
ResetSizeProperty (PaintElementImage* const);
|
||||
|
||||
void buttonClicked();
|
||||
String getButtonText() const;
|
||||
void buttonClicked() override;
|
||||
String getButtonText() const override;
|
||||
|
||||
private:
|
||||
PaintElementImage* const element;
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
return changeTo (newValue);
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
return changeTo (oldValue);
|
||||
}
|
||||
|
|
@ -748,14 +748,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setNonZeroWinding (newValue, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setNonZeroWinding (oldValue, false);
|
||||
|
|
@ -846,7 +846,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -862,7 +862,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -952,7 +952,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -963,7 +963,7 @@ public:
|
|||
return path != nullptr;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -1292,17 +1292,17 @@ public:
|
|||
owner->getDocument()->addChangeListener (this);
|
||||
}
|
||||
|
||||
~PathPointPositionProperty()
|
||||
~PathPointPositionProperty() override
|
||||
{
|
||||
owner->getDocument()->removeChangeListener (this);
|
||||
}
|
||||
|
||||
void setPosition (const RelativePositionedRectangle& newPos)
|
||||
void setPosition (const RelativePositionedRectangle& newPos) override
|
||||
{
|
||||
owner->setPoint (index, pointNumber, newPos, true);
|
||||
}
|
||||
|
||||
RelativePositionedRectangle getPosition() const
|
||||
RelativePositionedRectangle getPosition() const override
|
||||
{
|
||||
return owner->getPoint (index, pointNumber);
|
||||
}
|
||||
|
|
@ -1328,22 +1328,22 @@ public:
|
|||
choices.add ("Subpath is open-ended");
|
||||
}
|
||||
|
||||
~PathPointClosedProperty()
|
||||
~PathPointClosedProperty() override
|
||||
{
|
||||
owner->getDocument()->removeChangeListener (this);
|
||||
}
|
||||
|
||||
void changeListenerCallback (ChangeBroadcaster*)
|
||||
void changeListenerCallback (ChangeBroadcaster*) override
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
owner->setSubpathClosed (index, newIndex == 0, true);
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
return owner->isSubpathClosed (index) ? 0 : 1;
|
||||
}
|
||||
|
|
@ -1364,12 +1364,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void buttonClicked()
|
||||
void buttonClicked() override
|
||||
{
|
||||
owner->addPoint (index, true);
|
||||
}
|
||||
|
||||
String getButtonText() const { return "Add new point"; }
|
||||
String getButtonText() const override { return "Add new point"; }
|
||||
|
||||
private:
|
||||
PaintElementPath* const owner;
|
||||
|
|
|
|||
|
|
@ -152,17 +152,17 @@ public:
|
|||
PathPointComponent (PaintElementPath* const path_,
|
||||
int index, int pointNumber);
|
||||
|
||||
~PathPointComponent();
|
||||
~PathPointComponent() override;
|
||||
|
||||
void updatePosition();
|
||||
void updatePosition() override;
|
||||
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:
|
||||
PaintElementPath* const path;
|
||||
|
|
|
|||
|
|
@ -168,12 +168,12 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void buttonClicked()
|
||||
void buttonClicked() override
|
||||
{
|
||||
element->convertToPath();
|
||||
}
|
||||
|
||||
String getButtonText() const
|
||||
String getButtonText() const override
|
||||
{
|
||||
return "convert to a path";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,14 +75,14 @@ public:
|
|||
oldSize = element->getCornerSize();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setCornerSize (newSize, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setCornerSize (oldSize, false);
|
||||
|
|
@ -251,12 +251,12 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void buttonClicked()
|
||||
void buttonClicked() override
|
||||
{
|
||||
element->convertToPath();
|
||||
}
|
||||
|
||||
String getButtonText() const
|
||||
String getButtonText() const override
|
||||
{
|
||||
return "convert to a path";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,14 +176,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setText (newText, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setText (oldText, false);
|
||||
|
|
@ -224,14 +224,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setFont (newFont, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setFont (oldFont, false);
|
||||
|
|
@ -270,14 +270,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setTypefaceName (newValue, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setTypefaceName (oldValue, false);
|
||||
|
|
@ -317,14 +317,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setJustification (newValue, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getElement()->setJustification (oldValue, false);
|
||||
|
|
@ -430,16 +430,16 @@ private:
|
|||
element->getDocument()->addChangeListener (this);
|
||||
}
|
||||
|
||||
~FontNameProperty()
|
||||
~FontNameProperty() override
|
||||
{
|
||||
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:
|
||||
void changeListenerCallback (ChangeBroadcaster*) { refresh(); }
|
||||
void changeListenerCallback (ChangeBroadcaster*) override { refresh(); }
|
||||
|
||||
PaintElementText* const element;
|
||||
};
|
||||
|
|
@ -458,7 +458,7 @@ private:
|
|||
updateStylesList (element->getTypefaceName());
|
||||
}
|
||||
|
||||
~FontStyleProperty()
|
||||
~FontStyleProperty() override
|
||||
{
|
||||
element->getDocument()->removeChangeListener (this);
|
||||
}
|
||||
|
|
@ -485,7 +485,7 @@ private:
|
|||
refresh();
|
||||
}
|
||||
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
Font f (element->getFont());
|
||||
|
||||
|
|
@ -505,7 +505,7 @@ private:
|
|||
element->setFont (f, true);
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
auto f = element->getFont();
|
||||
|
||||
|
|
@ -526,7 +526,7 @@ private:
|
|||
}
|
||||
|
||||
private:
|
||||
void changeListenerCallback (ChangeBroadcaster*)
|
||||
void changeListenerCallback (ChangeBroadcaster*) override
|
||||
{
|
||||
updateStylesList (element->getTypefaceName());
|
||||
}
|
||||
|
|
@ -656,12 +656,12 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
void buttonClicked()
|
||||
void buttonClicked() override
|
||||
{
|
||||
element->convertToPath();
|
||||
}
|
||||
|
||||
String getButtonText() const
|
||||
String getButtonText() const override
|
||||
{
|
||||
return "convert text to a path";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
int getSizeInUnits() { return 2; }
|
||||
int getSizeInUnits() override { return 2; }
|
||||
|
||||
protected:
|
||||
PaintRoutine& routine;
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ public:
|
|||
document.addChangeListener (this);
|
||||
}
|
||||
|
||||
~ComponentBooleanProperty()
|
||||
~ComponentBooleanProperty() override
|
||||
{
|
||||
document.removeChangeListener (this);
|
||||
}
|
||||
|
||||
void changeListenerCallback (ChangeBroadcaster*)
|
||||
void changeListenerCallback (ChangeBroadcaster*) override
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,12 +42,12 @@ public:
|
|||
document.addChangeListener (this);
|
||||
}
|
||||
|
||||
~ComponentChoiceProperty()
|
||||
~ComponentChoiceProperty() override
|
||||
{
|
||||
document.removeChangeListener (this);
|
||||
}
|
||||
|
||||
void changeListenerCallback (ChangeBroadcaster*)
|
||||
void changeListenerCallback (ChangeBroadcaster*) override
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ public:
|
|||
document.addChangeListener (this);
|
||||
}
|
||||
|
||||
~ComponentColourProperty()
|
||||
~ComponentColourProperty() override
|
||||
{
|
||||
document.removeChangeListener (this);
|
||||
}
|
||||
|
||||
void changeListenerCallback (ChangeBroadcaster*)
|
||||
void changeListenerCallback (ChangeBroadcaster*) override
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
|
|
@ -76,12 +76,12 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
Colour getColour() const
|
||||
Colour getColour() const override
|
||||
{
|
||||
return component->findColour (colourId);
|
||||
}
|
||||
|
||||
void setColour (Colour newColour)
|
||||
void setColour (Colour newColour) override
|
||||
{
|
||||
if (component->findColour (colourId) != newColour)
|
||||
{
|
||||
|
|
@ -96,7 +96,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void resetToDefault()
|
||||
void resetToDefault() override
|
||||
{
|
||||
document.getUndoManager().undoCurrentTransactionOnly();
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ public:
|
|||
document.addChangeListener (this);
|
||||
}
|
||||
|
||||
~ComponentTextProperty()
|
||||
~ComponentTextProperty() override
|
||||
{
|
||||
document.removeChangeListener (this);
|
||||
}
|
||||
|
||||
void changeListenerCallback (ChangeBroadcaster*)
|
||||
void changeListenerCallback (ChangeBroadcaster*) override
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
virtual String getTypefaceName() const = 0;
|
||||
|
||||
//==============================================================================
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
String type (choices [newIndex]);
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ public:
|
|||
setTypefaceName (type);
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
return choices.indexOf (getTypefaceName());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public:
|
|||
virtual Justification getJustification() const = 0;
|
||||
|
||||
//==============================================================================
|
||||
void setIndex (int newIndex)
|
||||
void setIndex (int newIndex) override
|
||||
{
|
||||
const int types[] = { Justification::centred,
|
||||
Justification::centredLeft,
|
||||
|
|
@ -77,7 +77,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
int getIndex() const
|
||||
int getIndex() const override
|
||||
{
|
||||
const int types[] = { Justification::centred,
|
||||
Justification::centredLeft,
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void changeListenerCallback (ChangeBroadcaster*)
|
||||
void changeListenerCallback (ChangeBroadcaster*) override
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
|
|
@ -392,7 +392,7 @@ public:
|
|||
});
|
||||
}
|
||||
|
||||
void resized()
|
||||
void resized() override
|
||||
{
|
||||
const Rectangle<int> r (getLookAndFeel().getPropertyComponentContentPosition (*this));
|
||||
|
||||
|
|
@ -402,7 +402,7 @@ public:
|
|||
textEditor->setBounds (r.getX(), r.getY(), button.getX() - r.getX(), r.getHeight());
|
||||
}
|
||||
|
||||
void refresh()
|
||||
void refresh() override
|
||||
{
|
||||
textEditor->setText (getText(), dontSendNotification);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,17 +41,17 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
~ComponentLayoutPanel()
|
||||
~ComponentLayoutPanel() override
|
||||
{
|
||||
deleteAllChildren();
|
||||
}
|
||||
|
||||
void updatePropertiesList()
|
||||
void updatePropertiesList() override
|
||||
{
|
||||
((LayoutPropsPanel*) propsPanel)->updateList();
|
||||
}
|
||||
|
||||
Rectangle<int> getComponentArea() const
|
||||
Rectangle<int> getComponentArea() const override
|
||||
{
|
||||
return ((ComponentLayoutEditor*) editor)->getComponentArea();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public:
|
|||
updateBounds (content.get());
|
||||
}
|
||||
|
||||
void childBoundsChanged (Component* child)
|
||||
void childBoundsChanged (Component* child) override
|
||||
{
|
||||
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())
|
||||
mouseMagnify (e, 1.0f / (1.0f - wheel.deltaY));
|
||||
|
|
@ -77,7 +77,7 @@ public:
|
|||
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);
|
||||
}
|
||||
|
|
@ -116,7 +116,7 @@ private:
|
|||
setAlwaysOnTop (true);
|
||||
}
|
||||
|
||||
void mouseDown (const MouseEvent&)
|
||||
void mouseDown (const MouseEvent&) override
|
||||
{
|
||||
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>())
|
||||
viewport->setViewPosition (jlimit (0, jmax (0, viewport->getViewedComponent()->getWidth() - viewport->getViewWidth()),
|
||||
|
|
|
|||
|
|
@ -294,8 +294,8 @@ private:
|
|||
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; }
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -41,25 +41,25 @@ public:
|
|||
PaintRoutineEditor (PaintRoutine& graphics,
|
||||
JucerDocument& document,
|
||||
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,12 +33,12 @@ class PaintRoutinePanel : public EditingPanelBase
|
|||
{
|
||||
public:
|
||||
PaintRoutinePanel (JucerDocument&, PaintRoutine&, JucerDocumentEditor*);
|
||||
~PaintRoutinePanel();
|
||||
~PaintRoutinePanel() override;
|
||||
|
||||
PaintRoutine& getPaintRoutine() const noexcept { return routine; }
|
||||
|
||||
void updatePropertiesList();
|
||||
Rectangle<int> getComponentArea() const;
|
||||
void updatePropertiesList() override;
|
||||
Rectangle<int> getComponentArea() const override;
|
||||
|
||||
private:
|
||||
PaintRoutine& routine;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public:
|
|||
reloadButton.setVisible (document.getResources() [row] != nullptr);
|
||||
}
|
||||
|
||||
void resized()
|
||||
void resized() override
|
||||
{
|
||||
reloadButton.setBoundsInset (BorderSize<int> (2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
Component* const newComp = layout.addComponentFromXml (*xml, false);
|
||||
|
|
@ -89,14 +89,14 @@ public:
|
|||
return indexRef >= 0;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
layout.removeComponent (layout.getComponent (indexRef), false);
|
||||
return true;
|
||||
}
|
||||
|
||||
int getSizeInUnits() { return 10; }
|
||||
int getSizeInUnits() override { return 10; }
|
||||
|
||||
int& indexRef;
|
||||
|
||||
|
|
@ -130,14 +130,14 @@ public:
|
|||
oldIndex = l.indexOfComponent (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
layout.removeComponent (getComponent(), false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
Component* c = layout.addComponentFromXml (*xml, false);
|
||||
jassert (c != nullptr);
|
||||
|
|
@ -183,7 +183,7 @@ public:
|
|||
oldIndex = l.indexOfComponent (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
Component* comp = layout.getComponent (oldIndex);
|
||||
|
|
@ -192,7 +192,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
layout.moveComponentZOrder (newIndex, oldIndex);
|
||||
|
|
@ -599,14 +599,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
layout.setComponentPosition (getComponent(), newPos, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
layout.setComponentPosition (getComponent(), oldPos, false);
|
||||
|
|
@ -630,7 +630,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setBounds (newBounds);
|
||||
|
|
@ -639,7 +639,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
getComponent()->setBounds (oldBounds);
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
PaintElement* newElement = routine.addElementFromXml (*xml, -1, false);
|
||||
|
|
@ -100,14 +100,14 @@ public:
|
|||
return indexAdded >= 0;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
routine.removeElement (routine.getElement (indexAdded), false);
|
||||
return true;
|
||||
}
|
||||
|
||||
int getSizeInUnits() { return 10; }
|
||||
int getSizeInUnits() override { return 10; }
|
||||
|
||||
int indexAdded;
|
||||
|
||||
|
|
@ -172,21 +172,21 @@ public:
|
|||
oldIndex = routine.indexOfElement (element);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
routine.removeElement (getElement(), false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
PaintElement* newElement = routine.addElementFromXml (*xml, oldIndex, false);
|
||||
showCorrectTab();
|
||||
return newElement != nullptr;
|
||||
}
|
||||
|
||||
int getSizeInUnits() { return 10; }
|
||||
int getSizeInUnits() override { return 10; }
|
||||
|
||||
private:
|
||||
std::unique_ptr<XmlElement> xml;
|
||||
|
|
@ -228,7 +228,7 @@ public:
|
|||
oldIndex = routine.indexOfElement (element);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
bool perform() override
|
||||
{
|
||||
showCorrectTab();
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool undo()
|
||||
bool undo() override
|
||||
{
|
||||
showCorrectTab();
|
||||
routine.moveElementZOrder (newIndex, oldIndex);
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public:
|
|||
virtual void canCreateMessageBox (CreatorFunction) = 0;
|
||||
};
|
||||
|
||||
void handleAsyncUpdate()
|
||||
void handleAsyncUpdate() override
|
||||
{
|
||||
schedule();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ private:
|
|||
//==============================================================================
|
||||
struct LabelLookAndFeel final : public ProjucerLookAndFeel
|
||||
{
|
||||
void drawPropertyComponentLabel (Graphics&, int, int, PropertyComponent&) {}
|
||||
void drawPropertyComponentLabel (Graphics&, int, int, PropertyComponent&) override {}
|
||||
};
|
||||
|
||||
void lookAndFeelChanged() override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue