Deluge Firmware 1.3.0
Build date: 2025.06.05
Loading...
Searching...
No Matches
load_midi_device_definition_ui.h
1/*
2 * Copyright (c) 2024 Sean Ditny
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 "gui/ui/load/load_ui.h"
22#include "hid/button.h"
23
24class LoadMidiDeviceDefinitionUI final : public LoadUI {
25public:
26 LoadMidiDeviceDefinitionUI() = default;
27
28 bool getGreyoutColsAndRows(uint32_t* cols, uint32_t* rows) override;
29 bool opened() override;
30
31 ActionResult buttonAction(deluge::hid::Button b, bool on, bool inCardRoutine) override;
32 ActionResult padAction(int32_t x, int32_t y, int32_t velocity) override;
33
34 bool renderMainPads(uint32_t whichRows, RGB image[][kDisplayWidth + kSideBarWidth] = nullptr,
35 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth] = nullptr, bool drawUndefinedArea = true,
36 int32_t navSys = -1) {
37 return true;
38 }
39 bool renderSidebar(uint32_t whichRows, RGB image[][kDisplayWidth + kSideBarWidth],
40 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth]) override {
41 return true;
42 }
43
44 Error performLoad(bool doClone = false);
45
46 // ui
47 UIType getUIType() override { return UIType::LOAD_MIDI_DEVICE_DEFINITION; }
48
49protected:
50 void folderContentsReady(int32_t entryDirection) override;
51 void enterKeyPress() override;
52
53private:
54 Error setupForLoadingMidiDeviceDefinition();
55 Error currentLabelLoadError = Error::NONE;
56};
57
58extern LoadMidiDeviceDefinitionUI loadMidiDeviceDefinitionUI;
Definition load_midi_device_definition_ui.h:24
UIType getUIType() override
What type of UI is this? e.g. UIType::ARRANGER.
Definition load_midi_device_definition_ui.h:47
This class represents the colour format most used by the Deluge globally.
Definition rgb.h:14