37 #include <LiquidCrystal.h> 41 #include "serial_debugging.h" 43 #ifndef LiquidCrystal_h 44 #warning "LiquidCrystal library is required!" 56 BOOL = 1, BOOLEAN = 1,
58 UINT8_T = 9, BYTE = 9,
63 FLOAT = 50, DOUBLE = 50,
74 RIGHT = 1, NORMAL = 1,
187 template <
typename A>
189 : _row(row), _column(column), _focusRow(row - 1),
190 _focusColumn(column - 1), _focusPosition(
Position::NORMAL),
193 _variable[i] =
nullptr;
194 _variableType[i] = DataType::NOT_USED;
199 _variable[0] = (
void*)&variableA;
210 template <
typename A,
typename B>
212 A &variableA, B &variableB)
214 _variable[1] = (
void*)&variableB;
226 template <
typename A,
typename B,
typename C>
228 A &variableA, B &variableB, C &variableC)
229 :
LiquidLine(column, row, variableA, variableB) {
230 _variable[2] = (
void*)&variableC;
243 template <
typename A,
typename B,
typename C,
typename D>
245 A &variableA, B &variableB, C &variableC, D &variableD)
246 :
LiquidLine(column, row, variableA, variableB, variableC) {
247 _variable[3] = (
void*)&variableD;
276 bool attach_function(uint8_t number,
void (*
function)(
void));
296 uint8_t column = 0, uint8_t row = 0);
310 void print(LiquidCrystal *p_liquidCrystal,
bool isFocused);
320 void print_variable(LiquidCrystal *p_liquidCrystal, uint8_t number);
331 bool call_function(uint8_t number)
const;
333 uint8_t _row, _column, _focusRow, _focusColumn;
443 void print(LiquidCrystal *p_liquidCrystal)
const;
501 LiquidMenu(LiquidCrystal &liquidCrystal, uint8_t startingScreen = 1);
511 uint8_t startingScreen = 1);
522 LiquidScreen &liquidScreen2, uint8_t startingScreen = 1);
535 uint8_t startingScreen = 1);
549 LiquidScreen &liquidScreen4, uint8_t startingScreen = 1);
695 LiquidCrystal *_p_liquidCrystal;
697 uint8_t _screenCount;
698 uint8_t _currentScreen;
734 uint8_t startingMenu = 1);
744 LiquidMenu &liquidMenu3, uint8_t startingMenu = 1);
756 uint8_t startingMenu = 1);
797 void operator++(
int);
800 void previous_screen();
812 void operator--(
int);
827 bool change_screen(uint8_t number);
842 bool operator=(uint8_t number);
851 void switch_focus(
bool forward =
true);
868 bool set_focusPosition(
Position position);
898 bool call_function(uint8_t number)
const;
911 uint8_t _currentMenu;
LiquidLine(uint8_t column, uint8_t row, A &variableA, B &variableB, C &variableC)
Constructor for three variables/constants.
Definition: LiquidMenu.h:227
void operator--()
Switches to the previous screen.
Definition: LiquidSystem.cpp:97
bool operator=(LiquidScreen &p_liquidScreen)
Switches to the specified screen.
Definition: LiquidSystem.cpp:117
Represents a collection of menus forming a menu system.
Definition: LiquidMenu.h:713
Represents the individual lines printed on the display.
Definition: LiquidMenu.h:172
void switch_focus(bool forward=true)
Switches the focus.
Definition: LiquidSystem.cpp:121
void previous_screen()
Switches to the previous screen.
Definition: LiquidSystem.cpp:93
bool set_focusPosition(Position position)
Sets the focus position for the whole menu at once.
Definition: LiquidSystem.cpp:125
LiquidLine(uint8_t column, uint8_t row, A &variableA, B &variableB)
Constructor for two variables/constants.
Definition: LiquidMenu.h:211
Represents a screen shown on the display.
Definition: LiquidMenu.h:351
bool set_focusSymbol(Position position, uint8_t symbol[8])
Changes the focus indicator's symbol.
Definition: LiquidSystem.cpp:129
bool change_screen(LiquidScreen &p_liquidScreen)
Switches to the specified screen.
Definition: LiquidSystem.cpp:109
LiquidLine(uint8_t column, uint8_t row, A &variableA, B &variableB, C &variableC, D &variableD)
Constructor for four variables/constants.
Definition: LiquidMenu.h:244
void update() const
Prints the current screen to the display.
Definition: LiquidSystem.cpp:140
void next_screen()
Switches to the next screen.
Definition: LiquidSystem.cpp:81
LiquidLine(uint8_t column, uint8_t row, A &variableA)
Constructor for one variable/constant.
Definition: LiquidMenu.h:188
bool call_function(uint8_t number) const
Calls an attached function specified by the number.
Definition: LiquidSystem.cpp:133
void operator++()
Switches to the next screen.
Definition: LiquidSystem.cpp:85
bool set_focusPosition(Position position)
Sets the focus position for the whole screen at once.
Definition: LiquidScreen.cpp:66