LiquidLine Class Reference

Represents the individual lines printed on the display. More...

#include <LiquidMenu.h>

Public Member Functions

Constructors
template<typename A >
 LiquidLine (uint8_t column, uint8_t row, A &variableA)
 Constructor for one variable/constant. More...
 
template<typename A , typename B >
 LiquidLine (uint8_t column, uint8_t row, A &variableA, B &variableB)
 Constructor for two variables/constants. More...
 
template<typename A , typename B , typename C >
 LiquidLine (uint8_t column, uint8_t row, A &variableA, B &variableB, C &variableC)
 Constructor for three variables/constants. More...
 
template<typename A , typename B , typename C , typename D >
 LiquidLine (uint8_t column, uint8_t row, A &variableA, B &variableB, C &variableC, D &variableD)
 Constructor for four variables/constants. More...
 
Public methods
bool attach_function (uint8_t number, void(*function)(void))
 Attaches a callback function to the line. More...
 
bool set_focusPosition (Position position, uint8_t column=0, uint8_t row=0)
 Configures the focus indicator position for the line. More...
 

Friends

class LiquidScreen
 

Detailed Description

Represents the individual lines printed on the display.

This is the lowest class in the hierarchy, it holds pointers to the variables/constants that will be printed, where the line is positioned, where the focus indicator is positioned and pointers to the callback functions. This classes' objects go into a LiquidScreen object which which controls them. The public methods are for configuration only.

Examples:
buttons_menu.ino, focus_menu.ino, functions_menu.ino, hello_menu.ino, serial_menu.ino, and system_menu.ino.

Constructor & Destructor Documentation

template<typename A >
LiquidLine::LiquidLine ( uint8_t  column,
uint8_t  row,
A &  variableA 
)
inline

Constructor for one variable/constant.

This is the main constructor that gets called every time.

Parameters
column- the column at which the line starts
row- the row at which the line is printed
&variableA- variable/constant to be printed

+ Here is the call graph for this function:

template<typename A , typename B >
LiquidLine::LiquidLine ( uint8_t  column,
uint8_t  row,
A &  variableA,
B &  variableB 
)
inline

Constructor for two variables/constants.

Parameters
column- the column at which the line starts
row- the row at which the line is printed
&variableA- variable/constant to be printed
&variableB- variable/constant to be printed

+ Here is the call graph for this function:

template<typename A , typename B , typename C >
LiquidLine::LiquidLine ( uint8_t  column,
uint8_t  row,
A &  variableA,
B &  variableB,
C &  variableC 
)
inline

Constructor for three variables/constants.

Parameters
column- the column at which the line starts
row- the row at which the line is printed
&variableA- variable/constant to be printed
&variableB- variable/constant to be printed
&variableC- variable/constant to be printed

+ Here is the call graph for this function:

template<typename A , typename B , typename C , typename D >
LiquidLine::LiquidLine ( uint8_t  column,
uint8_t  row,
A &  variableA,
B &  variableB,
C &  variableC,
D &  variableD 
)
inline

Constructor for four variables/constants.

Parameters
column- the column at which the line starts
row- the row at which the line is printed
&variableA- variable/constant to be printed
&variableB- variable/constant to be printed
&variableC- variable/constant to be printed
&variableD- variable/constant to be printed

+ Here is the call graph for this function:

Member Function Documentation

bool LiquidLine::attach_function ( uint8_t  number,
void(*)(void)  function 
)

Attaches a callback function to the line.

Attaches a callback function to this line. The number is used for identification. The callback function can later be called when the line is focused with LiquidMenu::call_function(uint8_t number) const.

Parameters
number- function number used for identification
*function- pointer to the function
Returns
true on success and false if maximum amount of functions has been reached
Note
Function numbering starts from 1.
The maximum amount of functions per line is specified in LiquidMenu_config.h as MAX_FUNCTIONS. The default is 8.
See also
LiquidMenu_config.h
MAX_FUNCTIONS
bool LiquidMenu::call_function(uint8_t number) const
Examples:
functions_menu.ino, and system_menu.ino.

+ Here is the call graph for this function:

bool LiquidLine::set_focusPosition ( Position  position,
uint8_t  column = 0,
uint8_t  row = 0 
)

Configures the focus indicator position for the line.

The valid positions are LEFT, RIGHT and CUSTOM. The CUSTOM position is absolute so it also needs the column and row that it will be printed on.

Parameters
position- LEFT, RIGHT or CUSTOM
column- if using CUSTOM this specifies the column
row- if using CUSTOM this specifies the row
Returns
true on success and false if the position specified is invalid
Note
The Position is enum class. Use Position::(member) when specifeing the position.
See also
Position
Examples:
system_menu.ino.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: