| 500 | }; |
| 501 | |
| 502 | MainComponent::MainComponent(PresetController *presetController, MidiController *midiController) |
| 503 | : impl_(std::make_unique<Impl>(this, midiController, presetController, &commandManager)) { |
| 504 | impl_->setProperty = [this] (const char *name, const char *value) { |
| 505 | sendProperty(name, value); |
| 506 | properties[name] = value; |
| 507 | }; |
| 508 | setLookAndFeel(&impl_->lookAndFeel_); |
| 509 | addAndMakeVisible(impl_->menuButton_); |
| 510 | addAndMakeVisible(impl_->bankCombo_); |
| 511 | addAndMakeVisible(impl_->presetCombo_); |
| 512 | addAndMakeVisible(impl_->controlPanel_); |
| 513 | addAndMakeVisible(impl_->saveButton_); |
| 514 | addAndMakeVisible(impl_->prevButton_); |
| 515 | addAndMakeVisible(impl_->nextButton_); |
| 516 | setBounds(0, 0, impl_->controlPanel_.getWidth(), impl_->controlPanel_.getBottom()); |
| 517 | commandManager.registerAllCommandsForTarget(this); |
| 518 | addKeyListener(commandManager.getKeyMappings()); |
| 519 | setOpaque(true); |
| 520 | } |
| 521 | |
| 522 | MainComponent::~MainComponent() { |
| 523 | setLookAndFeel(nullptr); |
nothing calls this directly
no outgoing calls
no test coverage detected