EX-Display
EX-Display
Loading...
Searching...
No Matches
/home/runner/work/EX-Display/EX-Display/ScreenRow.h
Go to the documentation of this file.
1/*
2 * © 2024 Peter Cole
3 *
4 * This is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * It is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this code. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef SCREENROW_H
19#define SCREENROW_H
20
21#include "Logger.h"
22#include <Arduino.h>
23
24class ScreenRow {
25public:
28 ScreenRow(uint8_t screenRowId);
29
32 uint8_t getId();
33
36 void setNext(ScreenRow *screenRow);
37
41
44 void setText(const char *text);
45
48 const char *getText();
49
52 void setLogger(Logger *logger);
53
56 bool needsRedraw();
57
59 ~ScreenRow();
60
61private:
62 uint8_t _screenRowId;
63 char *_text;
67};
68
69#endif // SCREENROW_H
Class to enable simple logging to a Stream object with different log levels This enables embedding pe...
Definition Logger.h:35
Definition ScreenRow.h:24
void setText(const char *text)
Set the text associated with this ScreenRow.
Definition ScreenRow.cpp:29
void setNext(ScreenRow *screenRow)
Set the next ScreenRow instance in the list.
Definition ScreenRow.cpp:25
char * _text
Definition ScreenRow.h:63
bool needsRedraw()
Test if this row needs to be redrawn.
Definition ScreenRow.cpp:50
uint8_t _screenRowId
Definition ScreenRow.h:62
uint8_t getId()
Get the ID of this ScreenRow.
Definition ScreenRow.cpp:23
void setLogger(Logger *logger)
Set the Logger instance.
Definition ScreenRow.cpp:48
const char * getText()
Get the text associated with this ScreenRow.
Definition ScreenRow.cpp:43
bool _needsRedraw
Definition ScreenRow.h:66
~ScreenRow()
Destructor for each ScreenRow instance.
Definition ScreenRow.cpp:52
Logger * _logger
Definition ScreenRow.h:65
ScreenRow * getNext()
Get the next ScreenRow instance in the list.
Definition ScreenRow.cpp:27
ScreenRow * _next
Definition ScreenRow.h:64