45 MenuItem() :
name(deluge::l10n::String::EMPTY_STRING),
title(deluge::l10n::String::EMPTY_STRING) {}
46 MenuItem(deluge::l10n::String newName, deluge::l10n::String newTitle = deluge::l10n::String::EMPTY_STRING)
48 if (newTitle == deluge::l10n::String::EMPTY_STRING) {
53 MenuItem(
const MenuItem& other) =
delete;
54 MenuItem(
const MenuItem&& other) =
delete;
55 MenuItem& operator=(
const MenuItem& other) =
delete;
56 MenuItem& operator=(
const MenuItem&& other) =
delete;
58 virtual ~MenuItem() =
default;
70 virtual ActionResult
buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine) {
71 return ActionResult::NOT_DEALT_WITH;
99 virtual ActionResult
timerCallback() {
return ActionResult::DEALT_WITH; }
116 virtual void beginSession(MenuItem* navigatedBackwardFrom =
nullptr) {};
173 virtual void learnKnob(
MIDICable* cable, int32_t whichKnob, int32_t modKnobMode, int32_t midiChannel) {}
183 virtual void learnProgramChange(
MIDICable& cable, int32_t channel, int32_t programNumber) {}
184 virtual void learnCC(MIDICable& cable, int32_t channel, int32_t ccNumber, int32_t value);
224 [[nodiscard]]
virtual std::string_view
getTitle()
const {
return deluge::l10n::getView(
title); }
246 const deluge::l10n::String
name;
250 [[nodiscard]]
virtual std::string_view
getName()
const {
return deluge::l10n::getView(
name); }
260 static void drawItemsForOled(std::span<std::string_view> options, int32_t selectedOption, int32_t offset = 0);
272 virtual int32_t getSubmenuItemTypeRenderIconStart() {
return (OLED_MAIN_WIDTH_PIXELS - kSubmenuIconSpacingX - 3); }
274 virtual void renderSubmenuItemTypeForOled(int32_t yPixel);
275 virtual bool isSubmenu() {
return false; }
276 virtual void setupNumberEditor() {}
277 virtual void updatePadLights();
289 virtual void getColumnLabel(
StringBuf& label) { label.append(
getName().data()); }
316 virtual void renderInHorizontalMenu(int32_t startX, int32_t width, int32_t startY, int32_t height) {};
318 deluge::gui::menu_item::HorizontalMenu* parent{
nullptr};