Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
global_params.h
1
2/*
3 * Copyright © 2015-2023 Synthstrom Audible Limited
4 *
5 * This file is part of The Synthstrom Audible Deluge Firmware.
6 *
7 * The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
8 * terms of the GNU General Public License as published by the Free Software Foundation,
9 * either version 3 of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along with this program.
16 * If not, see <https://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21#include "gui/menu_item/menu_item.h"
22
23namespace deluge::gui::menu_item {
24
25class DxGlobalParams final : public MenuItem {
26public:
27 using MenuItem::MenuItem;
28 DxGlobalParams(l10n::String newName) : MenuItem(newName) {}
29 void beginSession(MenuItem* navigatedBackwardFrom) override;
30 bool tryLoad(const char* path);
31 void drawPixelsForOled() override;
32 void readValueAgain() final;
33 void selectEncoderAction(int32_t offset) final;
34 MenuItem* selectButtonPress() final;
35 void drawValue();
36
37 int32_t currentValue = 0;
38 int scrollPos = 0; // Each instance needs to store this separately
39};
40
41extern DxGlobalParams dxGlobalParams;
42} // namespace deluge::gui::menu_item
Definition global_params.h:25
void selectEncoderAction(int32_t offset) final
Handle select encoder movement.
Definition global_params.cpp:72
void drawPixelsForOled() override
Paints the pixels below the standard title block.
Definition global_params.cpp:60
MenuItem * selectButtonPress() final
Handle a select button press.
Definition global_params.cpp:103
void beginSession(MenuItem *navigatedBackwardFrom) override
Begin an editing session with this menu item.
Definition global_params.cpp:34
void readValueAgain() final
Re-read the value from the system and redraw the display to match.
Definition global_params.cpp:38