Skip to content

Commit e4989fe

Browse files
committed
ChannelSelector class: some cleanup.
* Removed ChannelSelectorRegion class and appropriate instances since now it's redundant.
1 parent 91a21c0 commit e4989fe

2 files changed

Lines changed: 1 addition & 67 deletions

File tree

Source/Processors/Editors/ChannelSelector.cpp

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@ ChannelSelector::ChannelSelector(bool createButtons, Font& titleFont_) :
9191
deselectButtonAudio->addListener(this);
9292
addAndMakeVisible(deselectButtonAudio);
9393

94-
channelSelectorRegion = new ChannelSelectorRegion(this);
95-
//channelSelectorRegion->setBounds(0,20,0,getHeight()-35);
96-
//addAndMakeVisible(channelSelectorRegion);
97-
//channelSelectorRegion->toBack();
98-
9994
addAndMakeVisible (paramBox = new ChannelSelectorBox);
10095
addAndMakeVisible (recordBox = new ChannelSelectorBox);
10196
addAndMakeVisible (audioBox = new ChannelSelectorBox);
@@ -220,8 +215,6 @@ void ChannelSelector::shiftChannelsVertical(float amount)
220215

221216
void ChannelSelector::refreshButtonBoundaries()
222217
{
223-
channelSelectorRegion->setBounds(0, 20, getWidth(), getHeight() - 35);
224-
225218
int column = 0;
226219
int row = 0;
227220
int nColumns;
@@ -322,9 +315,6 @@ void ChannelSelector::addButton()
322315
ChannelSelectorButton* b = new ChannelSelectorButton (size + 1, PARAMETER, titleFont);
323316
parameterButtonsManager.addButton (b);
324317

325-
// TODO
326-
//channelSelectorRegion->addAndMakeVisible(b);
327-
328318
if (paramsToggled)
329319
b->setToggleState(true, dontSendNotification);
330320
else
@@ -337,13 +327,9 @@ void ChannelSelector::addButton()
337327
{
338328
ChannelSelectorButton* br = new ChannelSelectorButton(size + 1, RECORD, titleFont);
339329
recordButtonsManager.addButton (br);
340-
//channelSelectorRegion->addAndMakeVisible(br);
341-
//br->addListener(this);
342330

343331
ChannelSelectorButton* ba = new ChannelSelectorButton(size + 1, AUDIO, titleFont);
344332
audioButtonsManager.addButton (ba);
345-
//channelSelectorRegion->addAndMakeVisible(ba);
346-
//ba->addListener(this);
347333
}
348334
}
349335

@@ -352,16 +338,11 @@ void ChannelSelector::removeButton()
352338
int size = parameterButtonsManager.getNumButtons();
353339

354340
parameterButtonsManager.removeButton (size - 1);
355-
// TODO
356-
// channelSelectorRegion->removeChildComponent(b);
357341

358342
if (isNotSink)
359343
{
360344
recordButtonsManager.removeButton (size - 1);
361-
//channelSelectorRegion->removeChildComponent(br);
362-
363-
audioButtonsManager.removeButton (size - 1);
364-
//channelSelectorRegion->removeChildComponent(ba);
345+
audioButtonsManager.removeButton (size - 1);
365346
}
366347
}
367348

@@ -1158,31 +1139,6 @@ void ChannelSelectorButton::setActive(bool t)
11581139
setClickingTogglesState(t);
11591140
}
11601141

1161-
ChannelSelectorRegion::ChannelSelectorRegion(ChannelSelector* cs)
1162-
{
1163-
channelSelector = cs;
1164-
1165-
addMouseListener((MouseListener*) this, true);
1166-
}
1167-
1168-
ChannelSelectorRegion::~ChannelSelectorRegion()
1169-
{
1170-
deleteAllChildren();
1171-
}
1172-
1173-
void ChannelSelectorRegion::mouseWheelMove(const MouseEvent& event,
1174-
const MouseWheelDetails& wheel)
1175-
{
1176-
1177-
// std::cout << "Got wheel move: " << wheel.deltaY << std::endl;
1178-
channelSelector->shiftChannelsVertical(-wheel.deltaY);
1179-
}
1180-
1181-
void ChannelSelectorRegion::paint(Graphics& g)
1182-
{
1183-
// g.fillAll(Colours::white);
1184-
}
1185-
11861142

11871143
/*
11881144
Constructor and Destructor of ChannelSelectorBox.

Source/Processors/Editors/ChannelSelector.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -247,28 +247,6 @@ class EditorButton : public Button
247247
ColourGradient selectedGrad, selectedOverGrad, neutralGrad, neutralOverGrad;
248248
};
249249

250-
/**
251-
252-
Holds the ChannelSelector buttons.
253-
254-
@see ChannelSelector
255-
256-
*/
257-
258-
class ChannelSelectorRegion : public Component
259-
{
260-
public:
261-
ChannelSelectorRegion(ChannelSelector* cs);
262-
~ChannelSelectorRegion();
263-
264-
/** Allows the user to scroll the channels if they are not all visible.*/
265-
void mouseWheelMove(const MouseEvent& event, const MouseWheelDetails& wheel);
266-
void paint(Graphics& g);
267-
268-
private:
269-
ChannelSelector* channelSelector;
270-
271-
};
272250

273251
/**
274252

0 commit comments

Comments
 (0)