tcMenu
Public Types | Public Member Functions | List of all members
ListRuntimeMenuItem Class Reference

#include <RuntimeMenuItem.h>

Inheritance diagram for ListRuntimeMenuItem:
RuntimeMenuItem MenuItem EepromAuthenticationInfoMenuItem RemoteMenuItem

Public Types

enum  ListMode : uint8_t { CUSTOM_RENDER , RAM_ARRAY , FLASH_ARRAY }
 

Public Member Functions

 ListRuntimeMenuItem (const AnyMenuInfo *info, int numberOfRows, const char *const *array, ListMode listMode, MenuItem *next=nullptr, bool isPgm=INFO_LOCATION_PGM)
 
 ListRuntimeMenuItem (const AnyMenuInfo *info, int numberOfRows, RuntimeRenderingFn renderFn, MenuItem *next=nullptr, bool isPgm=INFO_LOCATION_PGM)
 
 ListRuntimeMenuItem (menuid_t id, int numberOfRows, RuntimeRenderingFn renderFn, MenuItem *next=nullptr)
 
RuntimeMenuItemgetChildItem (int pos)
 
RuntimeMenuItemasParent ()
 
RuntimeMenuItemasBackMenu ()
 
ListMode getListMode () const
 
bool isActingAsParent () const
 
uint8_t getActiveIndex () const
 
void setActiveIndex (uint8_t idx)
 
const char *const * getDataArray ()
 
- 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

A menu item that represents a list of items and can be defined at runtime. This takes an ID that will act as a range, this is important, as this will use from ID through to ID + numberOfItems so always allocate enough ID range space. It can either represent a single item or a range of items, for a single item set the initial rows to 0. The value and name of each item is obtained from the callback function. Note that setting one item change sets all items in the list changed and similar with any other flag. These are the only menu items that can presently be created dynamically at runtime.


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