tcMenu
Public Member Functions | List of all members
BackMenuItem Class Reference

#include <RuntimeMenuItem.h>

Inheritance diagram for BackMenuItem:
RuntimeMenuItem MenuItem

Public Member Functions

 BackMenuItem (RuntimeRenderingFn renderFn, MenuItem *next)
 
 BackMenuItem (const SubMenuInfo *info, MenuItem *next, bool infoInPgm)
 
const char * getNameUnsafe () const
 
- Public Member Functions inherited from RuntimeMenuItem
 RuntimeMenuItem (MenuType menuType, menuid_t id, RuntimeRenderingFn renderFn, uint8_t itemPosition, uint8_t numberOfRows, MenuItem *next=nullptr)
 
 RuntimeMenuItem (const AnyMenuInfo *rtInfo, bool isPgm, MenuType menuType, RuntimeRenderingFn renderFn, uint8_t itemPosition, uint8_t numberOfRows, MenuItem *next=nullptr)
 
void copyValue (char *buffer, int bufferSize) const
 
void runCallback () const
 
int getRuntimeId () const
 
int getRuntimeEeprom () const
 
uint8_t getNumberOfParts () const
 
void copyRuntimeName (char *buffer, int bufferSize) const
 
uint8_t getNumberOfRows () const
 
uint8_t getItemPosition () const
 
void setNumberOfRows (uint8_t rows)
 
- Public Member Functions inherited from MenuItem
uint8_t copyNameToBuffer (char *sz, int size) const
 
uint8_t copyNameToBuffer (char *sz, int offset, int size) const
 
menuid_t getId () const
 
uint16_t getMaximumValue () const
 
uint16_t getEepromPosition () const
 
MenuType getMenuType () const
 
void triggerCallback () const
 
bool isInfoProgMem () const
 
void setChanged (bool changed)
 
void setChanged (int num, bool changed)
 
bool isChanged (int num=0) const
 
bool isSendRemoteNeeded (uint8_t remoteNo) const
 
void setSendRemoteNeededAll ()
 
void clearSendRemoteNeededAll ()
 
void setSendRemoteNeeded (uint8_t remoteNo, bool needed)
 
void setReadOnly (bool active)
 
bool isReadOnly () const
 
void setLocalOnly (bool localOnly)
 
bool isLocalOnly () const
 
void setSecured (bool secured)
 
bool isSecured () const
 
void setVisible (bool visible)
 
bool isVisible () const
 
MenuItemgetNext () const
 
void setNext (MenuItem *pNext)
 
void changeOccurred (bool silent)
 

Additional Inherited Members

- Protected Member Functions inherited from MenuItem
 MenuItem (MenuType menuType, const AnyMenuInfo *menuInfo, MenuItem *next, bool infoProgMem)
 
- Protected Attributes inherited from RuntimeMenuItem
menuid_t id
 
uint8_t itemPosition
 
uint8_t noOfParts
 
- Protected Attributes inherited from MenuItem
uint16_t flags
 
MenuItemnext
 
const AnyMenuInfoinfo = nullptr
 
RuntimeRenderingFn renderFn = nullptr
 
MenuType menuType
 

Detailed Description

Back menu item pairs with an associated SubMenuItem, it only exists in the embedded domain - not the API. This type is always the first item in a series of items for a submenu. It provides the functionality required to get back to root. The default render function is: backSubItemRenderFn

For example

    SubMenu.getChild() -> Back Menu Item -> Sub Menu Item 1 ...

Constructor & Destructor Documentation

◆ BackMenuItem() [1/2]

BackMenuItem::BackMenuItem ( RuntimeRenderingFn  renderFn,
MenuItem next 
)
inline

Create an instance of the class

Parameters
nextChildthe next menu in the chain if there is one, or NULL.
renderFnthe callback that provides the runtime information about the menu.

◆ BackMenuItem() [2/2]

BackMenuItem::BackMenuItem ( const SubMenuInfo info,
MenuItem next,
bool  infoInPgm 
)

Create an instance of the class using a SubMenuInfo block, it shares the info block with the Submenu itself to save space.

Parameters
infothe info block, mainly used for the name
nextthe next item in the linked list
infoInPgmif the info block is const/PROGMEM: true, RAM: false

Member Function Documentation

◆ getNameUnsafe()

const char* BackMenuItem::getNameUnsafe ( ) const
inline
Returns
the name pointer or null if not set, could be in progmem.

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