Public Member Functions | |
| ScrollChoiceBuilder (AnyMenuInfo &info, TcMenuBuilder &parentBuilder, uint16_t initialValue, MenuFlags flags) | |
| ScrollChoiceBuilder (const ScrollChoiceBuilder &)=default | |
| ScrollChoiceBuilder & | fromRamChoices (const char *fixedArray, int numItems, int fixedItemSize) |
| Configures the scroll choice menu item using a fixed array of choices stored in RAM. | |
| ScrollChoiceBuilder & | fromRomChoices (EepromPosition eepromPosition, int numItems, int fixedItemSize) |
| Configures the scroll choice menu item using a fixed array of choices stored in EEPROM. | |
| ScrollChoiceBuilder & | ofCustomRtFunction (RuntimeRenderingFn rtRenderFn, int numItems) |
| ScrollChoiceBuilder & | cachingEepromValues () |
| TcMenuBuilder & | endItem () const |
| Finalizes the configuration of the scroll choice menu item and returns control to the parent menu builder. | |
| ScrollChoiceBuilder & ScrollChoiceBuilder::fromRamChoices | ( | const char * | fixedArray, |
| int | numItems, | ||
| int | fixedItemSize | ||
| ) |
Configures the scroll choice menu item using a fixed array of choices stored in RAM.
This method initializes and configures a ScrollChoiceMenuItem with a fixed array of choices located in RAM.
menuMgr otherwise the item will not function correctly.The array is of fixed length, meaning that each item takes a fixed size. Example with fixedLen=8, numEntries=3:
Each entry occupies exactly fixedLen characters. If the text is shorter than fixedLen, it should be padded with spaces or zero terminated. Entry N starts at position (N * fixedLen). * List Docs - https://tcmenu.github.io/documentation/arduino-libraries/tc-menu/menu-item-types/list-menu-item/ ScrollChoice Docs - https://tcmenu.github.io/documentation/arduino-libraries/tc-menu/menu-item-types/scrollchoice-menu-item/
| fixedArray | A pointer to a fixed array of choices stored in RAM. |
| numItems | The total number of items available in the fixed array. |
| fixedItemSize | The size (in bytes) of each individual choice in the array. |
ScrollChoiceBuilder instance for method chaining. | ScrollChoiceBuilder & ScrollChoiceBuilder::fromRomChoices | ( | EepromPosition | eepromPosition, |
| int | numItems, | ||
| int | fixedItemSize | ||
| ) |
Configures the scroll choice menu item using a fixed array of choices stored in EEPROM.
This method initializes and configures a ScrollChoiceMenuItem with a fixed array of choices located in EEPROM.
If you use this method, you must set an EEPROM in menuMgr otherwise the item will not function correctly.
The array is of fixed length, meaning that each item takes a fixed size. Example with fixedLen=8, numEntries=3:
Each entry occupies exactly fixedLen characters. If the text is shorter than fixedLen, it should be padded with spaces or zero terminated. Entry N starts at position (N * fixedLen).
List Docs - https://tcmenu.github.io/documentation/arduino-libraries/tc-menu/menu-item-types/list-menu-item/ ScrollChoice Docs - https://tcmenu.github.io/documentation/arduino-libraries/tc-menu/menu-item-types/scrollchoice-menu-item/
| eepromPosition | offset into the eeprom of the fixed array |
| numItems | The total number of items available in the fixed array. |
| fixedItemSize | The size (in bytes) of each individual choice in the array. |
ScrollChoiceBuilder instance for method chaining. | ScrollChoiceBuilder & ScrollChoiceBuilder::cachingEepromValues | ( | ) |
Reading from EEPROM is slow, you can optionally cache the values in RAM once loaded, improving read performance.
ScrollChoiceBuilder instance for method chaining. | TcMenuBuilder & ScrollChoiceBuilder::endItem | ( | ) | const |
Finalizes the configuration of the scroll choice menu item and returns control to the parent menu builder.
This method completes the building process of the menu item by finalizing its configuration to the associated ScrollChoiceMenuItem and integrates it into the menu structure. It then returns control to the parent TcMenuBuilder to allow for further menu items.
TcMenuBuilder instance.