Deluge Firmware
1.3.0
Build date: 2025.06.05
Loading...
Searching...
No Matches
devices.h
1
/*
2
* Copyright © 2021-2025 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
#include <cstddef>
22
23
namespace
deluge::gui::menu_item::midi {
24
26
class
Devices
final :
public
MenuItem {
27
public
:
28
using
MenuItem::MenuItem;
29
void
beginSession
(MenuItem* navigatedBackwardFrom =
nullptr
)
override
;
30
void
selectEncoderAction
(int32_t offset)
override
;
31
MIDICable
* getCable(int32_t deviceIndex);
32
MenuItem*
selectButtonPress
()
override
;
33
34
void
drawValue();
35
void
drawPixelsForOled
()
override
;
36
37
private
:
39
int32_t
current_cable_
;
41
int32_t
scroll_pos_
;
42
};
43
44
extern
Devices
devicesMenu;
45
}
// namespace deluge::gui::menu_item::midi
MIDICable
A MIDI cable connection. Stores all state specific to a given cable and its contained ports and chann...
Definition
midi_device.h:94
deluge::gui::menu_item::midi::Devices
Menu item for the MIDI device selection menu.
Definition
devices.h:26
deluge::gui::menu_item::midi::Devices::current_cable_
int32_t current_cable_
The currently selected cable. This is either 0 (for the DIN ports) or 1 + the index into the root USB...
Definition
devices.h:39
deluge::gui::menu_item::midi::Devices::scroll_pos_
int32_t scroll_pos_
Scroll position within the displayed items for the OLED.
Definition
devices.h:41
deluge::gui::menu_item::midi::Devices::selectEncoderAction
void selectEncoderAction(int32_t offset) override
Handle select encoder movement.
Definition
devices.cpp:86
deluge::gui::menu_item::midi::Devices::selectButtonPress
MenuItem * selectButtonPress() override
Handle a select button press.
Definition
devices.cpp:140
deluge::gui::menu_item::midi::Devices::beginSession
void beginSession(MenuItem *navigatedBackwardFrom=nullptr) override
Begin an editing session with this menu item.
Definition
devices.cpp:46
deluge::gui::menu_item::midi::Devices::drawPixelsForOled
void drawPixelsForOled() override
Paints the pixels below the standard title block.
Definition
devices.cpp:167