Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
patched_param.h
1/*
2 * Copyright © 2017-2023 Synthstrom Audible Limited
3 *
4 * This file is part of The Synthstrom Audible Deluge Firmware.
5 *
6 * The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software Foundation,
8 * either version 3 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with this program.
15 * If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#include "definitions_cxx.hpp"
21#include "menu_item_with_cc_learning.h"
22#include "param.h"
23#include <cstdint>
24
26
27namespace deluge::gui::menu_item {
28
29class PatchedParam : public Param, public MenuItemWithCCLearning {
30public:
31 PatchedParam() = default;
32 PatchedParam(int32_t newP) : Param(newP) {}
33 MenuItem* selectButtonPress();
34 // this button action function definition should not be required as it should be inherited
35 // from the param class, however it does not work if the definition is removed, so there
36 // is likely a multi-inheritance issue that needs to be resolved
37 ActionResult buttonAction(deluge::hid::Button b, bool on, bool inCardRoutine) {
38 return Param::buttonAction(b, on, inCardRoutine);
39 }
40 void horizontalEncoderAction(int32_t offset) { return Param::horizontalEncoderAction(offset); }
41
42 // 7SEG Only
43 virtual void drawValue() = 0;
44
45 ParamDescriptor getLearningThing() override;
46 virtual deluge::modulation::params::Kind getParamKind();
47 virtual uint32_t getParamIndex();
48 virtual uint8_t shouldDrawDotOnName();
49
50 uint8_t shouldBlinkPatchingSourceShortcut(PatchSource s, uint8_t* colour);
51 MenuItem* patchingSourceShortcutPress(PatchSource s, bool previousPressStillActive = false);
52 ModelStackWithAutoParam* getModelStack(void* memory) override;
53
54protected:
55 ParamSet* getParamSet() override;
56};
57
58} // namespace deluge::gui::menu_item
Base class for all menu items.
Definition menu_item.h:39
Definition model_stack.h:269
Definition param_descriptor.h:27
Definition param_set.h:36
Kind
Definition param.h:42