Deluge Firmware 1.3.0
Build date: 2025.08.14
Loading...
Searching...
No Matches
editor_layout.h
1/*
2 * Copyright (c) 2023 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 "gui/views/automation_view.h"
21
22// namespace deluge::gui::views::automation {
23
24class AutomationEditorLayout {
25public:
26 AutomationEditorLayout() = default;
27 virtual ~AutomationEditorLayout() {}
28
29 // get automationView class info
30protected:
31 // get AutomationView UI
32 inline RootUI* getAutomationView() { return &automationView; }
33 inline AutomationParamType& getAutomationParamType() { return automationView.automationParamType; }
34 inline bool& getOnArrangerView() { return automationView.onArrangerView; }
35 inline int32_t& getNavSysId() { return automationView.navSysId; }
36
37 // display / LED indicators / pad rendering
38 inline void renderDisplay(int32_t knobPosLeft = kNoSelection, int32_t knobPosRight = kNoSelection,
39 bool modEncoderAction = false) {
40 automationView.renderDisplay(knobPosLeft, knobPosRight, modEncoderAction);
41 }
42 inline void displayAutomation(bool padSelected = false, bool updateDisplay = true) {
43 automationView.displayAutomation(padSelected, updateDisplay);
44 }
45 inline void renderUndefinedArea(int32_t xScroll, uint32_t xZoom, int32_t lengthToDisplay,
46 RGB image[][kDisplayWidth + kSideBarWidth],
47 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth], int32_t imageWidth,
48 TimelineView* timelineView, bool tripletsOnHere, int32_t xDisplay) {
49 automationView.renderUndefinedArea(xScroll, xZoom, lengthToDisplay, image, occupancyMask, imageWidth,
50 timelineView, tripletsOnHere, xDisplay);
51 }
52
53 // interpolation
54 inline void initInterpolation() { automationView.initInterpolation(); }
55 inline void resetInterpolationShortcutBlinking() { automationView.resetInterpolationShortcutBlinking(); }
56 inline void blinkInterpolationShortcut() { automationView.blinkInterpolationShortcut(); }
57 inline bool& getInterpolation() { return automationView.interpolation; }
58 inline bool& getInterpolationBefore() { return automationView.interpolationBefore; }
59 inline bool& getInterpolationAfter() { return automationView.interpolationAfter; }
60
61 // pad selection mode
62 inline bool& getPadSelectionOn() { return automationView.padSelectionOn; }
63 inline void initPadSelection() { automationView.initPadSelection(); }
64 inline void blinkPadSelectionShortcut() { automationView.blinkPadSelectionShortcut(); }
65
66 // pad press
67 inline int32_t getPosFromSquare(int32_t square, int32_t localScroll = -1) const {
68 return automationView.getPosFromSquare(square, localScroll);
69 }
70 inline int32_t getPosFromSquare(int32_t square, int32_t xScroll, uint32_t xZoom) const {
71 return automationView.getPosFromSquare(square, xScroll, xZoom);
72 }
73 inline bool& getMultiPadPressActive() { return automationView.multiPadPressActive; }
74 inline bool& getMultiPadPressSelected() { return automationView.multiPadPressSelected; }
75 inline bool& getMiddlePadPressSelected() { return automationView.middlePadPressSelected; }
76 inline int32_t& getLeftPadSelectedX() { return automationView.leftPadSelectedX; }
77 inline int32_t& getLeftPadSelectedY() { return automationView.leftPadSelectedY; }
78 inline int32_t& getRightPadSelectedX() { return automationView.rightPadSelectedX; }
79 inline int32_t& getRightPadSelectedY() { return automationView.rightPadSelectedY; }
80 inline int32_t& getLastPadSelectedKnobPos() { return automationView.lastPadSelectedKnobPos; }
81
82 // mod encoder
83 inline CopiedParamAutomation* getCopiedParamAutomation() { return &automationView.copiedParamAutomation; }
84
85 // model stack
87 getModelStackWithParamForClip(ModelStackWithTimelineCounter* modelStack, Clip* clip,
89 deluge::modulation::params::Kind paramKind = deluge::modulation::params::Kind::NONE) {
90 return automationView.getModelStackWithParamForClip(modelStack, clip, paramID, paramKind);
91 }
92};
93
94// }; // namespace deluge::gui::views::automation
Definition clip.h:46
Definition copied_param_automation.h:28
Definition model_stack.h:269
Definition model_stack.h:129
This class represents the colour format most used by the Deluge globally.
Definition rgb.h:14
Definition root_ui.h:27
Definition timeline_view.h:27
Kind
Definition param.h:42
constexpr uint32_t kNoParamID
Magic number which represents an invalid or missing param type.
Definition param.h:298