MCPcopy Create free account
hub / github.com/jerryuhoo/Fire / buttonClicked

Method buttonClicked

Source/Panels/ControlPanel/GlobalPanel.cpp:433–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433void GlobalPanel::buttonClicked(juce::Button* clickedButton)
434{
435 bool isSwitch = false;
436 if (clickedButton == &filterSwitch && filterSwitch.getToggleState())
437 {
438 activeTabColour = FILTER_COLOUR;
439 setVisibility(filterComponents, true);
440 setVisibility(downsampleComponents, false);
441 setVisibility(graphComponents, false);
442 updateFilterKnobVisibility();
443 isSwitch = true;
444 }
445 else if (clickedButton == &downsampleSwitch && downsampleSwitch.getToggleState())
446 {
447 activeTabColour = DOWNSAMPLE_COLOUR;
448 setVisibility(downsampleComponents, true);
449 setVisibility(filterComponents, false);
450 setVisibility(graphComponents, false);
451 isSwitch = true;
452 }
453 else if (clickedButton == &graphSwitch && graphSwitch.getToggleState())
454 {
455 activeTabColour = COLOUR1;
456 setVisibility(graphComponents, true);
457 setVisibility(filterComponents, false);
458 setVisibility(downsampleComponents, false);
459 isSwitch = true;
460 }
461 else if (clickedButton == &filterLowCutButton || clickedButton == &filterPeakButton || clickedButton == &filterHighCutButton)
462 {
463 updateFilterKnobVisibility();
464 }
465
466 if (isSwitch)
467 {
468 resized();
469 repaint();
470 }
471}
472
473void GlobalPanel::updateFilterKnobVisibility()
474{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected