MCPcopy Create free account
hub / github.com/amsynth/amsynth / MainComponent

Method MainComponent

src/core/gui/MainComponent.cpp:502–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500};
501
502MainComponent::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
522MainComponent::~MainComponent() {
523 setLookAndFeel(nullptr);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected