52 MenuItem() :
name(deluge::l10n::String::EMPTY_STRING),
title(deluge::l10n::String::EMPTY_STRING) {}
53 MenuItem(deluge::l10n::String newName, deluge::l10n::String newTitle = deluge::l10n::String::EMPTY_STRING)
55 if (newTitle == deluge::l10n::String::EMPTY_STRING) {
60 MenuItem(
const MenuItem& other) =
delete;
61 MenuItem(
const MenuItem&& other) =
delete;
62 MenuItem& operator=(
const MenuItem& other) =
delete;
63 MenuItem& operator=(
const MenuItem&& other) =
delete;
65 virtual ~MenuItem() =
default;
77 virtual ActionResult
buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine) {
78 return ActionResult::NOT_DEALT_WITH;
123 virtual void beginSession(MenuItem* navigatedBackwardFrom =
nullptr) {};
180 virtual void learnKnob(
MIDICable* cable, int32_t whichKnob, int32_t modKnobMode, int32_t midiChannel) {}
190 virtual void learnProgramChange(
MIDICable& cable, int32_t channel, int32_t programNumber) {}
191 virtual void learnCC(MIDICable& cable, int32_t channel, int32_t ccNumber, int32_t value);
231 [[nodiscard]]
virtual std::string_view
getTitle()
const {
return deluge::l10n::getView(
title); }
253 const deluge::l10n::String
name;
257 [[nodiscard]]
virtual std::string_view
getName()
const {
return deluge::l10n::getView(
name); }
267 static void drawItemsForOled(std::span<std::string_view> options, int32_t selectedOption, int32_t offset = 0);
279 virtual int32_t getSubmenuItemTypeRenderIconStart() {
return (OLED_MAIN_WIDTH_PIXELS - kSubmenuIconSpacingX - 3); }
281 virtual void renderSubmenuItemTypeForOled(int32_t yPixel);
282 virtual bool isSubmenu() {
return false; }
283 virtual void setupNumberEditor() {}
284 virtual void updatePadLights();
293 virtual void getColumnLabel(StringBuf& label) { label.append(
getName().data()); }
322 deluge::gui::menu_item::HorizontalMenu* parent{
nullptr};