diff --git a/Source/Processors/Editors/ChannelSelector.cpp b/Source/Processors/Editors/ChannelSelector.cpp index a9e29723c4f4fcae2eed40c49363ea4be7c1b553..e44e5ff0a14279e44ac8d75deab0f590364bb0be 100755 --- a/Source/Processors/Editors/ChannelSelector.cpp +++ b/Source/Processors/Editors/ChannelSelector.cpp @@ -91,11 +91,6 @@ ChannelSelector::ChannelSelector(bool createButtons, Font& titleFont_) : deselectButtonAudio->addListener(this); addAndMakeVisible(deselectButtonAudio); - channelSelectorRegion = new ChannelSelectorRegion(this); - //channelSelectorRegion->setBounds(0,20,0,getHeight()-35); - //addAndMakeVisible(channelSelectorRegion); - //channelSelectorRegion->toBack(); - addAndMakeVisible (paramBox = new ChannelSelectorBox); addAndMakeVisible (recordBox = new ChannelSelectorBox); addAndMakeVisible (audioBox = new ChannelSelectorBox); @@ -220,8 +215,6 @@ void ChannelSelector::shiftChannelsVertical(float amount) void ChannelSelector::refreshButtonBoundaries() { - channelSelectorRegion->setBounds(0, 20, getWidth(), getHeight() - 35); - int column = 0; int row = 0; int nColumns; @@ -322,9 +315,6 @@ void ChannelSelector::addButton() ChannelSelectorButton* b = new ChannelSelectorButton (size + 1, PARAMETER, titleFont); parameterButtonsManager.addButton (b); - // TODO - //channelSelectorRegion->addAndMakeVisible(b); - if (paramsToggled) b->setToggleState(true, dontSendNotification); else @@ -337,13 +327,9 @@ void ChannelSelector::addButton() { ChannelSelectorButton* br = new ChannelSelectorButton(size + 1, RECORD, titleFont); recordButtonsManager.addButton (br); - //channelSelectorRegion->addAndMakeVisible(br); - //br->addListener(this); ChannelSelectorButton* ba = new ChannelSelectorButton(size + 1, AUDIO, titleFont); audioButtonsManager.addButton (ba); - //channelSelectorRegion->addAndMakeVisible(ba); - //ba->addListener(this); } } @@ -352,16 +338,11 @@ void ChannelSelector::removeButton() int size = parameterButtonsManager.getNumButtons(); parameterButtonsManager.removeButton (size - 1); - // TODO - // channelSelectorRegion->removeChildComponent(b); if (isNotSink) { recordButtonsManager.removeButton (size - 1); - //channelSelectorRegion->removeChildComponent(br); - - audioButtonsManager.removeButton (size - 1); - //channelSelectorRegion->removeChildComponent(ba); + audioButtonsManager.removeButton (size - 1); } } @@ -1158,31 +1139,6 @@ void ChannelSelectorButton::setActive(bool t) setClickingTogglesState(t); } -ChannelSelectorRegion::ChannelSelectorRegion(ChannelSelector* cs) -{ - channelSelector = cs; - - addMouseListener((MouseListener*) this, true); -} - -ChannelSelectorRegion::~ChannelSelectorRegion() -{ - deleteAllChildren(); -} - -void ChannelSelectorRegion::mouseWheelMove(const MouseEvent& event, - const MouseWheelDetails& wheel) -{ - - // std::cout << "Got wheel move: " << wheel.deltaY << std::endl; - channelSelector->shiftChannelsVertical(-wheel.deltaY); -} - -void ChannelSelectorRegion::paint(Graphics& g) -{ - // g.fillAll(Colours::white); -} - /* Constructor and Destructor of ChannelSelectorBox. diff --git a/Source/Processors/Editors/ChannelSelector.h b/Source/Processors/Editors/ChannelSelector.h index d829dfd35f72b5db2a8f9f57907cad73059ef8f7..23f1ea248ca600befdc610cae4c7878f3b26c6db 100644 --- a/Source/Processors/Editors/ChannelSelector.h +++ b/Source/Processors/Editors/ChannelSelector.h @@ -247,28 +247,6 @@ private: ColourGradient selectedGrad, selectedOverGrad, neutralGrad, neutralOverGrad; }; -/** - -Holds the ChannelSelector buttons. - -@see ChannelSelector - -*/ - -class ChannelSelectorRegion : public Component -{ -public: - ChannelSelectorRegion(ChannelSelector* cs); - ~ChannelSelectorRegion(); - - /** Allows the user to scroll the channels if they are not all visible.*/ - void mouseWheelMove(const MouseEvent& event, const MouseWheelDetails& wheel); - void paint(Graphics& g); - -private: - ChannelSelector* channelSelector; - -}; /**