20#include "definitions_cxx.hpp"
21#include "gui/menu_item/menu_item.h"
25namespace deluge::gui::menu_item::midi {
27class Command final :
public MenuItem {
29 Command(l10n::String newName, GlobalMIDICommand newCommandNumber = GlobalMIDICommand::PLAYBACK_RESTART)
30 : MenuItem(newName), commandNumber(newCommandNumber) {}
31 void beginSession(MenuItem* navigatedBackwardFrom)
override;
32 void drawValue()
const;
38 void learnProgramChange(
MIDICable& cable, int32_t channel, int32_t programNumber)
override;
39 void learnCC(
MIDICable& cable, int32_t channel, int32_t ccNumber, int32_t value)
override;
43 GlobalMIDICommand commandNumber;
A MIDI cable connection. Stores all state specific to a given cable and its contained ports and chann...
Definition midi_device.h:94
bool learnNoteOn(MIDICable &cable, int32_t channel, int32_t noteCode) override
Attempt to bind this menu item to a note code.
Definition command.cpp:139
void beginSession(MenuItem *navigatedBackwardFrom) override
Begin an editing session with this menu item.
Definition command.cpp:30
bool shouldBlinkLearnLed() override
Definition command.h:35
void unlearnAction() override
Unlearn the parameter controlled by this menu.
Definition command.cpp:115
void drawPixelsForOled() override
Paints the pixels below the standard title block.
Definition command.cpp:36
void selectEncoderAction(int32_t offset) override
Handle select encoder movement.
Definition command.cpp:105
bool allowsLearnMode() override
Used by SoundEditor to determine if the current menu item can accept MIDI learning.
Definition command.h:34