Solo Controller Documentation 1.0
Documentation for the Solo Controller
 
Loading...
Searching...
No Matches
SoloMenu Class Referenceabstract

#include <Menu.h>

Inheritance diagram for SoloMenu:
MainMenu SetupPID_Menu SetupTempMenu SetupVolMenu

Public Member Functions

Accessor Methods
uint16_t x (void) const
 Upper-left x-coordinate for menu.
 
uint16_t y (void) const
 Upper-left y-coordinate for menu.
 
uint16_t width (void) const
 Width of the menu.
 
uint16_t height (void) const
 Height of the menu.
 

Protected Member Functions

Constructors and Destructors
 SoloMenu (void)
 Creates a full size menu.
 
 SoloMenu (uint16_t x0, uint16_t y0, uint16_t width, uint16_t height)
 Creates a menu of the specified size and location.
 
 ~SoloMenu (void)=default
 Default Destructor.
 
Button Management
int8_t _pressButtonIfTouched (void)
 Protected method checks to see if one of the buttons has been "touched." If so, this method "presses" the button.
 
void _register (Button **buttonPtrArray, uint8_t nButtons)
 Registers an array of buttons with this class.
 

General Methods

virtual void begin (void)
 Initializes the Menu object.
 
virtual void update (void)
 Updates the Button, Menu, and Label objects managed by this class.
 
virtual void show (void)=0
 Shows the menu in the TFT. Derived classes will provide specific functionality.
 
void loadConfig (void)
 Loads configuration data from EEPROM, placing it into RAM.
 
virtual void checkButtons (void)
 Check to see if one of the menu's buttons has been pressed.
 
virtual void releaseButton (void)
 Releases the currently pressed button.
 
static bool hasScreenBeenTouched (void)
 Determines if the TFT screen has been touched.
 

Constructor & Destructor Documentation

◆ SoloMenu() [1/2]

SoloMenu::SoloMenu ( void )
inlineprotected

Creates a full size menu.

Parameters
None.

◆ SoloMenu() [2/2]

SoloMenu::SoloMenu ( uint16_t x0,
uint16_t y0,
uint16_t width,
uint16_t height )
inlineprotected

Creates a menu of the specified size and location.

Parameters
[in]x0Upper left x-coordinate for the menu in the TFT display
[in]y0Upper left y-coordinate for the menu in the TFT display
[in]widthWidth of this menu in pixels
[in]heightHeight of this menu in pixels
Note
The parameters x0 and y0 currently don't do anything.

◆ ~SoloMenu()

SoloMenu::~SoloMenu ( void )
protecteddefault

Default Destructor.

Parameters
None.

Member Function Documentation

◆ _pressButtonIfTouched()

int8_t SoloMenu::_pressButtonIfTouched ( void )
protected

Protected method checks to see if one of the buttons has been "touched." If so, this method "presses" the button.

Parameters
None.
Returns
ID of the button that was touched. Return value is -1 if no buttons were touched

◆ _register()

void SoloMenu::_register ( Button ** buttonPtrArray,
uint8_t nButtons )
protected

Registers an array of buttons with this class.

Parameters
[in]buttonPtrArrayAn array of pointers to Button objects
[in]nButtonsNumber of buttons in buttonPtrArray
Parameters
None.

SoloMenu will "manage" buttons that have been registered via this method. Specifically, whenever the SoloMenu::checkButtons method is called, SoloMenu will check to see if a touch on the TFT screen hits one of the registered buttons. If it does, the button will be pressed and/or released as required.

◆ begin()

void SoloMenu::begin ( void )
virtual

Initializes the Menu object.

Parameters
None.

This method calls the begin() methods for all objects managed by this class

Reimplemented in MainMenu, SetupPID_Menu, SetupTempMenu, and SetupVolMenu.

◆ checkButtons()

void SoloMenu::checkButtons ( void )
virtual

Check to see if one of the menu's buttons has been pressed.

Parameters
None.

◆ hasScreenBeenTouched()

bool SoloMenu::hasScreenBeenTouched ( void )
static

Determines if the TFT screen has been touched.

Parameters
None.
Returns
true if the screen has been touched, false otherwise

◆ height()

uint16_t SoloMenu::height ( void ) const
inline

Height of the menu.

Parameters
None.
Returns
Height of the menu

◆ loadConfig()

void SoloMenu::loadConfig ( void )
inline

Loads configuration data from EEPROM, placing it into RAM.

Parameters
None.

◆ releaseButton()

void SoloMenu::releaseButton ( void )
virtual

Releases the currently pressed button.

Parameters
None.

◆ show()

virtual void SoloMenu::show ( void )
pure virtual

Shows the menu in the TFT. Derived classes will provide specific functionality.

Parameters
None.

Implemented in MainMenu, SetupPID_Menu, SetupTempMenu, and SetupVolMenu.

◆ update()

void SoloMenu::update ( void )
virtual

Updates the Button, Menu, and Label objects managed by this class.

Parameters
None.

Reimplemented in MainMenu, SetupPID_Menu, SetupTempMenu, and SetupVolMenu.

◆ width()

uint16_t SoloMenu::width ( void ) const
inline

Width of the menu.

Parameters
None.
Returns
Width of the menu

◆ x()

uint16_t SoloMenu::x ( void ) const
inline

Upper-left x-coordinate for menu.

Parameters
None.
Returns
UL x-coordinate for the menu in the TFT display

◆ y()

uint16_t SoloMenu::y ( void ) const
inline

Upper-left y-coordinate for menu.

Parameters
None.
Returns
UL y-coordinate for the menu in the TFT display

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