LiquidMenu  1.5.1
Menu creation Arduino library for LCDs, wraps LiquidCrystal.
Friends | List of all members
LiquidScreen Class Reference

Represents a screen shown on the display. More...

#include <LiquidMenu.h>

Public Member Functions

Constructors
 LiquidScreen ()
 The main constructor. More...
 
 LiquidScreen (LiquidLine &liquidLine)
 Constructor for 1 LiquidLine object. More...
 
 LiquidScreen (LiquidLine &liquidLine1, LiquidLine &liquidLine2)
 Constructor for 2 LiquidLine object. More...
 
 LiquidScreen (LiquidLine &liquidLine1, LiquidLine &liquidLine2, LiquidLine &liquidLine3)
 Constructor for 3 LiquidLine object. More...
 
 LiquidScreen (LiquidLine &liquidLine1, LiquidLine &liquidLine2, LiquidLine &liquidLine3, LiquidLine &liquidLine4)
 Constructor for 4 LiquidLine object. More...
 
Public methods
bool add_line (LiquidLine &liquidLine)
 Adds a LiquidLine object to the screen. More...
 
bool set_focusPosition (Position position)
 Sets the focus position for the whole screen at once. More...
 
void set_displayLineCount (uint8_t lineCount)
 Specifies the line size of the display (required for scrolling). More...
 
void hide (bool hide)
 Hides the screen. More...
 

Friends

class LiquidMenu
 

Detailed Description

Represents a screen shown on the display.

A screen is made up of LiquidLine objects. It holds pointers to them and calls their functions when it is active. It also knows on which line the focus is. This classes' objects go into a LiquidMenu object which controls them. The public methods are for configuration only.

See also
LiquidLine

Constructor & Destructor Documentation

◆ LiquidScreen() [1/5]

LiquidScreen::LiquidScreen ( )

The main constructor.

This is the main constructor that gets called every time.

◆ LiquidScreen() [2/5]

LiquidScreen::LiquidScreen ( LiquidLine liquidLine)
explicit

Constructor for 1 LiquidLine object.

Parameters
&liquidLine- pointer to a LiquidLine object

◆ LiquidScreen() [3/5]

LiquidScreen::LiquidScreen ( LiquidLine liquidLine1,
LiquidLine liquidLine2 
)

Constructor for 2 LiquidLine object.

Parameters
&liquidLine1- pointer to a LiquidLine object
&liquidLine2- pointer to a LiquidLine object

◆ LiquidScreen() [4/5]

LiquidScreen::LiquidScreen ( LiquidLine liquidLine1,
LiquidLine liquidLine2,
LiquidLine liquidLine3 
)

Constructor for 3 LiquidLine object.

Parameters
&liquidLine1- pointer to a LiquidLine object
&liquidLine2- pointer to a LiquidLine object
&liquidLine3- pointer to a LiquidLine object

◆ LiquidScreen() [5/5]

LiquidScreen::LiquidScreen ( LiquidLine liquidLine1,
LiquidLine liquidLine2,
LiquidLine liquidLine3,
LiquidLine liquidLine4 
)

Constructor for 4 LiquidLine object.

Parameters
&liquidLine1- pointer to a LiquidLine object
&liquidLine2- pointer to a LiquidLine object
&liquidLine3- pointer to a LiquidLine object
&liquidLine4- pointer to a LiquidLine object

Member Function Documentation

◆ add_line()

bool LiquidScreen::add_line ( LiquidLine liquidLine)

Adds a LiquidLine object to the screen.

Parameters
&liquidLine- pointer to a LiquidLine object
Returns
true on success and false if the maximum amount of lines has been reached
Note
The maximum amount of lines per screen is specified in LiquidMenu_config.h as MAX_LINES. The default is 8.
See also
LiquidMenu_config.h
MAX_LINES

◆ hide()

void LiquidScreen::hide ( bool  hide)

Hides the screen.

Hiding a screen means that it will be skipped when cycling the screens.

Parameters
hide- true for hiding and false for unhiding
Note
It can still be shown using the change_screen methods.
See also
LiquidMenu::change_screen(LiquidScreen p_liquidScreen)
LiquidMenu::change_screen(uint8_t number)

◆ set_displayLineCount()

void LiquidScreen::set_displayLineCount ( uint8_t  lineCount)

Specifies the line size of the display (required for scrolling).

This is required when you want to add more lines (LiquidLine objects) to a screen (LiquidScreen object) than the display's line size. The lines will be scrolled.

Parameters
lineCount- the line size of the display
Warning
Set this after adding all the "lines" to the "screen"!
Scrolling currently only works with "focusable" lines!

◆ set_focusPosition()

bool LiquidScreen::set_focusPosition ( Position  position)

Sets the focus position for the whole screen at once.

The valid positions are LEFT and RIGHT. CUSTOM is not valid for this function because it needs individual column and row for every line.

Parameters
position- LEFT or RIGHT
Returns
true on success and false if the position specified is invalid
Note
The Position is enum class. Use Position::(member) when specifying the position.
See also
Position

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