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

#include <MenuItems.h>

Inheritance diagram for BooleanMenuItem:
ValueMenuItem MenuItem

Public Member Functions

 BooleanMenuItem (const BooleanMenuInfo *info, bool defaultVal, MenuItem *next=nullptr, bool infoInPgm=INFO_LOCATION_PGM)
 
BooleanNaming getBooleanNaming () const
 
bool getBoolean () const
 
void setBoolean (bool b, bool silent=false)
 
- Public Member Functions inherited from ValueMenuItem
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)
 

Additional Inherited Members

- Protected Member Functions inherited from ValueMenuItem
 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 inherited from ValueMenuItem
uint16_t currentValue
 
- Protected Attributes inherited from MenuItem
uint16_t flags
 
MenuItemnext
 
const AnyMenuInfoinfo = nullptr
 
RuntimeRenderingFn renderFn = nullptr
 
MenuType menuType
 

Detailed Description

An item that can represent only two states, true or false. Can be configured to show as ON/OFF, TRUE/FALSE or YES/NO as required.

See also
BooleanMenuInfo

Constructor & Destructor Documentation

◆ BooleanMenuItem()

BooleanMenuItem::BooleanMenuItem ( const BooleanMenuInfo info,
bool  defaultVal,
MenuItem next = nullptr,
bool  infoInPgm = INFO_LOCATION_PGM 
)
inline

Create an instance of the class

Parameters
infoa BooleanMenuInfo structure
defaultValthe default starting value
nextthe next menu in the chain if there is one, or NULL.

Member Function Documentation

◆ getBooleanNaming()

BooleanNaming BooleanMenuItem::getBooleanNaming ( ) const

returns the boolean naming for this item, EG: how the value should be rendered

◆ getBoolean()

bool BooleanMenuItem::getBoolean ( ) const
inline

return the boolean value currently stored

◆ setBoolean()

void BooleanMenuItem::setBoolean ( bool  b,
bool  silent = false 
)
inline

set the boolean value currently stored


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