42 MenuItem() :
name(deluge::l10n::String::EMPTY_STRING),
title(deluge::l10n::String::EMPTY_STRING) {}
43 MenuItem(deluge::l10n::String newName, deluge::l10n::String newTitle = deluge::l10n::String::EMPTY_STRING)
45 if (newTitle == deluge::l10n::String::EMPTY_STRING) {
50 MenuItem(
const MenuItem& other) =
delete;
51 MenuItem(
const MenuItem&& other) =
delete;
52 MenuItem& operator=(
const MenuItem& other) =
delete;
53 MenuItem& operator=(
const MenuItem&& other) =
delete;
55 virtual ~MenuItem() =
default;
67 virtual ActionResult
buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine) {
68 return ActionResult::NOT_DEALT_WITH;
96 virtual ActionResult
timerCallback() {
return ActionResult::DEALT_WITH; }
113 virtual void beginSession(MenuItem* navigatedBackwardFrom =
nullptr) {};
170 virtual void learnKnob(
MIDICable* cable, int32_t whichKnob, int32_t modKnobMode, int32_t midiChannel) {}
180 virtual void learnProgramChange(
MIDICable& cable, int32_t channel, int32_t programNumber) {}
181 virtual void learnCC(MIDICable& cable, int32_t channel, int32_t ccNumber, int32_t value);
221 [[nodiscard]]
virtual std::string_view
getTitle()
const {
return deluge::l10n::getView(
title); }
243 const deluge::l10n::String
name;
247 [[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);
272 virtual bool isSubmenu() {
return false; }
273 virtual void setupNumberEditor() {}
274 virtual void updatePadLights();
286 virtual void getColumnLabel(
StringBuf& label) { label.append(
getName().data()); }
301 [[nodiscard]]
virtual bool showPopup()
const {
return true; }
313 virtual void renderInHorizontalMenu(int32_t startX, int32_t width, int32_t startY, int32_t height) {};