tcMenu
Public Member Functions | Static Public Member Functions | List of all members
Rgb32MenuItem Class Reference

#include <ScrollChoiceMenuItem.h>

Inheritance diagram for Rgb32MenuItem:
EditableMultiPartMenuItem RuntimeMenuItem MenuItem

Public Member Functions

 Rgb32MenuItem (RuntimeRenderingFn renderFn, const RgbColor32 &col, uint16_t id, bool includeAlpha, MenuItem *next=nullptr)
 
 Rgb32MenuItem (uint16_t id, RuntimeRenderingFn renderFn, bool includeAlpha, MenuItem *next=nullptr)
 
 Rgb32MenuItem (const AnyMenuInfo *info, RuntimeRenderingFn renderFn, const RgbColor32 &col, bool includeAlpha, MenuItem *next=nullptr, bool isPgm=INFO_LOCATION_PGM)
 
 Rgb32MenuItem (const AnyMenuInfo *info, const RgbColor32 &col, bool includeAlpha, MenuItem *next=nullptr, bool isPgm=INFO_LOCATION_PGM)
 
RgbColor32getUnderlying ()
 
RgbColor32 getColorData ()
 
void setColorData (const RgbColor32 &other)
 
bool isAlphaInUse () const
 
- Public Member Functions inherited from EditableMultiPartMenuItem
 EditableMultiPartMenuItem (MenuType type, menuid_t id, int numberOfParts, RuntimeRenderingFn renderFn, MenuItem *next=nullptr)
 
 EditableMultiPartMenuItem (const AnyMenuInfo *rtInfo, bool isPgm, MenuType type, int numberOfParts, RuntimeRenderingFn renderFn, MenuItem *next=nullptr)
 
uint8_t beginMultiEdit ()
 
int changeEditBy (int amt)
 
int previousPart ()
 
int nextPart ()
 
int getCurrentRange () const
 
void stopMultiEdit ()
 
int getPartValueAsInt () const
 
bool valueChanged (int newVal)
 
- 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)
 

Static Public Member Functions

static void setRgbPrintMode (RgbPrintMode mode)
 
static RgbPrintMode getRgbPrintMode ()
 

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 can display and edit RGB values that are 32 bits wide, that is 8 bit per element and an optional alpha channel. This is based on editable runtime menu item. Rendering function is rgbAlphaItemRenderFn

Constructor & Destructor Documentation

◆ Rgb32MenuItem() [1/4]

Rgb32MenuItem::Rgb32MenuItem ( RuntimeRenderingFn  renderFn,
const RgbColor32 col,
uint16_t  id,
bool  includeAlpha,
MenuItem next = nullptr 
)

Creates a color data menu item that can be edited, optionally including an alpha channel

Parameters
idthe id of the item
renderFnthe rendering function to use - see default in the class definition
includeAlphatrue to include alpha channel, otherwise false.
initialthe initial value
nextoptional pointer to the next menu item

◆ Rgb32MenuItem() [2/4]

Rgb32MenuItem::Rgb32MenuItem ( uint16_t  id,
RuntimeRenderingFn  renderFn,
bool  includeAlpha,
MenuItem next = nullptr 
)

Creates a color data menu item that can be edited, optionally including an alpha channel

Parameters
idthe id of the item
renderFnthe rendering function to use - see default in the class definition
includeAlphatrue to include alpha channel, otherwise false.
nextoptional pointer to the next menu item

◆ Rgb32MenuItem() [3/4]

Rgb32MenuItem::Rgb32MenuItem ( const AnyMenuInfo info,
RuntimeRenderingFn  renderFn,
const RgbColor32 col,
bool  includeAlpha,
MenuItem next = nullptr,
bool  isPgm = INFO_LOCATION_PGM 
)

Creates a color data menu item that can be edited, optionally including an alpha channel from an info block for static name, id etc.

Parameters
infothe info block containing the static data
renderFnthe rendering function to use - see default in the class definition
colthe initial color
includeAlphatrue to include alpha channel, otherwise false.
nextoptional pointer to the next menu item
isPgmoptional if the item is in program memory or RAM.

◆ Rgb32MenuItem() [4/4]

Rgb32MenuItem::Rgb32MenuItem ( const AnyMenuInfo info,
const RgbColor32 col,
bool  includeAlpha,
MenuItem next = nullptr,
bool  isPgm = INFO_LOCATION_PGM 
)

Creates a color data menu item that can be edited, optionally including an alpha channel from an info block for static name, id etc.

Parameters
infothe info block containing the static data
colthe initial color
includeAlphatrue to include alpha channel, otherwise false.
nextoptional pointer to the next menu item
isPgmoptional if the item is in program memory or RAM.

Member Function Documentation

◆ getUnderlying()

RgbColor32* Rgb32MenuItem::getUnderlying ( )
inline
Returns
the underlying color data that can be directly modified.

◆ getColorData()

RgbColor32 Rgb32MenuItem::getColorData ( )
inline
Returns
a copy of the underlying color data

◆ setColorData()

void Rgb32MenuItem::setColorData ( const RgbColor32 other)
inline

copy the color data provided as the latest

Parameters
otherthe new color data

◆ isAlphaInUse()

bool Rgb32MenuItem::isAlphaInUse ( ) const
inline
Returns
true if the alpha channel is in use for this menuitem, otherwise false.

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