From 8d8ac4f83003e0bad11f65058a53e5edf1b400b2 Mon Sep 17 00:00:00 2001 From: Vincenzo Sicurella Date: Mon, 3 Jun 2024 22:35:47 -0400 Subject: [PATCH] move control components into subfolder --- Source/{ => mapping_editors}/CurvesArea.cpp | 544 +++++++++--------- Source/{ => mapping_editors}/CurvesArea.h | 214 +++---- .../MappingSettingsControls.cpp | 14 +- .../MappingSettingsControls.h | 6 +- .../MappingSettingsPanel.cpp | 0 .../MappingSettingsPanel.h | 3 +- 6 files changed, 390 insertions(+), 391 deletions(-) rename Source/{ => mapping_editors}/CurvesArea.cpp (96%) rename Source/{ => mapping_editors}/CurvesArea.h (96%) rename Source/{ => mapping_editors}/MappingSettingsControls.cpp (95%) rename Source/{ => mapping_editors}/MappingSettingsControls.h (94%) rename Source/{ => mapping_editors}/MappingSettingsPanel.cpp (100%) rename Source/{ => mapping_editors}/MappingSettingsPanel.h (97%) diff --git a/Source/CurvesArea.cpp b/Source/mapping_editors/CurvesArea.cpp similarity index 96% rename from Source/CurvesArea.cpp rename to Source/mapping_editors/CurvesArea.cpp index 00ca11d4..6a926bdc 100644 --- a/Source/CurvesArea.cpp +++ b/Source/mapping_editors/CurvesArea.cpp @@ -1,272 +1,272 @@ -/* - ============================================================================== - - This is an automatically generated GUI class created by the Projucer! - - Be careful when adding custom code to these files, as only the code within - the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded - and re-saved. - - Created with Projucer version: 6.0.8 - - ------------------------------------------------------------------------------ - - The Projucer is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited. - - ============================================================================== -*/ - -//[Headers] You can add your own extra header files here... -#include "LumatoneEditorLookAndFeel.h" - -#include "VelocityCurveDlgBase.h" -#include "NoteOnOffVelocityCurveDialog.h" -//[/Headers] - -#include "CurvesArea.h" - - -//[MiscUserDefs] You can add your own user definitions and misc code here... - -CurvesArea::CurvesTabComponent::CurvesTabComponent(TabbedButtonBar::Orientation orientation) - : TabbedComponent::TabbedComponent(orientation) -{ - getTabbedButtonBar().getProperties().set(LumatoneEditorStyleIDs::fontHeightScalar, 1.25f); -} - -void CurvesArea::CurvesTabComponent::currentTabChanged(int newCurrentTabIndex, const String &newCurrentTabName) -{ - dynamic_cast(getTabContentComponent(newCurrentTabIndex))->loadFromMapping(); -} - -void CurvesArea::CurvesTabComponent::setTabsIndent(int indentWidthIn) -{ - currentTabIndent = indentWidthIn; -} - -void CurvesArea::CurvesTabComponent::resized() -{ - TabbedComponent::resized(); - getTabbedButtonBar().setBounds(currentTabIndent, 0, getWidth() - currentTabIndent, getTabBarDepth()); -} - -//[/MiscUserDefs] - -//============================================================================== -CurvesArea::CurvesArea (const LumatoneEditorState& stateIn) - : LumatoneEditorState("CurvesArea", stateIn) -{ - //[Constructor_pre] You can add your own custom stuff here.. - // showDeveloperMode = TerpstraSysExApplication::getApp().getPropertiesFile()->getBoolValue("DeveloperMode", false); - //[/Constructor_pre] - - setName ("CurvesArea"); - labelWindowTitle.reset (new juce::Label ("labelWindowTitle", - juce::translate("Curves"))); - addAndMakeVisible (labelWindowTitle.get()); - labelWindowTitle->setJustificationType (juce::Justification::centredLeft); - labelWindowTitle->setEditable (false, false, false); - labelWindowTitle->setFont(getAppFonts().getFont(LumatoneEditorFont::UniviaProBold)); - labelWindowTitle->setColour (juce::Label::textColourId, getEditorLookAndFeel().findColour(LumatoneEditorColourIDs::LabelPink)); - labelWindowTitle->setColour (juce::Label::backgroundColourId, juce::Colours::transparentBlack); - - labelWindowTitle->setBounds (8, 8, 150, 24); - - curvesTab.reset (new CurvesTabComponent (juce::TabbedButtonBar::TabsAtTop)); - addAndMakeVisible (curvesTab.get()); - curvesTab->setTabBarDepth (30); - curvesTab->addTab (juce::translate("Note Velocity"), juce::Colours::lightgrey, new NoteOnOffVelocityCurveDialog(*this), true); - curvesTab->setCurrentTabIndex (0); - - curvesTab->setBounds (8, 40, 464, 200); - - btnDeveloperMode.reset (new juce::ToggleButton ("btnDeveloperMode")); - addAndMakeVisible (btnDeveloperMode.get()); - btnDeveloperMode->setButtonText (juce::translate("Developer Mode")); - btnDeveloperMode->addListener (this); - - btnDeveloperMode->setBounds (200, 8, 158, 24); - - - //[UserPreSize] - setDeveloperMode(getInDeveloperMode()); - - getEditorLookAndFeel().setColour(VelocityCurveBeam::beamColourId, Colour(0x66ff5e00)); - getEditorLookAndFeel().setColour(VelocityCurveBeam::outlineColourId, Colour(0xffd7d9da)); - - curvesTab->setColour(TabbedComponent::ColourIds::outlineColourId, Colour()); - curvesTab->setColour(TabbedComponent::ColourIds::backgroundColourId, Colour()); - //curvesTab->addTab(juce::translate("Note Velocity"), Colour(), new NoteOnOffVelocityCurveDialog(), true); - curvesTab->setTabBackgroundColour(0, Colour()); - - - /* Don't want to resize here - * - //[/UserPreSize] - - setSize (472, 240); - - - //[Constructor] You can add your own custom stuff here.. - */ - - - //[/Constructor] -} - -CurvesArea::~CurvesArea() -{ - //[Destructor_pre]. You can add your own custom destruction code here.. - //[/Destructor_pre] - - labelWindowTitle = nullptr; - curvesTab = nullptr; - btnDeveloperMode = nullptr; - - - //[Destructor]. You can add your own custom destruction code here.. - //[/Destructor] -} - -//============================================================================== -void CurvesArea::paint (juce::Graphics& g) -{ - //[UserPrePaint] Add your own custom painting code here.. - /* - //[/UserPrePaint] - - g.fillAll (juce::Colour (0xff323e44)); - - //[UserPaint] Add your own custom painting code here.. - */ - //[/UserPaint] -} - -void CurvesArea::resized() -{ - //[UserPreResize] Add your own custom resize code here.. - int tabBarDepth = roundToInt(getHeight() * tabDepth); - int tabY = proportionOfHeight(tabYScalar); - //[/UserPreResize] - - //[UserResized] Add your own custom resize handling here.. - - btnDeveloperMode->setBounds( - getWidth() - btnDeveloperMode->getWidth(), - proportionOfHeight(0.0f), - btnDeveloperMode->getWidth(), - tabY); - - curvesTab->setTabBarDepth(tabBarDepth); - curvesTab->setTabsIndent(roundToInt(getWidth() * tabXScalar)); - - curvesTab->setBounds(0, tabY, getWidth(), getHeight() - tabY); - - resizeLabelWithHeight(labelWindowTitle.get(), tabBarDepth * 0.9f); - labelWindowTitle->setTopLeftPosition(roundToInt(getWidth() * 0.01f), tabY); - //[/UserResized] -} - -void CurvesArea::buttonClicked (juce::Button* buttonThatWasClicked) -{ - //[UserbuttonClicked_Pre] - //[/UserbuttonClicked_Pre] - - if (buttonThatWasClicked == btnDeveloperMode.get()) - { - //[UserButtonCode_btnDeveloperMode] -- add your button handler code here.. - if (btnDeveloperMode->getToggleState()) - { - curvesTab->addTab(juce::translate("CC Fader"), juce::Colours::lightgrey, new FaderVelocityCurveDialog(*this), true); - curvesTab->addTab(juce::translate("Aftertouch"), juce::Colours::lightgrey, new AftertouchVelocityCurveDialog(*this), true); - curvesTab->addTab(juce::translate("Lumatouch"), juce::Colours::lightgrey, new LumatouchVelocityCurveDialog(*this), true); - } - else - { - curvesTab->setCurrentTabIndex(0); - curvesTab->removeTab(3); - curvesTab->removeTab(2); - curvesTab->removeTab(1); - } - //[/UserButtonCode_btnDeveloperMode] - } - - //[UserbuttonClicked_Post] - //[/UserbuttonClicked_Post] -} - -void CurvesArea::handleStatePropertyChange(juce::ValueTree stateIn, const juce::Identifier& property) -{ - LumatoneEditorState::handleStatePropertyChange(stateIn, property); - - if (property == LumatoneEditorProperty::DeveloperModeOn) - { - setDeveloperMode(getInDeveloperMode()); - } -} - -//[MiscUserCode] You can add your own definitions of your custom methods or any other code here... - -void CurvesArea::loadFromMapping() -{ - dynamic_cast(curvesTab->getCurrentContentComponent())->loadFromMapping(); -} - -void CurvesArea::sendConfigToController() -{ - // Send all curves configurations to controller - // The "developer mode" curve configs (fader, aftertouch, Lumatouch, modulation wheel) are sent only if developer mode is active. - for (int i = 0; i < curvesTab->getNumTabs(); i++) - { - dynamic_cast(curvesTab->getTabContentComponent(i))->sendVelocityTableToController(); - } -} - -void CurvesArea::setDeveloperMode(bool devModeOn) -{ - // showDeveloperMode = devModeOn; - btnDeveloperMode->setVisible(devModeOn); - repaint(); -} - -//[/MiscUserCode] - - -//============================================================================== -#if 0 -/* -- Projucer information section -- - - This is where the Projucer stores the metadata that describe this GUI layout, so - make changes in here at your peril! - -BEGIN_JUCER_METADATA - - - - - -END_JUCER_METADATA -*/ -#endif - - -//[EndFile] You can add extra defines here... -//[/EndFile] +/* + ============================================================================== + + This is an automatically generated GUI class created by the Projucer! + + Be careful when adding custom code to these files, as only the code within + the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded + and re-saved. + + Created with Projucer version: 6.0.8 + + ------------------------------------------------------------------------------ + + The Projucer is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited. + + ============================================================================== +*/ + +//[Headers] You can add your own extra header files here... +#include "../LumatoneEditorLookAndFeel.h" + +#include "../VelocityCurveDlgBase.h" +#include "../NoteOnOffVelocityCurveDialog.h" +//[/Headers] + +#include "CurvesArea.h" + + +//[MiscUserDefs] You can add your own user definitions and misc code here... + +CurvesArea::CurvesTabComponent::CurvesTabComponent(TabbedButtonBar::Orientation orientation) + : TabbedComponent::TabbedComponent(orientation) +{ + getTabbedButtonBar().getProperties().set(LumatoneEditorStyleIDs::fontHeightScalar, 1.25f); +} + +void CurvesArea::CurvesTabComponent::currentTabChanged(int newCurrentTabIndex, const String &newCurrentTabName) +{ + dynamic_cast(getTabContentComponent(newCurrentTabIndex))->loadFromMapping(); +} + +void CurvesArea::CurvesTabComponent::setTabsIndent(int indentWidthIn) +{ + currentTabIndent = indentWidthIn; +} + +void CurvesArea::CurvesTabComponent::resized() +{ + TabbedComponent::resized(); + getTabbedButtonBar().setBounds(currentTabIndent, 0, getWidth() - currentTabIndent, getTabBarDepth()); +} + +//[/MiscUserDefs] + +//============================================================================== +CurvesArea::CurvesArea (const LumatoneEditorState& stateIn) + : LumatoneEditorState("CurvesArea", stateIn) +{ + //[Constructor_pre] You can add your own custom stuff here.. + // showDeveloperMode = TerpstraSysExApplication::getApp().getPropertiesFile()->getBoolValue("DeveloperMode", false); + //[/Constructor_pre] + + setName ("CurvesArea"); + labelWindowTitle.reset (new juce::Label ("labelWindowTitle", + juce::translate("Curves"))); + addAndMakeVisible (labelWindowTitle.get()); + labelWindowTitle->setJustificationType (juce::Justification::centredLeft); + labelWindowTitle->setEditable (false, false, false); + labelWindowTitle->setFont(getAppFonts().getFont(LumatoneEditorFont::UniviaProBold)); + labelWindowTitle->setColour (juce::Label::textColourId, getEditorLookAndFeel().findColour(LumatoneEditorColourIDs::LabelPink)); + labelWindowTitle->setColour (juce::Label::backgroundColourId, juce::Colours::transparentBlack); + + labelWindowTitle->setBounds (8, 8, 150, 24); + + curvesTab.reset (new CurvesTabComponent (juce::TabbedButtonBar::TabsAtTop)); + addAndMakeVisible (curvesTab.get()); + curvesTab->setTabBarDepth (30); + curvesTab->addTab (juce::translate("Note Velocity"), juce::Colours::lightgrey, new NoteOnOffVelocityCurveDialog(*this), true); + curvesTab->setCurrentTabIndex (0); + + curvesTab->setBounds (8, 40, 464, 200); + + btnDeveloperMode.reset (new juce::ToggleButton ("btnDeveloperMode")); + addAndMakeVisible (btnDeveloperMode.get()); + btnDeveloperMode->setButtonText (juce::translate("Developer Mode")); + btnDeveloperMode->addListener (this); + + btnDeveloperMode->setBounds (200, 8, 158, 24); + + + //[UserPreSize] + setDeveloperMode(getInDeveloperMode()); + + getEditorLookAndFeel().setColour(VelocityCurveBeam::beamColourId, Colour(0x66ff5e00)); + getEditorLookAndFeel().setColour(VelocityCurveBeam::outlineColourId, Colour(0xffd7d9da)); + + curvesTab->setColour(TabbedComponent::ColourIds::outlineColourId, Colour()); + curvesTab->setColour(TabbedComponent::ColourIds::backgroundColourId, Colour()); + //curvesTab->addTab(juce::translate("Note Velocity"), Colour(), new NoteOnOffVelocityCurveDialog(), true); + curvesTab->setTabBackgroundColour(0, Colour()); + + + /* Don't want to resize here + * + //[/UserPreSize] + + setSize (472, 240); + + + //[Constructor] You can add your own custom stuff here.. + */ + + + //[/Constructor] +} + +CurvesArea::~CurvesArea() +{ + //[Destructor_pre]. You can add your own custom destruction code here.. + //[/Destructor_pre] + + labelWindowTitle = nullptr; + curvesTab = nullptr; + btnDeveloperMode = nullptr; + + + //[Destructor]. You can add your own custom destruction code here.. + //[/Destructor] +} + +//============================================================================== +void CurvesArea::paint (juce::Graphics& g) +{ + //[UserPrePaint] Add your own custom painting code here.. + /* + //[/UserPrePaint] + + g.fillAll (juce::Colour (0xff323e44)); + + //[UserPaint] Add your own custom painting code here.. + */ + //[/UserPaint] +} + +void CurvesArea::resized() +{ + //[UserPreResize] Add your own custom resize code here.. + int tabBarDepth = roundToInt(getHeight() * tabDepth); + int tabY = proportionOfHeight(tabYScalar); + //[/UserPreResize] + + //[UserResized] Add your own custom resize handling here.. + + btnDeveloperMode->setBounds( + getWidth() - btnDeveloperMode->getWidth(), + proportionOfHeight(0.0f), + btnDeveloperMode->getWidth(), + tabY); + + curvesTab->setTabBarDepth(tabBarDepth); + curvesTab->setTabsIndent(roundToInt(getWidth() * tabXScalar)); + + curvesTab->setBounds(0, tabY, getWidth(), getHeight() - tabY); + + resizeLabelWithHeight(labelWindowTitle.get(), tabBarDepth * 0.9f); + labelWindowTitle->setTopLeftPosition(roundToInt(getWidth() * 0.01f), tabY); + //[/UserResized] +} + +void CurvesArea::buttonClicked (juce::Button* buttonThatWasClicked) +{ + //[UserbuttonClicked_Pre] + //[/UserbuttonClicked_Pre] + + if (buttonThatWasClicked == btnDeveloperMode.get()) + { + //[UserButtonCode_btnDeveloperMode] -- add your button handler code here.. + if (btnDeveloperMode->getToggleState()) + { + curvesTab->addTab(juce::translate("CC Fader"), juce::Colours::lightgrey, new FaderVelocityCurveDialog(*this), true); + curvesTab->addTab(juce::translate("Aftertouch"), juce::Colours::lightgrey, new AftertouchVelocityCurveDialog(*this), true); + curvesTab->addTab(juce::translate("Lumatouch"), juce::Colours::lightgrey, new LumatouchVelocityCurveDialog(*this), true); + } + else + { + curvesTab->setCurrentTabIndex(0); + curvesTab->removeTab(3); + curvesTab->removeTab(2); + curvesTab->removeTab(1); + } + //[/UserButtonCode_btnDeveloperMode] + } + + //[UserbuttonClicked_Post] + //[/UserbuttonClicked_Post] +} + +void CurvesArea::handleStatePropertyChange(juce::ValueTree stateIn, const juce::Identifier& property) +{ + LumatoneEditorState::handleStatePropertyChange(stateIn, property); + + if (property == LumatoneEditorProperty::DeveloperModeOn) + { + setDeveloperMode(getInDeveloperMode()); + } +} + +//[MiscUserCode] You can add your own definitions of your custom methods or any other code here... + +void CurvesArea::loadFromMapping() +{ + dynamic_cast(curvesTab->getCurrentContentComponent())->loadFromMapping(); +} + +void CurvesArea::sendConfigToController() +{ + // Send all curves configurations to controller + // The "developer mode" curve configs (fader, aftertouch, Lumatouch, modulation wheel) are sent only if developer mode is active. + for (int i = 0; i < curvesTab->getNumTabs(); i++) + { + dynamic_cast(curvesTab->getTabContentComponent(i))->sendVelocityTableToController(); + } +} + +void CurvesArea::setDeveloperMode(bool devModeOn) +{ + // showDeveloperMode = devModeOn; + btnDeveloperMode->setVisible(devModeOn); + repaint(); +} + +//[/MiscUserCode] + + +//============================================================================== +#if 0 +/* -- Projucer information section -- + + This is where the Projucer stores the metadata that describe this GUI layout, so + make changes in here at your peril! + +BEGIN_JUCER_METADATA + + + + + +END_JUCER_METADATA +*/ +#endif + + +//[EndFile] You can add extra defines here... +//[/EndFile] diff --git a/Source/CurvesArea.h b/Source/mapping_editors/CurvesArea.h similarity index 96% rename from Source/CurvesArea.h rename to Source/mapping_editors/CurvesArea.h index 7f2412de..535286ee 100644 --- a/Source/CurvesArea.h +++ b/Source/mapping_editors/CurvesArea.h @@ -1,107 +1,107 @@ -/* - ============================================================================== - - This is an automatically generated GUI class created by the Projucer! - - Be careful when adding custom code to these files, as only the code within - the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded - and re-saved. - - Created with Projucer version: 6.0.8 - - ------------------------------------------------------------------------------ - - The Projucer is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited. - - ============================================================================== -*/ - -#pragma once - -//[Headers] -- You can add your own extra header files here -- -#include - -#include "LumatoneEditorState.h" -//[/Headers] - - - -//============================================================================== -/** - //[Comments] - An auto-generated component, created by the Projucer. - - Describe your class and how it works here! - //[/Comments] -*/ -class CurvesArea : public juce::Component, - public LumatoneEditorState, - public juce::Button::Listener -{ -public: - //============================================================================== - CurvesArea (const LumatoneEditorState& stateIn); - ~CurvesArea() override; - - //============================================================================== - //[UserMethods] -- You can add your own custom methods in this section. - class CurvesTabComponent : public juce::TabbedComponent - { - public: - CurvesTabComponent(TabbedButtonBar::Orientation orientation); - void currentTabChanged(int newCurrentTabIndex, const String &newCurrentTabName) override; - - void setTabsIndent(int indentWidthIn); - void resized() override; - - private: - - int currentTabIndent = 0; - }; - - // New mapping is loaded. Display data. - void loadFromMapping(); - - // Send curves configs to controller - void sendConfigToController(); - - void setDeveloperMode(bool devModeOn); - //[/UserMethods] - - void paint (juce::Graphics& g) override; - void resized() override; - void buttonClicked (juce::Button* buttonThatWasClicked) override; - - -private: - void handleStatePropertyChange(juce::ValueTree stateIn, const juce::Identifier& property) override; - -private: - //[UserVariables] -- You can add your own custom variables in this section. - - // bool showDeveloperMode = false; - - //============================================================================== - // Size and position constants - const float curvesLabelHeight = 0.0667f; - const float tabDepth = 0.115f; - const float tabXScalar = 0.333f; - const float tabYScalar = 0.06f; - const float tabWidth = 0.65f; - const float tabFontHeight = 0.058f; - - //[/UserVariables] - - //============================================================================== - std::unique_ptr labelWindowTitle; - std::unique_ptr curvesTab; - std::unique_ptr btnDeveloperMode; - - - //============================================================================== - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CurvesArea) -}; - -//[EndFile] You can add extra defines here... -//[/EndFile] +/* + ============================================================================== + + This is an automatically generated GUI class created by the Projucer! + + Be careful when adding custom code to these files, as only the code within + the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded + and re-saved. + + Created with Projucer version: 6.0.8 + + ------------------------------------------------------------------------------ + + The Projucer is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited. + + ============================================================================== +*/ + +#pragma once + +//[Headers] -- You can add your own extra header files here -- +#include + +#include "../LumatoneEditorState.h" +//[/Headers] + + + +//============================================================================== +/** + //[Comments] + An auto-generated component, created by the Projucer. + + Describe your class and how it works here! + //[/Comments] +*/ +class CurvesArea : public juce::Component, + public LumatoneEditorState, + public juce::Button::Listener +{ +public: + //============================================================================== + CurvesArea (const LumatoneEditorState& stateIn); + ~CurvesArea() override; + + //============================================================================== + //[UserMethods] -- You can add your own custom methods in this section. + class CurvesTabComponent : public juce::TabbedComponent + { + public: + CurvesTabComponent(TabbedButtonBar::Orientation orientation); + void currentTabChanged(int newCurrentTabIndex, const String &newCurrentTabName) override; + + void setTabsIndent(int indentWidthIn); + void resized() override; + + private: + + int currentTabIndent = 0; + }; + + // New mapping is loaded. Display data. + void loadFromMapping(); + + // Send curves configs to controller + void sendConfigToController(); + + void setDeveloperMode(bool devModeOn); + //[/UserMethods] + + void paint (juce::Graphics& g) override; + void resized() override; + void buttonClicked (juce::Button* buttonThatWasClicked) override; + + +private: + void handleStatePropertyChange(juce::ValueTree stateIn, const juce::Identifier& property) override; + +private: + //[UserVariables] -- You can add your own custom variables in this section. + + // bool showDeveloperMode = false; + + //============================================================================== + // Size and position constants + const float curvesLabelHeight = 0.0667f; + const float tabDepth = 0.115f; + const float tabXScalar = 0.333f; + const float tabYScalar = 0.06f; + const float tabWidth = 0.65f; + const float tabFontHeight = 0.058f; + + //[/UserVariables] + + //============================================================================== + std::unique_ptr labelWindowTitle; + std::unique_ptr curvesTab; + std::unique_ptr btnDeveloperMode; + + + //============================================================================== + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CurvesArea) +}; + +//[EndFile] You can add extra defines here... +//[/EndFile] diff --git a/Source/MappingSettingsControls.cpp b/Source/mapping_editors/MappingSettingsControls.cpp similarity index 95% rename from Source/MappingSettingsControls.cpp rename to Source/mapping_editors/MappingSettingsControls.cpp index 6b05f507..cde48ccd 100644 --- a/Source/MappingSettingsControls.cpp +++ b/Source/mapping_editors/MappingSettingsControls.cpp @@ -10,9 +10,9 @@ #include "MappingSettingsControls.h" -#include "LumatoneEditorLookAndFeel.h" +#include "../LumatoneEditorLookAndFeel.h" -#include "./lumatone_editor_library/graphics/view_constants.h" +#include "../lumatone_editor_library/graphics/view_constants.h" //============================================================================== MappingSettingsControls::MappingSettingsControls (const LumatoneEditorState& stateIn) @@ -109,12 +109,12 @@ MappingSettingsControls::~MappingSettingsControls() //============================================================================== void MappingSettingsControls::paint (juce::Graphics& g) { - g.setColour(getEditorLookAndFeel().findColour(LumatoneEditorColourIDs::ControlAreaBackground)); - g.fillRoundedRectangle(getLocalBounds().toFloat(), roundedCornerSize); + g.setColour(getEditorLookAndFeel().findColour(LumatoneEditorColourIDs::MediumBackground)); + g.fillRoundedRectangle(getLocalBounds().toFloat(), getRoundedRectCornerSize()); g.setColour(getEditorLookAndFeel().findColour(LumatoneEditorColourIDs::ControlBoxBackground)); - g.fillRoundedRectangle(generalSettingsBounds, roundedCornerSize); - g.fillRoundedRectangle(pedalBounds, roundedCornerSize); + g.fillRoundedRectangle(generalSettingsBounds, getRoundedRectCornerSize()); + g.fillRoundedRectangle(pedalBounds, getRoundedRectCornerSize()); } void MappingSettingsControls::resized() @@ -122,7 +122,7 @@ void MappingSettingsControls::resized() float w = (float)getWidth(); float h = (float)getHeight(); - roundedCornerSize = roundToInt(getWindowBounds().getHeight() * ROUNDEDCORNERTOAPPHEIGHT); + // roundedCornerSize = roundToInt(getWindowBounds().getHeight() * ROUNDEDCORNERTOAPPHEIGHT); int settingsMarginX = roundToInt(w * controlAreaXMargin); int settingsYMargin = roundToInt(h * settingsAreaMarginH); diff --git a/Source/MappingSettingsControls.h b/Source/mapping_editors/MappingSettingsControls.h similarity index 94% rename from Source/MappingSettingsControls.h rename to Source/mapping_editors/MappingSettingsControls.h index 9428ba7f..75e0b976 100644 --- a/Source/MappingSettingsControls.h +++ b/Source/mapping_editors/MappingSettingsControls.h @@ -11,8 +11,8 @@ #ifndef LUMATONE_EDITOR_MAPPING_SETTINGS_COMPONENT_H #define LUMATONE_EDITOR_MAPPING_SETTINGS_COMPONENT_H -#include "./lumatone_editor_library/listeners/editor_listener.h" -#include "LumatoneEditorState.h" +#include "../lumatone_editor_library/listeners/editor_listener.h" +#include "../LumatoneEditorState.h" class MappingSettingsControls : public juce::Component , public LumatoneEditorState @@ -43,7 +43,7 @@ class MappingSettingsControls : public juce::Component void exprSensitivitySliderCallback(); private: - int roundedCornerSize = 0; + // int roundedCornerSize = 0; juce::Rectangle generalSettingsBounds; juce::Rectangle pedalBounds; diff --git a/Source/MappingSettingsPanel.cpp b/Source/mapping_editors/MappingSettingsPanel.cpp similarity index 100% rename from Source/MappingSettingsPanel.cpp rename to Source/mapping_editors/MappingSettingsPanel.cpp diff --git a/Source/MappingSettingsPanel.h b/Source/mapping_editors/MappingSettingsPanel.h similarity index 97% rename from Source/MappingSettingsPanel.h rename to Source/mapping_editors/MappingSettingsPanel.h index 80014c0b..9a04b493 100644 --- a/Source/MappingSettingsPanel.h +++ b/Source/mapping_editors/MappingSettingsPanel.h @@ -12,7 +12,7 @@ #define LUMATONE_EDITOR_MAPPING_SETTINGS_PANEL_H // #include "./lumatone_editor_library/listeners/editor_listener.h" -#include "LumatoneEditorState.h" +#include "../LumatoneEditorState.h" class MappingSettingsControls; class CurvesArea; @@ -35,7 +35,6 @@ class MappingSettingsPanel : public juce::Component std::unique_ptr settingsControls; std::unique_ptr curvesArea; - int contentMarginY; int contentHeight;