41 MenuItem() :
name(deluge::l10n::String::EMPTY_STRING),
title(deluge::l10n::String::EMPTY_STRING) {}
42 MenuItem(deluge::l10n::String newName, deluge::l10n::String newTitle = deluge::l10n::String::EMPTY_STRING)
44 if (newTitle == deluge::l10n::String::EMPTY_STRING) {
49 MenuItem(
const MenuItem& other) =
delete;
50 MenuItem(
const MenuItem&& other) =
delete;
51 MenuItem& operator=(
const MenuItem& other) =
delete;
52 MenuItem& operator=(
const MenuItem&& other) =
delete;
54 virtual ~MenuItem() =
default;
66 virtual ActionResult
buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine) {
67 return ActionResult::NOT_DEALT_WITH;
95 virtual ActionResult
timerCallback() {
return ActionResult::DEALT_WITH; }
112 virtual void beginSession(MenuItem* navigatedBackwardFrom =
nullptr) {};
169 virtual void learnKnob(
MIDICable* cable, int32_t whichKnob, int32_t modKnobMode, int32_t midiChannel) {}
179 virtual void learnProgramChange(
MIDICable& cable, int32_t channel, int32_t programNumber) {}
180 virtual void learnCC(MIDICable& cable, int32_t channel, int32_t ccNumber, int32_t value);
220 [[nodiscard]]
virtual std::string_view
getTitle()
const {
return deluge::l10n::getView(
title); }
242 const deluge::l10n::String
name;
246 [[nodiscard]]
virtual std::string_view
getName()
const {
return deluge::l10n::getView(
name); }
270 static void drawItemsForOled(std::span<std::string_view> options, int32_t selectedOption, int32_t offset = 0);
282 virtual int32_t getSubmenuItemTypeRenderIconStart() {
return (OLED_MAIN_WIDTH_PIXELS - kSubmenuIconSpacingX - 3); }
284 virtual void renderSubmenuItemTypeForOled(int32_t yPixel);
286 virtual void renderInHorizontalMenu(int32_t startX, int32_t width, int32_t startY, int32_t height);
287 virtual bool isSubmenu() {
return false; }
288 virtual void setupNumberEditor() {}
289 virtual void updatePadLights();
293 void renderColumnLabel(int32_t startX, int32_t width, int32_t startY);