54 MenuItem() :
name(deluge::l10n::String::EMPTY_STRING),
title(deluge::l10n::String::EMPTY_STRING) {}
55 MenuItem(deluge::l10n::String newName, deluge::l10n::String newTitle = deluge::l10n::String::EMPTY_STRING)
57 if (newTitle == deluge::l10n::String::EMPTY_STRING) {
62 MenuItem(
const MenuItem& other) =
delete;
63 MenuItem(
const MenuItem&& other) =
delete;
64 MenuItem& operator=(
const MenuItem& other) =
delete;
65 MenuItem& operator=(
const MenuItem&& other) =
delete;
67 virtual ~MenuItem() =
default;
79 virtual ActionResult
buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine) {
80 return ActionResult::NOT_DEALT_WITH;
125 virtual void beginSession(MenuItem* navigatedBackwardFrom =
nullptr) {};
159 [[nodiscard]]
virtual PatchingSourceShortcutTarget
161 return PatchingSourceShortcutTarget::PARAMETER;
187 virtual void learnKnob(
MIDICable* cable, int32_t whichKnob, int32_t modKnobMode, int32_t midiChannel) {}
197 virtual void learnProgramChange(
MIDICable& cable, int32_t channel, int32_t programNumber) {}
198 virtual void learnCC(MIDICable& cable, int32_t channel, int32_t ccNumber, int32_t value);
238 [[nodiscard]]
virtual std::string_view
getTitle()
const {
return deluge::l10n::getView(
title); }
260 const deluge::l10n::String
name;
264 [[nodiscard]]
virtual std::string_view
getName()
const {
return deluge::l10n::getView(
name); }
274 static void drawItemsForOled(std::span<std::string_view> options, int32_t selectedOption, int32_t offset = 0);
286 virtual int32_t getSubmenuItemTypeRenderIconStart() {
return (OLED_MAIN_WIDTH_PIXELS - kSubmenuIconSpacingX - 3); }
288 virtual void renderSubmenuItemTypeForOled(int32_t yPixel);
289 virtual bool isSubmenu() {
return false; }
290 virtual void setupNumberEditor() {}
291 virtual void updatePadLights();
300 virtual void getColumnLabel(StringBuf& label) { label.append(
getName().data()); }
327 virtual void renderInHorizontalMenu(
const SlotPosition& slot) {};
329 deluge::gui::menu_item::HorizontalMenu* parent{
nullptr};
331 virtual bool selectEncoderActionIsPermitted() {
return true; }