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

#include <RuntimeMenuItem.h>

Inheritance diagram for SubMenuItem:
RuntimeMenuItem MenuItem

Public Member Functions

 SubMenuItem (const SubMenuInfo *info, MenuItem *child, MenuItem *next=nullptr, bool infoInPgm=INFO_LOCATION_PGM)
 
 SubMenuItem (menuid_t id, RuntimeRenderingFn renderFn, MenuItem *child, MenuItem *next=nullptr)
 
MenuItemgetChild () const
 
void setChild (MenuItem *firstChildItem)
 
- 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

The implementation of a Menuitem that can contain more menu items as children. The default render function for this menu item is: backSubItemRenderFn

Constructor & Destructor Documentation

◆ SubMenuItem() [1/2]

SubMenuItem::SubMenuItem ( const SubMenuInfo info,
MenuItem child,
MenuItem next = nullptr,
bool  infoInPgm = INFO_LOCATION_PGM 
)
inline

Create an instance of SubMenuItem using the traditional SubMenuInfo block, this is no longer used, but we still support it as a means of working with the name.

Deprecated:
use the other constructor, this constructor will be removed in a future version
Parameters
infoa SubMenuInfo structure
idthe item ID
childthe first child item - (normally a BackMenuItem)
nextthe next menu in the chain if there is one, or NULL.

◆ SubMenuItem() [2/2]

SubMenuItem::SubMenuItem ( menuid_t  id,
RuntimeRenderingFn  renderFn,
MenuItem child,
MenuItem next = nullptr 
)
inline

Create an instance of SubMenuItem using the runtime method, which can easily be created during system runtime.

Parameters
idthe ID of the item
renderFnthe callback function for this item
childthe first child item in the sub menu
nextthe next menu in the chain if there i one, or NULL.

Member Function Documentation

◆ getChild()

MenuItem* SubMenuItem::getChild ( ) const
inline

return the first child item


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