Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
integer.h
1/*
2 * Copyright © 2014-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 "number.h"
21
22namespace deluge::gui::menu_item {
23
24class Integer : public Number {
25public:
26 using Number::Number;
27 void selectEncoderAction(int32_t offset) override;
28
29protected:
30 virtual int32_t getDisplayValue() { return this->getValue(); }
31 virtual const char* getUnit() { return ""; }
32
33 void drawPixelsForOled();
34 virtual void drawInteger(int32_t textWidth, int32_t textHeight, int32_t yPixel);
35
36 // 7Seg Only
37 void drawValue() override;
38};
39
40class IntegerWithOff : public Integer {
41public:
42 using Integer::Integer;
43 void drawPixelsForOled() override;
44
45 // 7Seg Only
46 void drawValue() override;
47};
48
49class IntegerContinuous : public Integer {
50public:
51 using Integer::Integer;
52
53protected:
54 void drawPixelsForOled();
55};
56
57} // namespace deluge::gui::menu_item
void drawPixelsForOled()
Paints the pixels below the standard title block.
Definition integer.cpp:75
void drawPixelsForOled() override
Paints the pixels below the standard title block.
Definition integer.cpp:53
Definition integer.h:24
void selectEncoderAction(int32_t offset) override
Handle select encoder movement.
Definition integer.cpp:25
void drawPixelsForOled()
Paints the pixels below the standard title block.
Definition integer.cpp:71
Definition number.h:24