Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
save_ui.h
1/*
2 * Copyright © 2018-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 "definitions_cxx.hpp"
21#include "gui/ui/browser/slot_browser.h"
22#include "hid/button.h"
23
24class SaveUI : public SlotBrowser {
25public:
26 SaveUI();
27 bool opened() override;
28
29 virtual bool performSave(bool mayOverwrite = false) = 0; // Returns true if success, or if otherwise dealt with
30 // (e.g. "overwrite" context menu brought up)
31 void focusRegained() override;
32 bool renderSidebar(uint32_t whichRows, RGB image[][kDisplayWidth + kSideBarWidth] = nullptr,
33 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth] = nullptr) override {
34 return true;
35 }
36 bool canSeeViewUnderneath() final { return false; }
37 ActionResult timerCallback() override;
38 ActionResult buttonAction(deluge::hid::Button b, bool on, bool inCardRoutine) override;
39
40protected:
41 // void displayText(bool blinkImmediately) final;
42 void enterKeyPress() final;
43 static bool currentFolderIsEmpty;
44};
This class represents the colour format most used by the Deluge globally.
Definition rgb.h:14