41 #include <LiquidCrystal.h> 45 #include "serial_debugging.h" 47 #ifndef LiquidCrystal_h 48 #warning "LiquidCrystal library is required!" 59 BOOL = 1, BOOLEAN = 1,
61 UINT8_T = 9, BYTE = 9,
66 FLOAT = 50, DOUBLE = 50,
78 RIGHT = 1, NORMAL = 1,
197 : _row(row), _column(column), _focusRow(row - 1),
198 _focusColumn(column - 1), _focusPosition(
Position::NORMAL),
199 _variableCount(0), _focusable(false) {
201 _variable[i] =
nullptr;
202 _variableType[i] = DataType::NOT_USED;
215 template <
typename A>
218 add_variable(variableA);
230 template <
typename A,
typename B>
232 A &variableA, B &variableB)
234 add_variable(variableB);
247 template <
typename A,
typename B,
typename C>
249 A &variableA, B &variableB, C &variableC)
250 :
LiquidLine(column, row, variableA, variableB) {
251 add_variable(variableC);
265 template <
typename A,
typename B,
typename C,
typename D>
267 A &variableA, B &variableB, C &variableC, D &variableD)
268 :
LiquidLine(column, row, variableA, variableB, variableC) {
269 add_variable(variableD);
292 template <
typename T>
296 _variable[_variableCount] = (
void*)&variable;
298 DEBUG(F(
"Added variable '")); DEBUG(variable); DEBUGLN(F(
"'"));
302 DEBUG(F(
"Adding variable ")); DEBUG(variable);
303 DEBUGLN(F(
" failed, edit LiquidMenu_config.h to allow for more variables"));
326 bool attach_function(uint8_t number,
void (*
function)(
void));
346 uint8_t column = 0, uint8_t row = 0);
358 bool set_asGlyph(uint8_t number);
371 void print(LiquidCrystal *p_liquidCrystal,
bool isFocused);
381 void print_variable(LiquidCrystal *p_liquidCrystal, uint8_t number);
392 bool call_function(uint8_t number)
const;
394 uint8_t _row, _column, _focusRow, _focusColumn;
396 uint8_t _variableCount;
507 void hide(
bool hide);
518 void print(LiquidCrystal *p_liquidCrystal)
const;
575 LiquidMenu(LiquidCrystal &liquidCrystal, uint8_t startingScreen = 1);
585 uint8_t startingScreen = 1);
596 LiquidScreen &liquidScreen2, uint8_t startingScreen = 1);
609 uint8_t startingScreen = 1);
623 LiquidScreen &liquidScreen4, uint8_t startingScreen = 1);
778 LiquidCrystal *_p_liquidCrystal;
780 uint8_t _screenCount;
781 uint8_t _currentScreen;
817 uint8_t startingMenu = 1);
827 LiquidMenu &liquidMenu3, uint8_t startingMenu = 1);
839 uint8_t startingMenu = 1);
880 void operator++(
int);
883 void previous_screen();
895 void operator--(
int);
910 bool change_screen(uint8_t number);
925 bool operator=(uint8_t number);
934 void switch_focus(
bool forward =
true);
951 bool set_focusPosition(
Position position);
981 bool call_function(uint8_t number)
const;
996 void softUpdate()
const;
1003 uint8_t _currentMenu;
LiquidLine(uint8_t column, uint8_t row, A &variableA, B &variableB, C &variableC)
Constructor for three variables/constants.
Definition: LiquidMenu.h:248
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
@@ -129,10 +129,10 @@
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:216
-
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
diff --git a/doc/html/_liquid_menu__config_8h.html b/doc/html/_liquid_menu__config_8h.html
index a4c1f1c..a7cfd77 100644
--- a/doc/html/_liquid_menu__config_8h.html
+++ b/doc/html/_liquid_menu__config_8h.html
@@ -28,7 +28,7 @@
diff --git a/doc/html/_liquid_menu__config_8h_source.html b/doc/html/_liquid_menu__config_8h_source.html
index adeda7c..5e16cea 100644
--- a/doc/html/_liquid_menu__config_8h_source.html
+++ b/doc/html/_liquid_menu__config_8h_source.html
@@ -28,7 +28,7 @@
diff --git a/doc/html/annotated.html b/doc/html/annotated.html
index 8b539a6..7a8d4c4 100644
--- a/doc/html/annotated.html
+++ b/doc/html/annotated.html
@@ -28,7 +28,7 @@
diff --git a/doc/html/buttons_menu_8ino-example.html b/doc/html/buttons_menu_8ino-example.html
index a3d71a7..1b4347a 100644
--- a/doc/html/buttons_menu_8ino-example.html
+++ b/doc/html/buttons_menu_8ino-example.html
@@ -28,7 +28,7 @@
diff --git a/doc/html/class_liquid_line-members.html b/doc/html/class_liquid_line-members.html
index b0b5ef2..2f19f1c 100644
--- a/doc/html/class_liquid_line-members.html
+++ b/doc/html/class_liquid_line-members.html
@@ -28,7 +28,7 @@
diff --git a/doc/html/class_liquid_line.html b/doc/html/class_liquid_line.html
index c384e11..ac9de7e 100644
--- a/doc/html/class_liquid_line.html
+++ b/doc/html/class_liquid_line.html
@@ -28,7 +28,7 @@
@@ -490,7 +490,7 @@
@@ -332,7 +332,7 @@