tcMenu
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ValueMenuItem Class Reference

#include <MenuItems.h>

Inheritance diagram for ValueMenuItem:
MenuItem AnalogMenuItem BooleanMenuItem EnumMenuItem

Public Member Functions

void setCurrentValue (uint16_t val, bool silent=false)
 
uint16_t getCurrentValue () const
 
- 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)
 

Protected Member Functions

 ValueMenuItem (MenuType menuType, const AnyMenuInfo *info, uint16_t defaultVal, MenuItem *next, bool infoPgm)
 
- Protected Member Functions inherited from MenuItem
 MenuItem (MenuType menuType, const AnyMenuInfo *menuInfo, MenuItem *next, bool infoProgMem)
 

Protected Attributes

uint16_t currentValue
 
- Protected Attributes inherited from MenuItem
uint16_t flags
 
MenuItemnext
 
const AnyMenuInfoinfo = nullptr
 
RuntimeRenderingFn renderFn = nullptr
 
MenuType menuType
 

Detailed Description

Represents an item that has a 16 bit unsigned integer backing it, never directly used, this class is essentially abstract.

Constructor & Destructor Documentation

◆ ValueMenuItem()

ValueMenuItem::ValueMenuItem ( MenuType  menuType,
const AnyMenuInfo info,
uint16_t  defaultVal,
MenuItem next,
bool  infoPgm 
)
inlineprotected

Use the leaf types, dont construct directly. Initialise an instance of this type with the required data values

Member Function Documentation

◆ setCurrentValue()

void ValueMenuItem::setCurrentValue ( uint16_t  val,
bool  silent = false 
)

Sets the integer current value to a new value, and marks the menu changed

◆ getCurrentValue()

uint16_t ValueMenuItem::getCurrentValue ( ) const
inline

gets the current value


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