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) {};
166 virtual void learnKnob(
MIDICable* cable, int32_t whichKnob, int32_t modKnobMode, int32_t midiChannel) {}
176 virtual void learnProgramChange(
MIDICable& cable, int32_t channel, int32_t programNumber) {}
177 virtual void learnCC(MIDICable& cable, int32_t channel, int32_t ccNumber, int32_t value);
217 [[nodiscard]]
virtual std::string_view
getTitle()
const {
return deluge::l10n::getView(
title); }
239 const deluge::l10n::String
name;
243 [[nodiscard]]
virtual std::string_view
getName()
const {
return deluge::l10n::getView(
name); }
257 static void drawItemsForOled(std::span<std::string_view> options, int32_t selectedOption, int32_t offset = 0);
269 virtual int32_t getSubmenuItemTypeRenderIconStart() {
return (OLED_MAIN_WIDTH_PIXELS - kSubmenuIconSpacingX - 3); }
271 virtual void renderSubmenuItemTypeForOled(int32_t yPixel);
273 virtual void renderInHorizontalMenu(int32_t startX, int32_t width, int32_t startY, int32_t height);
274 virtual bool isSubmenu() {
return false; }
275 virtual void setupNumberEditor() {}
276 virtual void updatePadLights();
280 void renderColumnLabel(int32_t startX, int32_t width, int32_t startY);