Deluge Firmware
1.3.0
Build date: 2026.08.23
Toggle main menu visibility
Loading...
Searching...
No Matches
param.h
1
/*
2
* Copyright © 2015-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 "gui/menu_item/menu_item.h"
21
22
class
DxPatch
;
23
24
namespace
deluge::gui::menu_item {
25
26
class
DxParam final :
public
MenuItem {
27
public
:
28
using
MenuItem::MenuItem;
29
DxParam(l10n::String newName) : MenuItem(newName) {}
30
void
beginSession
(MenuItem* navigatedBackwardFrom)
override
;
31
void
drawPixelsForOled
()
override
;
32
void
flashParamName();
33
void
readValueAgain
()
final
;
34
void
selectEncoderAction
(int32_t offset)
final
;
35
void
drawValue();
36
void
horizontalEncoderAction
(int32_t offset)
override
;
37
ActionResult
timerCallback
()
override
;
38
[[nodiscard]] std::string_view
getTitle
()
const override
;
39
40
bool
potentialShortcutPadAction(int32_t x, int32_t y,
bool
on);
41
42
void
setValue(
int
val);
43
int
getValue();
44
45
// 0-5: operators, 6: global params
46
void
openForOpOrGlobal(
int
op);
47
void
blinkSideColumn();
48
bool
hasSideColumn();
49
50
int
param = 0;
51
int
upper_limit = 0;
52
int32_t displayValue = 0;
53
DxPatch
* patch;
54
55
int
flash_row = -1;
56
bool
blink_next =
false
;
57
};
58
59
extern
DxParam
dxParam;
60
}
// namespace deluge::gui::menu_item
DxPatch
Definition
dx7note.h:38
deluge::gui::menu_item::DxParam
Definition
param.h:26
deluge::gui::menu_item::DxParam::drawPixelsForOled
void drawPixelsForOled() override
Paints the pixels below the standard title block.
Definition
param.cpp:516
deluge::gui::menu_item::DxParam::selectEncoderAction
void selectEncoderAction(int32_t offset) final
Handle select encoder movement.
Definition
param.cpp:160
deluge::gui::menu_item::DxParam::beginSession
void beginSession(MenuItem *navigatedBackwardFrom) override
Begin an editing session with this menu item.
Definition
param.cpp:36
deluge::gui::menu_item::DxParam::readValueAgain
void readValueAgain() final
Re-read the value from the system and redraw the display to match.
Definition
param.cpp:66
deluge::gui::menu_item::DxParam::getTitle
std::string_view getTitle() const override
Get the title to be used when rendering on OLED, both as a deluge::gui::menu_item::Submenu and when d...
Definition
param.cpp:276
deluge::gui::menu_item::DxParam::timerCallback
ActionResult timerCallback() override
Handle a TimerName::UI_SPECIFIC event.
Definition
param.cpp:155
deluge::gui::menu_item::DxParam::horizontalEncoderAction
void horizontalEncoderAction(int32_t offset) override
Handle horizontal encoder movement.
Definition
param.cpp:177